Skip to content

Commit 86893e3

Browse files
committed
#1420 Fader Settings improvements
1 parent e462529 commit 86893e3

File tree

2 files changed

+51
-6
lines changed

2 files changed

+51
-6
lines changed

src/clientdlg.cpp

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,17 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
298298
// Edit menu --------------------------------------------------------------
299299
QMenu* pEditMenu = new QMenu ( tr ( "&Edit" ), this );
300300

301-
pEditMenu->addAction ( tr ( "Clear &All Stored Solo and Mute Settings" ), this, SLOT ( OnClearAllStoredSoloMuteSettings() ) );
301+
QMenu* pFaderMenu = new QMenu ( tr ( "Stored &Fader Settings" ), this );
302302

303-
pEditMenu->addAction ( tr ( "Set All Faders to New Client &Level" ),
303+
pEditMenu->addMenu ( pFaderMenu );
304+
305+
pFaderMenu->addAction ( tr ( "Clear &All Stored Fader Settings" ), this, SLOT ( OnClearFaderAllSettings() ) );
306+
pFaderMenu->addAction ( tr ( "Clear Stored &Level Settings" ), this, SLOT ( OnClearFaderLevelSettings() ) );
307+
pFaderMenu->addAction ( tr ( "Clear Stored &Solo Settings" ), this, SLOT ( OnClearFaderSoloSettings() ) );
308+
pFaderMenu->addAction ( tr ( "Clear Stored &Mute Settings" ), this, SLOT ( OnClearFaderMuteSettings() ) );
309+
pFaderMenu->addAction ( tr ( "Clear Stored &Group ID Settings" ), this, SLOT ( OnClearFaderGroupIdSettings() ) );
310+
311+
pEditMenu->addAction ( tr ( "Set Current Faders to New Client &Level" ),
304312
this,
305313
SLOT ( OnSetAllFadersToNewClientLevel() ),
306314
QKeySequence ( Qt::CTRL + Qt::Key_L ) );
@@ -759,16 +767,47 @@ void CClientDlg::OnConnectDisconBut()
759767
}
760768
}
761769

762-
void CClientDlg::OnClearAllStoredSoloMuteSettings()
770+
// if we are in an active connection, we first have to store all fader settings in
771+
// the settings struct, clear the solo and mute states and then apply the settings again
772+
void CClientDlg::OnClearFaderAllSettings()
773+
{
774+
MainMixerBoard->StoreAllFaderSettings();
775+
pSettings->vecStoredFaderLevels.Reset ( false );
776+
pSettings->vecStoredFaderLevels.Reset ( false );
777+
pSettings->vecStoredFaderIsSolo.Reset ( false );
778+
pSettings->vecStoredFaderIsMute.Reset ( false );
779+
pSettings->vecStoredFaderTags.Reset ( QString() );
780+
MainMixerBoard->LoadAllFaderSettings();
781+
}
782+
783+
void CClientDlg::OnClearFaderLevelSettings()
784+
{
785+
MainMixerBoard->StoreAllFaderSettings();
786+
pSettings->vecStoredFaderLevels.Reset ( false );
787+
MainMixerBoard->LoadAllFaderSettings();
788+
}
789+
790+
void CClientDlg::OnClearFaderSoloSettings()
763791
{
764-
// if we are in an active connection, we first have to store all fader settings in
765-
// the settings struct, clear the solo and mute states and then apply the settings again
766792
MainMixerBoard->StoreAllFaderSettings();
767793
pSettings->vecStoredFaderIsSolo.Reset ( false );
794+
MainMixerBoard->LoadAllFaderSettings();
795+
}
796+
797+
void CClientDlg::OnClearFaderMuteSettings()
798+
{
799+
MainMixerBoard->StoreAllFaderSettings();
768800
pSettings->vecStoredFaderIsMute.Reset ( false );
769801
MainMixerBoard->LoadAllFaderSettings();
770802
}
771803

804+
void CClientDlg::OnClearFaderGroupIdSettings()
805+
{
806+
MainMixerBoard->StoreAllFaderSettings();
807+
pSettings->vecStoredFaderGroupID.Reset ( false );
808+
MainMixerBoard->LoadAllFaderSettings();
809+
}
810+
772811
void CClientDlg::OnLoadChannelSetup()
773812
{
774813
QString strFileName = QFileDialog::getOpenFileName ( this, tr ( "Select Channel Setup File" ), "", QString ( "*." ) + MIX_SETTINGS_FILE_SUFFIX );

src/clientdlg.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,15 @@ public slots:
171171
void OnSortChannelsByInstrument() { MainMixerBoard->SetFaderSorting ( ST_BY_INSTRUMENT ); }
172172
void OnSortChannelsByGroupID() { MainMixerBoard->SetFaderSorting ( ST_BY_GROUPID ); }
173173
void OnSortChannelsByCity() { MainMixerBoard->SetFaderSorting ( ST_BY_CITY ); }
174-
void OnClearAllStoredSoloMuteSettings();
174+
175+
void OnClearFaderAllSettings();
176+
void OnClearFaderLevelSettings();
177+
void OnClearFaderSoloSettings();
178+
void OnClearFaderMuteSettings();
179+
void OnClearFaderGroupIdSettings();
175180
void OnSetAllFadersToNewClientLevel() { MainMixerBoard->SetAllFaderLevelsToNewClientLevel(); }
176181
void OnAutoAdjustAllFaderLevels() { MainMixerBoard->AutoAdjustAllFaderLevels(); }
182+
177183
void OnNumMixerPanelRowsChanged ( int value ) { MainMixerBoard->SetNumMixerPanelRows ( value ); }
178184

179185
void OnSettingsStateChanged ( int value );

0 commit comments

Comments
 (0)