# HG changeset patch # User Chris Cannam # Date 1143730822 0 # Node ID e1aad27029e329cba8e01fc485a4fab628a0aa7b # Parent 4d59dc469b0f4374524b60e042bbfad8c77f57a7 * 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) diff -r 4d59dc469b0f -r e1aad27029e3 base/View.cpp --- 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))); diff -r 4d59dc469b0f -r e1aad27029e3 base/View.h --- 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; } diff -r 4d59dc469b0f -r e1aad27029e3 base/ViewManager.cpp --- 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 diff -r 4d59dc469b0f -r e1aad27029e3 base/ViewManager.h --- 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