summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Piekos <mateuszpiekos@gmail.com>2012-07-17 09:59:17 (GMT)
committerMateusz Piekos <mateuszpiekos@gmail.com>2012-07-17 09:59:17 (GMT)
commit1f8e319e256ac15438d63080d11a860dfa16431c (patch)
treed20cfb5a3f290020f4e6ffc9052b7894f933fb8d /Swift/QtUI/Whiteboard/GView.h
parentb2e11d7f32db65a6be001dfdf74b74f16f4c9ec3 (diff)
downloadswift-contrib-1f8e319e256ac15438d63080d11a860dfa16431c.zip
swift-contrib-1f8e319e256ac15438d63080d11a860dfa16431c.tar.bz2
Added handling of elements position updates
Diffstat (limited to 'Swift/QtUI/Whiteboard/GView.h')
-rw-r--r--Swift/QtUI/Whiteboard/GView.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Swift/QtUI/Whiteboard/GView.h b/Swift/QtUI/Whiteboard/GView.h
index 9428f3d..9b8f60f 100644
--- a/Swift/QtUI/Whiteboard/GView.h
+++ b/Swift/QtUI/Whiteboard/GView.h
@@ -21,6 +21,7 @@ namespace Swift {
Q_OBJECT;
public:
enum Mode { Rubber, Line, Rect, Circle, HandLine, FilledHandLine, Text, Polygon, Select };
+ enum Type { New, Update };
GView(QGraphicsScene* scene, QWidget* parent = 0);
void setLineWidth(int i);
void setLineColor(QColor color);
@@ -34,6 +35,7 @@ namespace Swift {
void addItem(QGraphicsItem* item, QString id, int pos);
void setIDPrefix(QString prefix);
void clear();
+ QGraphicsItem* getItem(QString id);
public slots:
void moveUpSelectedItem();
@@ -50,12 +52,12 @@ namespace Swift {
QGraphicsItem* lastItem;
QGraphicsRectItem* selectionRect;
TextDialog* textDialog;
-// QMap<QString, QGraphicsItem*> items_;
+ QMap<QString, QGraphicsItem*> itemsMap_;
QList<QGraphicsItem*> items_;
SimpleIDGenerator idGenerator;
QString idPrefix;
signals:
- void lastItemChanged(QGraphicsItem* item, int pos);
+ void lastItemChanged(QGraphicsItem* item, int pos, GView::Type type);
};
}