Skip to content

Commit 3e69e53

Browse files
committed
#1420 Fader Settings improvements
1 parent fe88e3e commit 3e69e53

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 ) );
@@ -767,16 +775,47 @@ void CClientDlg::OnConnectDisconBut()
767775
}
768776
}
769777

770-
void CClientDlg::OnClearAllStoredSoloMuteSettings()
778+
// if we are in an active connection, we first have to store all fader settings in
779+
// the settings struct, clear the solo and mute states and then apply the settings again
780+
void CClientDlg::OnClearFaderAllSettings()
781+
{
782+
MainMixerBoard->StoreAllFaderSettings();
783+
pSettings->vecStoredFaderLevels.Reset ( false );
784+
pSettings->vecStoredFaderLevels.Reset ( false );
785+
pSettings->vecStoredFaderIsSolo.Reset ( false );
786+
pSettings->vecStoredFaderIsMute.Reset ( false );
787+
pSettings->vecStoredFaderTags.Reset ( QString() );
788+
MainMixerBoard->LoadAllFaderSettings();
789+
}
790+
791+
void CClientDlg::OnClearFaderLevelSettings()
792+
{
793+
MainMixerBoard->StoreAllFaderSettings();
794+
pSettings->vecStoredFaderLevels.Reset ( false );
795+
MainMixerBoard->LoadAllFaderSettings();
796+
}
797+
798+
void CClientDlg::OnClearFaderSoloSettings()
771799
{
772-
// if we are in an active connection, we first have to store all fader settings in
773-
// the settings struct, clear the solo and mute states and then apply the settings again
774800
MainMixerBoard->StoreAllFaderSettings();
775801
pSettings->vecStoredFaderIsSolo.Reset ( false );
802+
MainMixerBoard->LoadAllFaderSettings();
803+
}
804+
805+
void CClientDlg::OnClearFaderMuteSettings()
806+
{
807+
MainMixerBoard->StoreAllFaderSettings();
776808
pSettings->vecStoredFaderIsMute.Reset ( false );
777809
MainMixerBoard->LoadAllFaderSettings();
778810
}
779811

812+
void CClientDlg::OnClearFaderGroupIdSettings()
813+
{
814+
MainMixerBoard->StoreAllFaderSettings();
815+
pSettings->vecStoredFaderGroupID.Reset ( false );
816+
MainMixerBoard->LoadAllFaderSettings();
817+
}
818+
780819
void CClientDlg::OnLoadChannelSetup()
781820
{
782821
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
@@ -172,9 +172,15 @@ public slots:
172172
void OnSortChannelsByGroupID() { MainMixerBoard->SetFaderSorting ( ST_BY_GROUPID ); }
173173
void OnSortChannelsByCity() { MainMixerBoard->SetFaderSorting ( ST_BY_CITY ); }
174174
void OnSortChannelsByChannel() { MainMixerBoard->SetFaderSorting ( ST_BY_SERVER_CHANNEL ); }
175-
void OnClearAllStoredSoloMuteSettings();
175+
176+
void OnClearFaderAllSettings();
177+
void OnClearFaderLevelSettings();
178+
void OnClearFaderSoloSettings();
179+
void OnClearFaderMuteSettings();
180+
void OnClearFaderGroupIdSettings();
176181
void OnSetAllFadersToNewClientLevel() { MainMixerBoard->SetAllFaderLevelsToNewClientLevel(); }
177182
void OnAutoAdjustAllFaderLevels() { MainMixerBoard->AutoAdjustAllFaderLevels(); }
183+
178184
void OnNumMixerPanelRowsChanged ( int value ) { MainMixerBoard->SetNumMixerPanelRows ( value ); }
179185

180186
void OnSettingsStateChanged ( int value );

0 commit comments

Comments
 (0)