Mercurial > hg > svgui
comparison view/Pane.h @ 133:9e6b3e239b9d
* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and
vertical depending on layer type (supported for waveform and spectrogram,
though wrong for log-scale spectrogram at the moment).
* Add bare bones of a spectrum layer.
* Add window icon
* Add shortcut for "insert time instant" on laptops without keypad enter (";")
* Delete FFT processing thread when it exits (at least, next time we're asked
for something interesting)
* Get audio file extensions from the file readers, and thus from libsndfile for
the wave file reader -- leads to rather a wide combo box in file dialog though
* Better refresh order for spectrogram (redraw centre section first)
author | Chris Cannam |
---|---|
date | Fri, 04 Aug 2006 17:01:37 +0000 |
parents | 5d3a483856ff |
children | a859b87162ca |
comparison
equal
deleted
inserted
replaced
132:5d3a483856ff | 133:9e6b3e239b9d |
---|---|
25 #include "base/Selection.h" | 25 #include "base/Selection.h" |
26 | 26 |
27 class QWidget; | 27 class QWidget; |
28 class QPaintEvent; | 28 class QPaintEvent; |
29 class Layer; | 29 class Layer; |
30 class Thumbwheel; | |
30 | 31 |
31 class Pane : public View | 32 class Pane : public View |
32 { | 33 { |
33 Q_OBJECT | 34 Q_OBJECT |
34 | 35 |
52 void paneInteractedWith(); | 53 void paneInteractedWith(); |
53 void rightButtonMenuRequested(QPoint position); | 54 void rightButtonMenuRequested(QPoint position); |
54 | 55 |
55 public slots: | 56 public slots: |
56 virtual void toolModeChanged(); | 57 virtual void toolModeChanged(); |
58 virtual void zoomWheelsEnabledChanged(); | |
59 virtual void zoomLevelChanged(); | |
57 | 60 |
58 virtual void horizontalThumbwheelMoved(int value); | 61 virtual void horizontalThumbwheelMoved(int value); |
59 virtual void verticalThumbwheelMoved(int value); | 62 virtual void verticalThumbwheelMoved(int value); |
63 virtual void verticalZoomChanged(); | |
64 | |
65 virtual void propertyContainerSelected(View *, PropertyContainer *pc); | |
60 | 66 |
61 protected: | 67 protected: |
62 virtual void paintEvent(QPaintEvent *e); | 68 virtual void paintEvent(QPaintEvent *e); |
63 virtual void mousePressEvent(QMouseEvent *e); | 69 virtual void mousePressEvent(QMouseEvent *e); |
64 virtual void mouseReleaseEvent(QMouseEvent *e); | 70 virtual void mouseReleaseEvent(QMouseEvent *e); |
65 virtual void mouseMoveEvent(QMouseEvent *e); | 71 virtual void mouseMoveEvent(QMouseEvent *e); |
66 virtual void mouseDoubleClickEvent(QMouseEvent *e); | 72 virtual void mouseDoubleClickEvent(QMouseEvent *e); |
67 virtual void leaveEvent(QEvent *e); | 73 virtual void leaveEvent(QEvent *e); |
68 virtual void wheelEvent(QWheelEvent *e); | 74 virtual void wheelEvent(QWheelEvent *e); |
75 virtual void resizeEvent(QResizeEvent *e); | |
69 | 76 |
70 Selection getSelectionAt(int x, bool &closeToLeft, bool &closeToRight) const; | 77 Selection getSelectionAt(int x, bool &closeToLeft, bool &closeToRight) const; |
71 | 78 |
72 bool editSelectionStart(QMouseEvent *e); | 79 bool editSelectionStart(QMouseEvent *e); |
73 bool editSelectionDrag(QMouseEvent *e); | 80 bool editSelectionDrag(QMouseEvent *e); |
74 bool editSelectionEnd(QMouseEvent *e); | 81 bool editSelectionEnd(QMouseEvent *e); |
75 bool selectionIsBeingEdited() const; | 82 bool selectionIsBeingEdited() const; |
83 | |
84 void updateHeadsUpDisplay(); | |
76 | 85 |
77 bool m_identifyFeatures; | 86 bool m_identifyFeatures; |
78 QPoint m_identifyPoint; | 87 QPoint m_identifyPoint; |
79 QPoint m_clickPos; | 88 QPoint m_clickPos; |
80 QPoint m_mousePos; | 89 QPoint m_mousePos; |
86 size_t m_dragCentreFrame; | 95 size_t m_dragCentreFrame; |
87 bool m_centreLineVisible; | 96 bool m_centreLineVisible; |
88 size_t m_selectionStartFrame; | 97 size_t m_selectionStartFrame; |
89 Selection m_editingSelection; | 98 Selection m_editingSelection; |
90 int m_editingSelectionEdge; | 99 int m_editingSelectionEdge; |
100 | |
101 QWidget *m_headsUpDisplay; | |
102 Thumbwheel *m_hthumb; | |
103 Thumbwheel *m_vthumb; | |
91 }; | 104 }; |
92 | 105 |
93 #endif | 106 #endif |
94 | 107 |