diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-10 06:45:48 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-10 06:45:48 (GMT) |
commit | 1ba6012a02c05bd077fa5cd7bbfd83473227f608 (patch) | |
tree | d2bc58d93d21591e3cf284385d2f787a20575df8 /Swift/QtUI/Whiteboard/GView.cpp | |
parent | 7316162e0d809816b276512b50a1d6585265f959 (diff) | |
download | swift-contrib-1ba6012a02c05bd077fa5cd7bbfd83473227f608.zip swift-contrib-1ba6012a02c05bd077fa5cd7bbfd83473227f608.tar.bz2 |
Improved whiteboard window sidebar
Diffstat (limited to 'Swift/QtUI/Whiteboard/GView.cpp')
-rw-r--r-- | Swift/QtUI/Whiteboard/GView.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Swift/QtUI/Whiteboard/GView.cpp b/Swift/QtUI/Whiteboard/GView.cpp index b26f0bb..2c2f849 100644 --- a/Swift/QtUI/Whiteboard/GView.cpp +++ b/Swift/QtUI/Whiteboard/GView.cpp @@ -34,6 +34,7 @@ namespace Swift { } else { defaultPen.setColor(color); } + lineColorChanged(color); } QColor GView::getLineColor() { @@ -49,8 +50,7 @@ namespace Swift { } else { defaultBrush.setColor(color); } - -// brush.setStyle(Qt::SolidPattern); + brushColorChanged(color); } QColor GView::getBrushColor() { @@ -99,6 +99,8 @@ namespace Swift { pen.setWidth(1); defaultPen = pen; lineWidthChanged(1); + lineColorChanged(pen.color()); + brushColorChanged(brush.color()); } QGraphicsItem* GView::getItem(QString id) { @@ -438,6 +440,8 @@ namespace Swift { ellipseItem->setPen(pen); ellipseItem->setBrush(brush); } + lineColorChanged(pen.color()); + brushColorChanged(brush.color()); } void GView::setActualPenAndBrushFromItem(QGraphicsItem* item) { @@ -474,6 +478,8 @@ namespace Swift { brush = ellipseItem->brush(); } lineWidthChanged(pen.width()); + lineColorChanged(pen.color()); + brushColorChanged(brush.color()); } void GView::deselect() { @@ -484,6 +490,8 @@ namespace Swift { delete selectionRect; selectionRect = 0; lineWidthChanged(pen.width()); + lineColorChanged(pen.color()); + brushColorChanged(brush.color()); } } @@ -497,6 +505,8 @@ namespace Swift { delete selectionRect; selectionRect = 0; lineWidthChanged(pen.width()); + lineColorChanged(pen.color()); + brushColorChanged(brush.color()); } } } |