00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ACTION_SELECT_H
00022 #define ACTION_SELECT_H
00023
00024 #include "AbstractAction.h"
00025 #include <QObject>
00026 #include <QPointF>
00027
00028 class Node;
00029 class QGraphicsRectItem;
00030 class QGraphicsItem;
00031
00038 class SelectAction : public AbstractAction
00039 {
00040 Q_OBJECT
00041 public:
00047 explicit SelectAction( GraphScene* scene, QObject* parent = 0 );
00048
00052 ~SelectAction();
00053 public slots:
00058 void executePress( QPointF pos );
00062 void executeMove( QPointF pos );
00063
00067 void executeRelease( QPointF pos );
00068
00069 signals:
00071 void ItemSelectedChanged( QGraphicsItem* o );
00072
00073 private:
00077 void singleSelect( QPointF pos );
00078
00083 void multiSelect( QPointF pos );
00084
00086 QPointF _p1;
00087
00089 QPointF _p2;
00090
00092 QGraphicsRectItem* _selectionRect;
00093
00094 };
00095
00096 #endif