Mercurial > hg > svgui
comparison view/Pane.h @ 266:aee39d8c0b83
* more on measurement tool
author | Chris Cannam |
---|---|
date | Thu, 21 Jun 2007 14:05:23 +0000 |
parents | dae479593572 |
children | 4ed1446ad604 |
comparison
equal
deleted
inserted
replaced
265:a3a54632cd4c | 266:aee39d8c0b83 |
---|---|
86 virtual void mouseDoubleClickEvent(QMouseEvent *e); | 86 virtual void mouseDoubleClickEvent(QMouseEvent *e); |
87 virtual void leaveEvent(QEvent *e); | 87 virtual void leaveEvent(QEvent *e); |
88 virtual void wheelEvent(QWheelEvent *e); | 88 virtual void wheelEvent(QWheelEvent *e); |
89 virtual void resizeEvent(QResizeEvent *e); | 89 virtual void resizeEvent(QResizeEvent *e); |
90 | 90 |
91 // pull this out into another class at some point | |
92 | |
93 struct MeasureRect { | |
94 QPoint start; | |
95 QPoint end; | |
96 long startFrame; // only valid for a layer that hasTimeXAxis | |
97 long endFrame; // ditto | |
98 }; | |
99 | |
100 typedef std::vector<MeasureRect> MeasureRectList; // should be x-ordered | |
101 typedef std::map<Layer *, MeasureRectList> MeasureRectMap; | |
102 | |
91 void drawVerticalScale(QRect r, Layer *, QPainter &); | 103 void drawVerticalScale(QRect r, Layer *, QPainter &); |
92 void drawFeatureDescription(Layer *, QPainter &); | 104 void drawFeatureDescription(Layer *, QPainter &); |
93 void drawCentreLine(int, QPainter &); | 105 void drawCentreLine(int, QPainter &); |
94 void drawDurationAndRate(QRect, const Model *, int, QPainter &); | 106 void drawDurationAndRate(QRect, const Model *, int, QPainter &); |
95 void drawLayerNames(QRect, QPainter &); | 107 void drawLayerNames(QRect, QPainter &); |
96 void drawMeasurementRect(Layer *, QPainter &); | 108 void drawMeasurementRects(Layer *, QPainter &); |
109 void drawMeasurementRect(Layer *, MeasureRect &, QPainter &); | |
97 void drawEditingSelection(QPainter &); | 110 void drawEditingSelection(QPainter &); |
98 | 111 |
99 virtual bool render(QPainter &paint, int x0, size_t f0, size_t f1); | 112 virtual bool render(QPainter &paint, int x0, size_t f0, size_t f1); |
100 | 113 |
101 Selection getSelectionAt(int x, bool &closeToLeft, bool &closeToRight) const; | 114 Selection getSelectionAt(int x, bool &closeToLeft, bool &closeToRight) const; |
122 | 135 |
123 bool m_identifyFeatures; | 136 bool m_identifyFeatures; |
124 QPoint m_identifyPoint; | 137 QPoint m_identifyPoint; |
125 QPoint m_clickPos; | 138 QPoint m_clickPos; |
126 QPoint m_mousePos; | 139 QPoint m_mousePos; |
127 QPoint m_measureStart; | |
128 QPoint m_measureEnd; | |
129 bool m_clickedInRange; | 140 bool m_clickedInRange; |
130 bool m_shiftPressed; | 141 bool m_shiftPressed; |
131 bool m_ctrlPressed; | 142 bool m_ctrlPressed; |
132 bool m_haveMeasureRect; | 143 |
133 size_t m_measureCentreFrame; | 144 MeasureRectMap m_measureRects; |
145 MeasureRect m_draggingRect; | |
146 bool m_haveDraggingRect; | |
147 | |
134 bool m_navigating; | 148 bool m_navigating; |
135 bool m_resizing; | 149 bool m_resizing; |
136 size_t m_dragCentreFrame; | 150 size_t m_dragCentreFrame; |
137 float m_dragStartMinValue; | 151 float m_dragStartMinValue; |
138 bool m_centreLineVisible; | 152 bool m_centreLineVisible; |