changeset 65:e1aad27029e3

* Add stub for item-edit dialog (for editing properties of an item on double- click) -- doesn't actually do anything yet * Add code to invoke said non-working item-edit dialog on double-click in time-value, time-instants and note layers * Add overlay mode (no text, basic text, all text)
author Chris Cannam
date Thu, 30 Mar 2006 15:00:22 +0000
parents 4d59dc469b0f
children 7afcfe666910
files base/View.cpp base/View.h base/ViewManager.cpp base/ViewManager.h
diffstat 4 files changed, 27 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/base/View.cpp	Thu Mar 30 13:18:11 2006 +0000
+++ b/base/View.cpp	Thu Mar 30 15:00:22 2006 +0000
@@ -455,6 +455,8 @@
 	    this, SLOT(selectionChanged()));
     connect(m_manager, SIGNAL(inProgressSelectionChanged()),
 	    this, SLOT(selectionChanged()));
+    connect(m_manager, SIGNAL(overlayModeChanged()),
+            this, SLOT(update()));
 
     connect(this, SIGNAL(centreFrameChanged(void *, unsigned long, bool)),
 	    m_manager, SIGNAL(centreFrameChanged(void *, unsigned long, bool)));
--- a/base/View.h	Thu Mar 30 13:18:11 2006 +0000
+++ b/base/View.h	Thu Mar 30 15:00:22 2006 +0000
@@ -163,6 +163,7 @@
     virtual const Layer *getSelectedLayer() const;
 
     virtual void setViewManager(ViewManager *m);
+    virtual ViewManager *getViewManager() const { return m_manager; }
 
     virtual void setFollowGlobalPan(bool f);
     virtual bool getFollowGlobalPan() const { return m_followPan; }
--- a/base/ViewManager.cpp	Thu Mar 30 13:18:11 2006 +0000
+++ b/base/ViewManager.cpp	Thu Mar 30 15:00:22 2006 +0000
@@ -33,7 +33,8 @@
     m_inProgressExclusive(true),
     m_toolMode(NavigateMode),
     m_playLoopMode(false),
-    m_playSelectionMode(false)
+    m_playSelectionMode(false),
+    m_overlayMode(BasicOverlays)
 {
     connect(this, 
 	    SIGNAL(centreFrameChanged(void *, unsigned long, bool)),
@@ -341,6 +342,15 @@
 #endif
 }
 
+void
+ViewManager::setOverlayMode(OverlayMode mode)
+{
+    if (m_overlayMode != mode) {
+        m_overlayMode = mode;
+        emit overlayModeChanged();
+    }
+}
+
 #ifdef INCLUDE_MOCFILES
 #include "ViewManager.moc.cpp"
 #endif
--- a/base/ViewManager.h	Thu Mar 30 13:18:11 2006 +0000
+++ b/base/ViewManager.h	Thu Mar 30 15:00:22 2006 +0000
@@ -93,6 +93,14 @@
     size_t getMainModelSampleRate() const { return m_mainModelSampleRate; }
     void setMainModelSampleRate(size_t sr) { m_mainModelSampleRate = sr; }
 
+    enum OverlayMode {
+        NoOverlays,
+        BasicOverlays,
+        AllOverlays
+    };
+    void setOverlayMode(OverlayMode mode);
+    OverlayMode getOverlayMode() const { return m_overlayMode; }
+
 signals:
     /** Emitted when a widget pans.  The originator identifies the widget. */
     void centreFrameChanged(void *originator, unsigned long frame, bool locked);
@@ -121,6 +129,9 @@
     /** Emitted when the play selection mode has been changed. */
     void playSelectionModeChanged();
 
+    /** Emitted when the overlay mode has been changed. */
+    void overlayModeChanged();
+
 protected slots:
     void checkPlayStatus();
     void playStatusChanged(bool playing);
@@ -163,6 +174,8 @@
 	MultiSelection m_oldSelection;
 	MultiSelection m_newSelection;
     };
+
+    OverlayMode m_overlayMode;
 };
 
 #endif