diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/Whiteboard/GView.cpp | 8 | ||||
-rw-r--r-- | Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
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<QGraphicsPathItem*>(lastItem); +/* QGraphicsPathItem* item = qgraphicsitem_cast<QGraphicsPathItem*>(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<QGraphicsPolygonItem*>(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<FreehandLineItem*>(item); if (freehandLineItem != 0) { WhiteboardFreehandPathElement::ref element = boost::make_shared<WhiteboardFreehandPathElement>(); @@ -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; |