Mercurial > hg > svapp
changeset 712:8e9702c0b9c7
Support updated PaneStack options API
author | Chris Cannam |
---|---|
date | Fri, 04 Oct 2019 13:52:48 +0100 |
parents | aee03ad6d3f6 |
children | ce698f8d0831 |
files | framework/MainWindowBase.cpp framework/MainWindowBase.h |
diffstat | 2 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Fri Oct 04 13:52:27 2019 +0100 +++ b/framework/MainWindowBase.cpp Fri Oct 04 13:52:48 2019 +0100 @@ -137,12 +137,13 @@ #undef Window #endif -MainWindowBase::MainWindowBase(SoundOptions options) : +MainWindowBase::MainWindowBase(SoundOptions soundOptions, + PaneStack::Options paneStackOptions) : m_document(nullptr), m_paneStack(nullptr), m_viewManager(nullptr), m_timeRulerLayer(nullptr), - m_soundOptions(options), + m_soundOptions(soundOptions), m_playSource(nullptr), m_recordTarget(nullptr), m_resamplerWrapper(nullptr), @@ -170,8 +171,8 @@ SVDEBUG << "MainWindowBase::MainWindowBase" << endl; - if (options & WithAudioInput) { - if (!(options & WithAudioOutput)) { + if (m_soundOptions & WithAudioInput) { + if (!(m_soundOptions & WithAudioOutput)) { SVCERR << "WARNING: MainWindowBase: WithAudioInput requires WithAudioOutput -- recording will not work" << endl; } } @@ -222,7 +223,7 @@ } #endif - m_paneStack = new PaneStack(nullptr, m_viewManager); + m_paneStack = new PaneStack(nullptr, m_viewManager, paneStackOptions); connect(m_paneStack, SIGNAL(currentPaneChanged(Pane *)), this, SLOT(currentPaneChanged(Pane *))); connect(m_paneStack, SIGNAL(currentLayerChanged(Pane *, Layer *)), @@ -3088,7 +3089,7 @@ void MainWindowBase::togglePropertyBoxes() { - if (m_paneStack->getLayoutStyle() == PaneStack::NoPropertyStacks) { + if (m_paneStack->getLayoutStyle() == PaneStack::HiddenPropertyStacksLayout) { if (Preferences::getInstance()->getPropertyBoxLayout() == Preferences::VerticallyStacked) { m_paneStack->setLayoutStyle(PaneStack::PropertyStackPerPaneLayout); @@ -3096,7 +3097,7 @@ m_paneStack->setLayoutStyle(PaneStack::SinglePropertyStackLayout); } } else { - m_paneStack->setLayoutStyle(PaneStack::NoPropertyStacks); + m_paneStack->setLayoutStyle(PaneStack::HiddenPropertyStacksLayout); } } @@ -3148,7 +3149,7 @@ MainWindowBase::preferenceChanged(PropertyContainer::PropertyName name) { if (name == "Property Box Layout") { - if (m_paneStack->getLayoutStyle() != PaneStack::NoPropertyStacks) { + if (m_paneStack->getLayoutStyle() != PaneStack::HiddenPropertyStacksLayout) { if (Preferences::getInstance()->getPropertyBoxLayout() == Preferences::VerticallyStacked) { m_paneStack->setLayoutStyle(PaneStack::PropertyStackPerPaneLayout);
--- a/framework/MainWindowBase.h Fri Oct 04 13:52:27 2019 +0100 +++ b/framework/MainWindowBase.h Fri Oct 04 13:52:48 2019 +0100 @@ -25,6 +25,7 @@ #include "base/Command.h" #include "view/ViewManager.h" +#include "view/PaneStack.h" #include "base/PropertyContainer.h" #include "base/RecentFiles.h" #include "base/FrameTimer.h" @@ -101,7 +102,8 @@ }; typedef int SoundOptions; - MainWindowBase(SoundOptions options = WithEverything); + MainWindowBase(SoundOptions soundOptions = WithEverything, + PaneStack::Options paneStackOptions = 0x0); virtual ~MainWindowBase(); enum AudioFileOpenMode {