summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Piekos <mateuszpiekos@gmail.com>2012-06-18 10:55:55 (GMT)
committerMateusz Piekos <mateuszpiekos@gmail.com>2012-06-18 10:55:55 (GMT)
commite0c79b3b885f126a2a2a34cb0d5df90796821130 (patch)
treed53e7a822a02ebc7ae136d01db18475be4283854 /Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h
parentf3cc4c80787657ea770468915ec716dea2676d22 (diff)
downloadswift-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.h5
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);
}