7 #ifndef VIEW_PROFILE_DIVIDER_H 8 #define VIEW_PROFILE_DIVIDER_H 10 #include <QGraphicsRectItem> 13 class QGraphicsLineItem;
15 class QGraphicsPolygonItem;
34 bool isLowerBoundary);
37 virtual QVariant
itemChange (GraphicsItemChange change,
const QVariant &value);
49 void slotOtherMoved(
double xSceneOther);
61 void sendSignalMoved ();
64 void updateGeometryDivider ();
65 void updateGeometryNonPaddle ();
66 void updateGeometryPaddle ();
68 QGraphicsView &m_view;
73 QGraphicsLineItem *m_divider;
74 QGraphicsRectItem *m_shadedArea;
75 QGraphicsPolygonItem *m_arrow;
78 bool m_isLowerBoundary;
80 QPointF m_startDragPos;
83 #endif // VIEW_PROFILE_DIVIDER_H void signalMovedHigh(double xSceneOther)
Signal used when divider is dragged and m_isLowerBoundary is false.
void setX(double x, double xLow, double xHigh)
Set the position by specifying the new x coordinate.
void signalMovedLow(double xSceneOther)
Signal used when divider is dragged and m_isLowerBoundary is true.
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Intercept changes so divider movement can be restricted to horizontal direction only.
Divider that can be dragged, in a dialog QGraphicsView.
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Save paddle position at start of click-and-drag.