From 94315fe3e612aabc4a0ea4dd4f5fff8ccc83a2f9 Mon Sep 17 00:00:00 2001 From: Peter L Jones Date: Tue, 1 Aug 2023 20:32:42 +0100 Subject: [PATCH] #1420 Fader Settings improvements --- src/clientdlg.cpp | 49 ++++++++++++++++++++++++++++++++++++++++++----- src/clientdlg.h | 8 +++++++- 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 7ae651e87e..98cf589c89 100644 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -298,9 +298,17 @@ CClientDlg::CClientDlg ( CClient* pNCliP, // Edit menu -------------------------------------------------------------- QMenu* pEditMenu = new QMenu ( tr ( "&Edit" ), this ); - pEditMenu->addAction ( tr ( "Clear &All Stored Solo and Mute Settings" ), this, SLOT ( OnClearAllStoredSoloMuteSettings() ) ); + QMenu* pFaderMenu = new QMenu ( tr ( "Stored &Fader Settings" ), this ); - pEditMenu->addAction ( tr ( "Set All Faders to New Client &Level" ), + pEditMenu->addMenu ( pFaderMenu ); + + pFaderMenu->addAction ( tr ( "Clear &All Stored Fader Settings" ), this, SLOT ( OnClearFaderAllSettings() ) ); + pFaderMenu->addAction ( tr ( "Clear Stored &Level Settings" ), this, SLOT ( OnClearFaderLevelSettings() ) ); + pFaderMenu->addAction ( tr ( "Clear Stored &Solo Settings" ), this, SLOT ( OnClearFaderSoloSettings() ) ); + pFaderMenu->addAction ( tr ( "Clear Stored &Mute Settings" ), this, SLOT ( OnClearFaderMuteSettings() ) ); + pFaderMenu->addAction ( tr ( "Clear Stored &Group ID Settings" ), this, SLOT ( OnClearFaderGroupIdSettings() ) ); + + pEditMenu->addAction ( tr ( "Set Current Faders to New Client &Level" ), this, SLOT ( OnSetAllFadersToNewClientLevel() ), QKeySequence ( Qt::CTRL + Qt::Key_L ) ); @@ -759,16 +767,47 @@ void CClientDlg::OnConnectDisconBut() } } -void CClientDlg::OnClearAllStoredSoloMuteSettings() +// if we are in an active connection, we first have to store all fader settings in +// the settings struct, clear the solo and mute states and then apply the settings again +void CClientDlg::OnClearFaderAllSettings() +{ + MainMixerBoard->StoreAllFaderSettings(); + pSettings->vecStoredFaderLevels.Reset ( false ); + pSettings->vecStoredFaderLevels.Reset ( false ); + pSettings->vecStoredFaderIsSolo.Reset ( false ); + pSettings->vecStoredFaderIsMute.Reset ( false ); + pSettings->vecStoredFaderTags.Reset ( QString() ); + MainMixerBoard->LoadAllFaderSettings(); +} + +void CClientDlg::OnClearFaderLevelSettings() +{ + MainMixerBoard->StoreAllFaderSettings(); + pSettings->vecStoredFaderLevels.Reset ( false ); + MainMixerBoard->LoadAllFaderSettings(); +} + +void CClientDlg::OnClearFaderSoloSettings() { - // if we are in an active connection, we first have to store all fader settings in - // the settings struct, clear the solo and mute states and then apply the settings again MainMixerBoard->StoreAllFaderSettings(); pSettings->vecStoredFaderIsSolo.Reset ( false ); + MainMixerBoard->LoadAllFaderSettings(); +} + +void CClientDlg::OnClearFaderMuteSettings() +{ + MainMixerBoard->StoreAllFaderSettings(); pSettings->vecStoredFaderIsMute.Reset ( false ); MainMixerBoard->LoadAllFaderSettings(); } +void CClientDlg::OnClearFaderGroupIdSettings() +{ + MainMixerBoard->StoreAllFaderSettings(); + pSettings->vecStoredFaderGroupID.Reset ( false ); + MainMixerBoard->LoadAllFaderSettings(); +} + void CClientDlg::OnLoadChannelSetup() { QString strFileName = QFileDialog::getOpenFileName ( this, tr ( "Select Channel Setup File" ), "", QString ( "*." ) + MIX_SETTINGS_FILE_SUFFIX ); diff --git a/src/clientdlg.h b/src/clientdlg.h index 69a77081db..de96a3e48d 100644 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -171,9 +171,15 @@ public slots: void OnSortChannelsByInstrument() { MainMixerBoard->SetFaderSorting ( ST_BY_INSTRUMENT ); } void OnSortChannelsByGroupID() { MainMixerBoard->SetFaderSorting ( ST_BY_GROUPID ); } void OnSortChannelsByCity() { MainMixerBoard->SetFaderSorting ( ST_BY_CITY ); } - void OnClearAllStoredSoloMuteSettings(); + + void OnClearFaderAllSettings(); + void OnClearFaderLevelSettings(); + void OnClearFaderSoloSettings(); + void OnClearFaderMuteSettings(); + void OnClearFaderGroupIdSettings(); void OnSetAllFadersToNewClientLevel() { MainMixerBoard->SetAllFaderLevelsToNewClientLevel(); } void OnAutoAdjustAllFaderLevels() { MainMixerBoard->AutoAdjustAllFaderLevels(); } + void OnNumMixerPanelRowsChanged ( int value ) { MainMixerBoard->SetNumMixerPanelRows ( value ); } void OnSettingsStateChanged ( int value );