comparison view/Pane.h @ 1588:0f36e0eca6b0

Add right-button context menu to panner widget
author Chris Cannam
date Mon, 30 Mar 2020 11:29:16 +0100
parents 4f8c72adbf43
children 4739a1b2266f
comparison
equal deleted inserted replaced
1587:2108af725460 1588:0f36e0eca6b0
28 class Layer; 28 class Layer;
29 class Thumbwheel; 29 class Thumbwheel;
30 class Panner; 30 class Panner;
31 class NotifyingPushButton; 31 class NotifyingPushButton;
32 class KeyReference; 32 class KeyReference;
33 class QMenu;
33 34
34 class Pane : public View 35 class Pane : public View
35 { 36 {
36 Q_OBJECT 37 Q_OBJECT
37 38
38 public: 39 public:
39 Pane(QWidget *parent = 0); 40 Pane(QWidget *parent = 0);
41 virtual ~Pane();
42
40 virtual QString getPropertyContainerIconName() const override { return "pane"; } 43 virtual QString getPropertyContainerIconName() const override { return "pane"; }
41 44
42 virtual bool shouldIlluminateLocalFeatures(const Layer *layer, 45 virtual bool shouldIlluminateLocalFeatures(const Layer *layer,
43 QPoint &pos) const override; 46 QPoint &pos) const override;
44 virtual bool shouldIlluminateLocalSelection(QPoint &pos, 47 virtual bool shouldIlluminateLocalSelection(QPoint &pos,
89 virtual void zoomWheelsEnabledChanged() override; 92 virtual void zoomWheelsEnabledChanged() override;
90 virtual void viewZoomLevelChanged(View *, ZoomLevel, bool locked) override; 93 virtual void viewZoomLevelChanged(View *, ZoomLevel, bool locked) override;
91 virtual void modelAlignmentCompletionChanged(ModelId) override; 94 virtual void modelAlignmentCompletionChanged(ModelId) override;
92 95
93 // local slots, not overrides 96 // local slots, not overrides
94 virtual void horizontalThumbwheelMoved(int value); 97 void horizontalThumbwheelMoved(int value);
95 virtual void verticalThumbwheelMoved(int value); 98 void verticalThumbwheelMoved(int value);
96 virtual void verticalZoomChanged(); 99 void verticalZoomChanged();
97 virtual void verticalPannerMoved(float x, float y, float w, float h); 100 void verticalPannerMoved(float x, float y, float w, float h);
98 virtual void editVerticalPannerExtents(); 101 void verticalPannerContextMenuRequested(const QPoint &);
102 void editVerticalPannerExtents();
99 103
100 virtual void layerParametersChanged() override; 104 virtual void layerParametersChanged() override;
101 105
102 virtual void propertyContainerSelected(View *, PropertyContainer *pc) override; 106 virtual void propertyContainerSelected(View *, PropertyContainer *pc) override;
103 107
205 QWidget *m_headsUpDisplay; 209 QWidget *m_headsUpDisplay;
206 Panner *m_vpan; 210 Panner *m_vpan;
207 Thumbwheel *m_hthumb; 211 Thumbwheel *m_hthumb;
208 Thumbwheel *m_vthumb; 212 Thumbwheel *m_vthumb;
209 NotifyingPushButton *m_reset; 213 NotifyingPushButton *m_reset;
214 QMenu *m_lastVerticalPannerContextMenu;
210 215
211 bool m_mouseInWidget; 216 bool m_mouseInWidget;
212 217
213 bool m_playbackFrameMoveScheduled; 218 bool m_playbackFrameMoveScheduled;
214 sv_frame_t m_playbackFrameMoveTo; 219 sv_frame_t m_playbackFrameMoveTo;