25 #ifndef WQTNETWORKEDITORVIEW_H
26 #define WQTNETWORKEDITORVIEW_H
28 #include <QtCore/QTimeLine>
29 #include <QGraphicsView>
116 virtual void wheelEvent( QWheelEvent* event );
144 virtual void dropEvent( QDropEvent *event );
151 void moveBy(
const QPointF& delta );
158 void moveTo(
const QPointF& target );
This class extends the basic functionality of QGraphicsView to allow comfortable panning and zooming.
QPoint m_autoPanTarget
Auto-pan vector.
void ensureVisibleSmooth(QGraphicsItem *item, int xmargin=50, int ymargin=50)
Improved version of QGraphicsView::ensureVisible for smooth scrolling.
virtual void mouseReleaseEvent(QMouseEvent *event)
Mouse button released.
virtual void wheelEvent(QWheelEvent *event)
Mouse wheel used.
void focusOn(QGraphicsItem *item)
The Item to focus on.
virtual void mousePressEvent(QMouseEvent *event)
Mouse button pressed.
void moveBy(const QPointF &delta)
Move scene in the view by delta units.
virtual void mouseDoubleClickEvent(QMouseEvent *event)
Double clicked into the view.
void dragDrop(QDropEvent *event)
Emitted whenever the user drops something into the widget.
QMenu * m_addMenu
The menu containing the add actions in m_addModuleActionList.
QPoint m_autoPanOrig
Origin of auto-pan movement for proper interpolation.
void moveTo(const QPointF &target)
Move scrollarea to absolute position.
virtual void dropEvent(QDropEvent *event)
Handles the drop event for a tree item.
void loadAction()
Emitted whenever the user caused a load event.
void leaveEvent(QEvent *event)
Mouse leaves the widget.
virtual void resizeEvent(QResizeEvent *event)
View resized.
QTimeLine * m_autoPanTimer
Auto-pan timer.
WQtNetworkEditorView(QWidget *parent=NULL)
Constructs empty view.
void keyPressEvent(QKeyEvent *event)
Key pressed.
QPoint m_lastPanPoint
To keep track of mouse movement, cache last known mouse event point.
void autoPanTick(qreal value)
Called every tick of the auto pan timer.
bool m_panning
If true, we are in pan mode.
void setGlobalAddMenu(QMenu *menu)
Set the given menu as new global add-modules menu.
virtual void mouseMoveEvent(QMouseEvent *event)
Mouse moved.