From ed208c8ce62dea1bdec51e904d51afa5229363c5 Mon Sep 17 00:00:00 2001 From: Mateusz Piekos Date: Tue, 24 Jul 2012 10:53:00 +0200 Subject: Commented out code handling filled hand line diff --git a/Swift/QtUI/Whiteboard/GView.cpp b/Swift/QtUI/Whiteboard/GView.cpp index 8d5e2bc..5f10329 100644 --- a/Swift/QtUI/Whiteboard/GView.cpp +++ b/Swift/QtUI/Whiteboard/GView.cpp @@ -181,14 +181,14 @@ namespace Swift { } } else if (mode == FilledHandLine) { - QGraphicsPathItem* item = qgraphicsitem_cast(lastItem); +/* QGraphicsPathItem* item = qgraphicsitem_cast(lastItem); QPainterPath path; path = item->path(); if (path.isEmpty()) path.moveTo(item->data(0).toPointF()); QPointF newPoint = this->mapToScene(event->pos()); path.lineTo(newPoint); - item->setPath(path); + item->setPath(path);*/ } else if (mode == Polygon) { QGraphicsPolygonItem* item = qgraphicsitem_cast(lastItem); @@ -276,7 +276,7 @@ namespace Swift { lastItem = item; } else if (mode == FilledHandLine) { - QPointF point = this->mapToScene(event->pos()); +/* QPointF point = this->mapToScene(event->pos()); QPainterPath path; QGraphicsPathItem* item = scene()->addPath(path, pen, brush); QString id = getNewID(); @@ -284,7 +284,7 @@ namespace Swift { item->setData(0, point); item->setData(100, id); item->setData(101, items_.size()); - lastItem = item; + lastItem = item;*/ } else if (mode == Text) { QPointF point = this->mapToScene(event->pos()); diff --git a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp index b3f42a9..a2440ba 100644 --- a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp +++ b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp @@ -253,6 +253,7 @@ namespace Swift { element->setID(lineItem->data(100).toString().toStdString()); el = element; } + FreehandLineItem* freehandLineItem = qgraphicsitem_cast(item); if (freehandLineItem != 0) { WhiteboardFreehandPathElement::ref element = boost::make_shared(); @@ -281,7 +282,6 @@ namespace Swift { element->setBrushColor(Color(brushColor.red(), brushColor.green(), brushColor.blue(), brushColor.alpha())); element->setPenColor(Color(penColor.red(), penColor.green(), penColor.blue(), penColor.alpha())); element->setPenWidth(rectItem->pen().width()); - std::cout << penColor.red() << " " << brushColor.red() << std::endl; element->setID(rectItem->data(100).toString().toStdString()); el = element; -- cgit v0.10.2-6-g49f6