diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-06-18 10:55:55 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-06-18 10:55:55 (GMT) |
commit | e0c79b3b885f126a2a2a34cb0d5df90796821130 (patch) | |
tree | d53e7a822a02ebc7ae136d01db18475be4283854 /Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h | |
parent | f3cc4c80787657ea770468915ec716dea2676d22 (diff) | |
download | swift-contrib-e0c79b3b885f126a2a2a34cb0d5df90796821130.zip swift-contrib-e0c79b3b885f126a2a2a34cb0d5df90796821130.tar.bz2 |
Completed serialization and parsing of line element
Diffstat (limited to 'Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h')
-rw-r--r-- | Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h b/Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h index 962fd79..a1715bc 100644 --- a/Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h +++ b/Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h @@ -17,6 +17,11 @@ namespace Swift { void visit(const WhiteboardLineElement* element) { QGraphicsLineItem *item = new QGraphicsLineItem(element->x1(), element->y1(), element->x2(), element->y2()); + QPen pen; + Color color = element->getColor(); + pen.setColor(QColor(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha())); + pen.setWidth(element->getPenWidth()); + item->setPen(pen); graphicsView_->scene()->addItem(item); } |