16 #ifndef QGSMODELVIEWTOOL_H
17 #define QGSMODELVIEWTOOL_H
28 class QgsModelGraphicsView;
30 class QgsModelComponentGraphicItem;
31 class QgsModelGraphicsScene;
55 Q_DECLARE_FLAGS( Flags, Flag )
63 QgsModelViewTool::Flags flags()
const;
96 virtual void wheelEvent( QWheelEvent *event );
101 virtual void keyPressEvent( QKeyEvent *event );
106 virtual void keyReleaseEvent( QKeyEvent *event );
111 virtual bool allowItemInteraction();
120 void setAction( QAction *action );
131 void setCursor(
const QCursor &cursor );
137 virtual void activate();
143 virtual void deactivate();
154 QgsModelGraphicsView *view()
const;
160 QgsModelGraphicsScene *scene()
const;
178 void itemFocused( QgsModelComponentGraphicItem *item );
186 void setFlags( QgsModelViewTool::Flags flags );
200 bool isClickAndDrag( QPoint startViewPoint, QPoint endViewPoint )
const;
205 QgsModelGraphicsView *mView =
nullptr;
207 QgsModelViewTool::Flags mFlags =
nullptr;
210 QCursor mCursor = Qt::ArrowCursor;
213 QPointer< QAction > mAction;
221 #endif // QGSMODELVIEWTOOL_H