diff 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
line wrap: on
line diff
--- a/view/Pane.h	Fri Mar 27 14:36:11 2020 +0000
+++ b/view/Pane.h	Mon Mar 30 11:29:16 2020 +0100
@@ -30,6 +30,7 @@
 class Panner;
 class NotifyingPushButton;
 class KeyReference;
+class QMenu;
 
 class Pane : public View
 {
@@ -37,6 +38,8 @@
 
 public:
     Pane(QWidget *parent = 0);
+    virtual ~Pane();
+    
     virtual QString getPropertyContainerIconName() const override { return "pane"; }
 
     virtual bool shouldIlluminateLocalFeatures(const Layer *layer,
@@ -91,11 +94,12 @@
     virtual void modelAlignmentCompletionChanged(ModelId) override;
 
     // local slots, not overrides
-    virtual void horizontalThumbwheelMoved(int value);
-    virtual void verticalThumbwheelMoved(int value);
-    virtual void verticalZoomChanged();
-    virtual void verticalPannerMoved(float x, float y, float w, float h);
-    virtual void editVerticalPannerExtents();
+    void horizontalThumbwheelMoved(int value);
+    void verticalThumbwheelMoved(int value);
+    void verticalZoomChanged();
+    void verticalPannerMoved(float x, float y, float w, float h);
+    void verticalPannerContextMenuRequested(const QPoint &);
+    void editVerticalPannerExtents();
 
     virtual void layerParametersChanged() override;
 
@@ -207,6 +211,7 @@
     Thumbwheel *m_hthumb;
     Thumbwheel *m_vthumb;
     NotifyingPushButton *m_reset;
+    QMenu *m_lastVerticalPannerContextMenu;
 
     bool m_mouseInWidget;