diff --git a/src/client.cpp b/src/client.cpp index fa3e3e50..7330603e 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -33,24 +33,7 @@ CClient::CClient ( const quint16 iPortNumber, const QString& strNClientName ) : vstrIPAddress ( MAX_NUM_SERVER_ADDR_ITEMS, "" ), ChannelInfo (), - vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ), - vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ), - vecStoredPanValues ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_PAN_MAX / 2 ), - vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ), - vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ), - vecStoredFaderGroupID ( MAX_NUM_STORED_FADER_SETTINGS, INVALID_INDEX ), - iNewClientFaderLevel ( 100 ), - bConnectDlgShowAllMusicians ( true ), strClientName ( strNClientName ), - vecWindowPosMain (), // empty array - vecWindowPosSettings (), // empty array - vecWindowPosChat (), // empty array - vecWindowPosProfile (), // empty array - vecWindowPosConnect (), // empty array - bWindowWasShownSettings ( false ), - bWindowWasShownChat ( false ), - bWindowWasShownProfile ( false ), - bWindowWasShownConnect ( false ), Channel ( false ), /* we need a client channel -> "false" */ CurOpusEncoder ( nullptr ), CurOpusDecoder ( nullptr ), diff --git a/src/client.h b/src/client.h index 675fe41c..52a73b72 100755 --- a/src/client.h +++ b/src/client.h @@ -280,27 +280,8 @@ public: // settings CVector vstrIPAddress; CChannelCoreInfo ChannelInfo; - CVector vecStoredFaderTags; - CVector vecStoredFaderLevels; - CVector vecStoredPanValues; - CVector vecStoredFaderIsSolo; - CVector vecStoredFaderIsMute; - CVector vecStoredFaderGroupID; - int iNewClientFaderLevel; - bool bConnectDlgShowAllMusicians; QString strClientName; - // window position/state settings - QByteArray vecWindowPosMain; - QByteArray vecWindowPosSettings; - QByteArray vecWindowPosChat; - QByteArray vecWindowPosProfile; - QByteArray vecWindowPosConnect; - bool bWindowWasShownSettings; - bool bWindowWasShownChat; - bool bWindowWasShownProfile; - bool bWindowWasShownConnect; - #ifdef LLCON_VST_PLUGIN // VST version must have direct access to sound object CSound* GetSound() { return &Sound; } diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index df1d08c6..820bb1fb 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -39,7 +39,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP, pSettings ( pNSetP ), bConnectDlgWasShown ( false ), bMIDICtrlUsed ( iCtrlMIDIChannel != INVALID_MIDI_CH ), - ClientSettingsDlg ( pNCliP, parent, Qt::Window ), + ClientSettingsDlg ( pNCliP, pNSetP, parent, Qt::Window ), ChatDlg ( parent, Qt::Window ), ConnectDlg ( pNCliP, bNewShowComplRegConnList, parent, Qt::Dialog ), AnalyzerConsole ( pNCliP, parent, Qt::Window ), @@ -189,13 +189,13 @@ CClientDlg::CClientDlg ( CClient* pNCliP, MainMixerBoard->SetDisplayChannelLevels ( pClient->GetDisplayChannelLevels() ); // restore fader settings - MainMixerBoard->vecStoredFaderTags = pClient->vecStoredFaderTags; - MainMixerBoard->vecStoredFaderLevels = pClient->vecStoredFaderLevels; - MainMixerBoard->vecStoredPanValues = pClient->vecStoredPanValues; - MainMixerBoard->vecStoredFaderIsSolo = pClient->vecStoredFaderIsSolo; - MainMixerBoard->vecStoredFaderIsMute = pClient->vecStoredFaderIsMute; - MainMixerBoard->vecStoredFaderGroupID = pClient->vecStoredFaderGroupID; - MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel; + MainMixerBoard->vecStoredFaderTags = pSettings->vecStoredFaderTags; + MainMixerBoard->vecStoredFaderLevels = pSettings->vecStoredFaderLevels; + MainMixerBoard->vecStoredPanValues = pSettings->vecStoredPanValues; + MainMixerBoard->vecStoredFaderIsSolo = pSettings->vecStoredFaderIsSolo; + MainMixerBoard->vecStoredFaderIsMute = pSettings->vecStoredFaderIsMute; + MainMixerBoard->vecStoredFaderGroupID = pSettings->vecStoredFaderGroupID; + MainMixerBoard->iNewClientFaderLevel = pSettings->iNewClientFaderLevel; // init status label OnTimerStatus(); @@ -226,7 +226,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP, UpdateRevSelection(); // init connect dialog - ConnectDlg.SetShowAllMusicians ( pClient->bConnectDlgShowAllMusicians ); + ConnectDlg.SetShowAllMusicians ( pSettings->bConnectDlgShowAllMusicians ); // set window title (with no clients connected -> "0") SetMyWindowTitle ( 0 ); @@ -370,48 +370,48 @@ CClientDlg::CClientDlg ( CClient* pNCliP, // Window positions -------------------------------------------------------- // main window - if ( !pClient->vecWindowPosMain.isEmpty() && !pClient->vecWindowPosMain.isNull() ) + if ( !pSettings->vecWindowPosMain.isEmpty() && !pSettings->vecWindowPosMain.isNull() ) { - restoreGeometry ( pClient->vecWindowPosMain ); + restoreGeometry ( pSettings->vecWindowPosMain ); } // settings window - if ( !pClient->vecWindowPosSettings.isEmpty() && !pClient->vecWindowPosSettings.isNull() ) + if ( !pSettings->vecWindowPosSettings.isEmpty() && !pSettings->vecWindowPosSettings.isNull() ) { - ClientSettingsDlg.restoreGeometry ( pClient->vecWindowPosSettings ); + ClientSettingsDlg.restoreGeometry ( pSettings->vecWindowPosSettings ); } - if ( pClient->bWindowWasShownSettings ) + if ( pSettings->bWindowWasShownSettings ) { ShowGeneralSettings(); } // chat window - if ( !pClient->vecWindowPosChat.isEmpty() && !pClient->vecWindowPosChat.isNull() ) + if ( !pSettings->vecWindowPosChat.isEmpty() && !pSettings->vecWindowPosChat.isNull() ) { - ChatDlg.restoreGeometry ( pClient->vecWindowPosChat ); + ChatDlg.restoreGeometry ( pSettings->vecWindowPosChat ); } - if ( pClient->bWindowWasShownChat ) + if ( pSettings->bWindowWasShownChat ) { ShowChatWindow(); } // musician profile window - if ( !pClient->vecWindowPosProfile.isEmpty() && !pClient->vecWindowPosProfile.isNull() ) + if ( !pSettings->vecWindowPosProfile.isEmpty() && !pSettings->vecWindowPosProfile.isNull() ) { - MusicianProfileDlg.restoreGeometry ( pClient->vecWindowPosProfile ); + MusicianProfileDlg.restoreGeometry ( pSettings->vecWindowPosProfile ); } - if ( pClient->bWindowWasShownProfile ) + if ( pSettings->bWindowWasShownProfile ) { ShowMusicianProfileDialog(); } // connection setup window - if ( !pClient->vecWindowPosConnect.isEmpty() && !pClient->vecWindowPosConnect.isNull() ) + if ( !pSettings->vecWindowPosConnect.isEmpty() && !pSettings->vecWindowPosConnect.isNull() ) { - ConnectDlg.restoreGeometry ( pClient->vecWindowPosConnect ); + ConnectDlg.restoreGeometry ( pSettings->vecWindowPosConnect ); } @@ -564,7 +564,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP, TimerStatus.start ( LED_BAR_UPDATE_TIME_MS ); // restore connect dialog - if ( pClient->bWindowWasShownConnect ) + if ( pSettings->bWindowWasShownConnect ) { ShowConnectionSetupDialog(); } @@ -573,16 +573,16 @@ CClientDlg::CClientDlg ( CClient* pNCliP, void CClientDlg::closeEvent ( QCloseEvent* Event ) { // store window positions - pClient->vecWindowPosMain = saveGeometry(); - pClient->vecWindowPosSettings = ClientSettingsDlg.saveGeometry(); - pClient->vecWindowPosChat = ChatDlg.saveGeometry(); - pClient->vecWindowPosProfile = MusicianProfileDlg.saveGeometry(); - pClient->vecWindowPosConnect = ConnectDlg.saveGeometry(); + pSettings->vecWindowPosMain = saveGeometry(); + pSettings->vecWindowPosSettings = ClientSettingsDlg.saveGeometry(); + pSettings->vecWindowPosChat = ChatDlg.saveGeometry(); + pSettings->vecWindowPosProfile = MusicianProfileDlg.saveGeometry(); + pSettings->vecWindowPosConnect = ConnectDlg.saveGeometry(); - pClient->bWindowWasShownSettings = ClientSettingsDlg.isVisible(); - pClient->bWindowWasShownChat = ChatDlg.isVisible(); - pClient->bWindowWasShownProfile = MusicianProfileDlg.isVisible(); - pClient->bWindowWasShownConnect = ConnectDlg.isVisible(); + pSettings->bWindowWasShownSettings = ClientSettingsDlg.isVisible(); + pSettings->bWindowWasShownChat = ChatDlg.isVisible(); + pSettings->bWindowWasShownProfile = MusicianProfileDlg.isVisible(); + pSettings->bWindowWasShownConnect = ConnectDlg.isVisible(); // if settings/connect dialog or chat dialog is open, close it ClientSettingsDlg.close(); @@ -601,14 +601,14 @@ void CClientDlg::closeEvent ( QCloseEvent* Event ) // initiate a storage of the current mixer fader levels in case we are // just in a connected state) and other settings MainMixerBoard->HideAll(); - pClient->vecStoredFaderTags = MainMixerBoard->vecStoredFaderTags; - pClient->vecStoredFaderLevels = MainMixerBoard->vecStoredFaderLevels; - pClient->vecStoredPanValues = MainMixerBoard->vecStoredPanValues; - pClient->vecStoredFaderIsSolo = MainMixerBoard->vecStoredFaderIsSolo; - pClient->vecStoredFaderIsMute = MainMixerBoard->vecStoredFaderIsMute; - pClient->vecStoredFaderGroupID = MainMixerBoard->vecStoredFaderGroupID; - pClient->iNewClientFaderLevel = MainMixerBoard->iNewClientFaderLevel; - pClient->bConnectDlgShowAllMusicians = ConnectDlg.GetShowAllMusicians(); + pSettings->vecStoredFaderTags = MainMixerBoard->vecStoredFaderTags; + pSettings->vecStoredFaderLevels = MainMixerBoard->vecStoredFaderLevels; + pSettings->vecStoredPanValues = MainMixerBoard->vecStoredPanValues; + pSettings->vecStoredFaderIsSolo = MainMixerBoard->vecStoredFaderIsSolo; + pSettings->vecStoredFaderIsMute = MainMixerBoard->vecStoredFaderIsMute; + pSettings->vecStoredFaderGroupID = MainMixerBoard->vecStoredFaderGroupID; + pSettings->iNewClientFaderLevel = MainMixerBoard->iNewClientFaderLevel; + pSettings->bConnectDlgShowAllMusicians = ConnectDlg.GetShowAllMusicians(); // default implementation of this event handler routine Event->accept(); diff --git a/src/clientdlg.h b/src/clientdlg.h index 79f16f77..ff58cbbf 100755 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -230,7 +230,7 @@ public slots: void OnAudioChannelsChanged() { UpdateRevSelection(); } void OnNumClientsChanged ( int iNewNumClients ); - void OnNewClientLevelChanged() { MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel; } + void OnNewClientLevelChanged() { MainMixerBoard->iNewClientFaderLevel = pSettings->iNewClientFaderLevel; } void accept() { close(); } // introduced by pljones diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index 26315b8e..11b841cb 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -26,8 +26,13 @@ /* Implementation *************************************************************/ -CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, - Qt::WindowFlags f ) : QDialog ( parent, f ), pClient ( pNCliP ) +CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, + CClientSettings* pNSetP, + QWidget* parent, + Qt::WindowFlags f ) : + QDialog ( parent, f ), + pClient ( pNCliP ), + pSettings ( pNSetP ) { setupUi ( this ); @@ -340,7 +345,7 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, edtCentralServerAddress->setText ( pClient->GetServerListCentralServerAddress() ); // update new client fader level edit box - edtNewClientLevel->setText ( QString::number ( pClient->iNewClientFaderLevel ) ); + edtNewClientLevel->setText ( QString::number ( pSettings->iNewClientFaderLevel ) ); // update enable small network buffers check box chbEnableOPUS64->setCheckState ( pClient->GetEnableOPUS64() ? Qt::Checked : Qt::Unchecked ); @@ -671,8 +676,7 @@ void CClientSettingsDlg::OnCentralServerAddressEditingFinished() void CClientSettingsDlg::OnNewClientLevelEditingFinished() { // store new setting in the client - pClient->iNewClientFaderLevel = - edtNewClientLevel->text().toInt(); + pSettings->iNewClientFaderLevel = edtNewClientLevel->text().toInt(); // inform that the level has changed and the mixer board settings must // be updated diff --git a/src/clientsettingsdlg.h b/src/clientsettingsdlg.h index 3d699e57..6a589e8e 100755 --- a/src/clientsettingsdlg.h +++ b/src/clientsettingsdlg.h @@ -39,6 +39,7 @@ #include #include "global.h" #include "client.h" +#include "settings.h" #include "multicolorled.h" #include "ui_clientsettingsdlgbase.h" @@ -54,9 +55,10 @@ class CClientSettingsDlg : public QDialog, private Ui_CClientSettingsDlgBase Q_OBJECT public: - CClientSettingsDlg ( CClient* pNCliP, - QWidget* parent = nullptr, - Qt::WindowFlags f = nullptr ); + CClientSettingsDlg ( CClient* pNCliP, + CClientSettings* pNSetP, + QWidget* parent = nullptr, + Qt::WindowFlags f = nullptr ); void SetStatus ( const CMultiColorLED::ELightColor eStatus ) { ledNetw->SetLight ( eStatus ); } @@ -76,14 +78,15 @@ protected: void UpdateJitterBufferFrame(); void UpdateSoundCardFrame(); void UpdateSoundChannelSelectionFrame(); - QString GenSndCrdBufferDelayString ( const int iFrameSize, + QString GenSndCrdBufferDelayString ( const int iFrameSize, const QString strAddText = "" ); virtual void showEvent ( QShowEvent* ) { UpdateDisplay(); } - CClient* pClient; - QTimer TimerStatus; - QButtonGroup SndCrdBufferDelayButtonGroup; + CClient* pClient; + CClientSettings* pSettings; + QTimer TimerStatus; + QButtonGroup SndCrdBufferDelayButtonGroup; public slots: void OnTimerStatus() { UpdateDisplay(); } diff --git a/src/settings.cpp b/src/settings.cpp index 21c8b057..915f4395 100755 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -229,7 +229,7 @@ void CClientSettings::ReadFromXML ( const QDomDocument& IniXMLDocument ) // stored fader tags for ( iIdx = 0; iIdx < MAX_NUM_STORED_FADER_SETTINGS; iIdx++ ) { - pClient->vecStoredFaderTags[iIdx] = FromBase64ToString ( + vecStoredFaderTags[iIdx] = FromBase64ToString ( GetIniSetting ( IniXMLDocument, "client", QString ( "storedfadertag%1_base64" ).arg ( iIdx ), "" ) ); } @@ -241,7 +241,7 @@ void CClientSettings::ReadFromXML ( const QDomDocument& IniXMLDocument ) QString ( "storedfaderlevel%1" ).arg ( iIdx ), 0, AUD_MIX_FADER_MAX, iValue ) ) { - pClient->vecStoredFaderLevels[iIdx] = iValue; + vecStoredFaderLevels[iIdx] = iValue; } } @@ -252,7 +252,7 @@ void CClientSettings::ReadFromXML ( const QDomDocument& IniXMLDocument ) QString ( "storedpanvalue%1" ).arg ( iIdx ), 0, AUD_MIX_PAN_MAX, iValue ) ) { - pClient->vecStoredPanValues[iIdx] = iValue; + vecStoredPanValues[iIdx] = iValue; } } @@ -263,7 +263,7 @@ void CClientSettings::ReadFromXML ( const QDomDocument& IniXMLDocument ) QString ( "storedfaderissolo%1" ).arg ( iIdx ), bValue ) ) { - pClient->vecStoredFaderIsSolo[iIdx] = bValue; + vecStoredFaderIsSolo[iIdx] = bValue; } } @@ -274,7 +274,7 @@ void CClientSettings::ReadFromXML ( const QDomDocument& IniXMLDocument ) QString ( "storedfaderismute%1" ).arg ( iIdx ), bValue ) ) { - pClient->vecStoredFaderIsMute[iIdx] = bValue; + vecStoredFaderIsMute[iIdx] = bValue; } } @@ -286,7 +286,7 @@ void CClientSettings::ReadFromXML ( const QDomDocument& IniXMLDocument ) QString ( "storedgroupid%1" ).arg ( iIdx ), 0, MAX_NUM_FADER_GROUPS - 1, iValue ) ) { - pClient->vecStoredFaderGroupID[iIdx] = iValue; + vecStoredFaderGroupID[iIdx] = iValue; } } @@ -294,13 +294,13 @@ void CClientSettings::ReadFromXML ( const QDomDocument& IniXMLDocument ) if ( GetNumericIniSet ( IniXMLDocument, "client", "newclientlevel", 0, 100, iValue ) ) { - pClient->iNewClientFaderLevel = iValue; + iNewClientFaderLevel = iValue; } // connect dialog show all musicians if ( GetFlagIniSet ( IniXMLDocument, "client", "connectdlgshowallmusicians", bValue ) ) { - pClient->bConnectDlgShowAllMusicians = bValue; + bConnectDlgShowAllMusicians = bValue; } // name @@ -501,47 +501,47 @@ if ( GetFlagIniSet ( IniXMLDocument, "client", "defcentservaddr", bValue ) ) } // window position of the main window - pClient->vecWindowPosMain = FromBase64ToByteArray ( + vecWindowPosMain = FromBase64ToByteArray ( GetIniSetting ( IniXMLDocument, "client", "winposmain_base64" ) ); // window position of the settings window - pClient->vecWindowPosSettings = FromBase64ToByteArray ( + vecWindowPosSettings = FromBase64ToByteArray ( GetIniSetting ( IniXMLDocument, "client", "winposset_base64" ) ); // window position of the chat window - pClient->vecWindowPosChat = FromBase64ToByteArray ( + vecWindowPosChat = FromBase64ToByteArray ( GetIniSetting ( IniXMLDocument, "client", "winposchat_base64" ) ); // window position of the musician profile window - pClient->vecWindowPosProfile = FromBase64ToByteArray ( + vecWindowPosProfile = FromBase64ToByteArray ( GetIniSetting ( IniXMLDocument, "client", "winposprofile_base64" ) ); // window position of the connect window - pClient->vecWindowPosConnect = FromBase64ToByteArray ( + vecWindowPosConnect = FromBase64ToByteArray ( GetIniSetting ( IniXMLDocument, "client", "winposcon_base64" ) ); // visibility state of the settings window if ( GetFlagIniSet ( IniXMLDocument, "client", "winvisset", bValue ) ) { - pClient->bWindowWasShownSettings = bValue; + bWindowWasShownSettings = bValue; } // visibility state of the chat window if ( GetFlagIniSet ( IniXMLDocument, "client", "winvischat", bValue ) ) { - pClient->bWindowWasShownChat = bValue; + bWindowWasShownChat = bValue; } // visibility state of the musician profile window if ( GetFlagIniSet ( IniXMLDocument, "client", "winvisprofile", bValue ) ) { - pClient->bWindowWasShownProfile = bValue; + bWindowWasShownProfile = bValue; } // visibility state of the connect window if ( GetFlagIniSet ( IniXMLDocument, "client", "winviscon", bValue ) ) { - pClient->bWindowWasShownConnect = bValue; + bWindowWasShownConnect = bValue; } } @@ -562,7 +562,7 @@ void CClientSettings::WriteToXML ( QDomDocument& IniXMLDocument ) { PutIniSetting ( IniXMLDocument, "client", QString ( "storedfadertag%1_base64" ).arg ( iIdx ), - ToBase64 ( pClient->vecStoredFaderTags[iIdx] ) ); + ToBase64 ( vecStoredFaderTags[iIdx] ) ); } // stored fader levels @@ -570,7 +570,7 @@ void CClientSettings::WriteToXML ( QDomDocument& IniXMLDocument ) { SetNumericIniSet ( IniXMLDocument, "client", QString ( "storedfaderlevel%1" ).arg ( iIdx ), - pClient->vecStoredFaderLevels[iIdx] ); + vecStoredFaderLevels[iIdx] ); } // stored pan values @@ -578,7 +578,7 @@ void CClientSettings::WriteToXML ( QDomDocument& IniXMLDocument ) { SetNumericIniSet ( IniXMLDocument, "client", QString ( "storedpanvalue%1" ).arg ( iIdx ), - pClient->vecStoredPanValues[iIdx] ); + vecStoredPanValues[iIdx] ); } // stored fader solo states @@ -586,7 +586,7 @@ void CClientSettings::WriteToXML ( QDomDocument& IniXMLDocument ) { SetFlagIniSet ( IniXMLDocument, "client", QString ( "storedfaderissolo%1" ).arg ( iIdx ), - pClient->vecStoredFaderIsSolo[iIdx] != 0 ); + vecStoredFaderIsSolo[iIdx] != 0 ); } // stored fader muted states @@ -594,7 +594,7 @@ void CClientSettings::WriteToXML ( QDomDocument& IniXMLDocument ) { SetFlagIniSet ( IniXMLDocument, "client", QString ( "storedfaderismute%1" ).arg ( iIdx ), - pClient->vecStoredFaderIsMute[iIdx] != 0 ); + vecStoredFaderIsMute[iIdx] != 0 ); } // stored fader group ID @@ -602,16 +602,16 @@ void CClientSettings::WriteToXML ( QDomDocument& IniXMLDocument ) { SetNumericIniSet ( IniXMLDocument, "client", QString ( "storedgroupid%1" ).arg ( iIdx ), - pClient->vecStoredFaderGroupID[iIdx] ); + vecStoredFaderGroupID[iIdx] ); } // new client level SetNumericIniSet ( IniXMLDocument, "client", "newclientlevel", - pClient->iNewClientFaderLevel ); + iNewClientFaderLevel ); // connect dialog show all musicians SetFlagIniSet ( IniXMLDocument, "client", "connectdlgshowallmusicians", - pClient->bConnectDlgShowAllMusicians ); + bConnectDlgShowAllMusicians ); // name PutIniSetting ( IniXMLDocument, "client", "name_base64", @@ -711,39 +711,39 @@ void CClientSettings::WriteToXML ( QDomDocument& IniXMLDocument ) // window position of the main window PutIniSetting ( IniXMLDocument, "client", "winposmain_base64", - ToBase64 ( pClient->vecWindowPosMain ) ); + ToBase64 ( vecWindowPosMain ) ); // window position of the settings window PutIniSetting ( IniXMLDocument, "client", "winposset_base64", - ToBase64 ( pClient->vecWindowPosSettings ) ); + ToBase64 ( vecWindowPosSettings ) ); // window position of the chat window PutIniSetting ( IniXMLDocument, "client", "winposchat_base64", - ToBase64 ( pClient->vecWindowPosChat ) ); + ToBase64 ( vecWindowPosChat ) ); // window position of the musician profile window PutIniSetting ( IniXMLDocument, "client", "winposprofile_base64", - ToBase64 ( pClient->vecWindowPosProfile ) ); + ToBase64 ( vecWindowPosProfile ) ); // window position of the connect window PutIniSetting ( IniXMLDocument, "client", "winposcon_base64", - ToBase64 ( pClient->vecWindowPosConnect ) ); + ToBase64 ( vecWindowPosConnect ) ); // visibility state of the settings window SetFlagIniSet ( IniXMLDocument, "client", "winvisset", - pClient->bWindowWasShownSettings ); + bWindowWasShownSettings ); // visibility state of the chat window SetFlagIniSet ( IniXMLDocument, "client", "winvischat", - pClient->bWindowWasShownChat ); + bWindowWasShownChat ); // visibility state of the musician profile window SetFlagIniSet ( IniXMLDocument, "client", "winvisprofile", - pClient->bWindowWasShownProfile ); + bWindowWasShownProfile ); // visibility state of the connect window SetFlagIniSet ( IniXMLDocument, "client", "winviscon", - pClient->bWindowWasShownConnect ); + bWindowWasShownConnect ); } diff --git a/src/settings.h b/src/settings.h index dce52670..00db6d06 100755 --- a/src/settings.h +++ b/src/settings.h @@ -110,9 +110,47 @@ protected: class CClientSettings : public CSettings { public: - CClientSettings ( CClient* pNCliP, const QString& sNFiName ) : pClient ( pNCliP ) + CClientSettings ( CClient* pNCliP, const QString& sNFiName ) : + vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ), + vecStoredFaderLevels ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_FADER_MAX ), + vecStoredPanValues ( MAX_NUM_STORED_FADER_SETTINGS, AUD_MIX_PAN_MAX / 2 ), + vecStoredFaderIsSolo ( MAX_NUM_STORED_FADER_SETTINGS, false ), + vecStoredFaderIsMute ( MAX_NUM_STORED_FADER_SETTINGS, false ), + vecStoredFaderGroupID ( MAX_NUM_STORED_FADER_SETTINGS, INVALID_INDEX ), + iNewClientFaderLevel ( 100 ), + bConnectDlgShowAllMusicians ( true ), + vecWindowPosMain ( ), // empty array + vecWindowPosSettings ( ), // empty array + vecWindowPosChat ( ), // empty array + vecWindowPosProfile ( ), // empty array + vecWindowPosConnect ( ), // empty array + bWindowWasShownSettings ( false ), + bWindowWasShownChat ( false ), + bWindowWasShownProfile ( false ), + bWindowWasShownConnect ( false ), + pClient ( pNCliP ) { SetFileName ( sNFiName, DEFAULT_INI_FILE_NAME ); } + CVector vecStoredFaderTags; + CVector vecStoredFaderLevels; + CVector vecStoredPanValues; + CVector vecStoredFaderIsSolo; + CVector vecStoredFaderIsMute; + CVector vecStoredFaderGroupID; + int iNewClientFaderLevel; + bool bConnectDlgShowAllMusicians; + + // window position/state settings + QByteArray vecWindowPosMain; + QByteArray vecWindowPosSettings; + QByteArray vecWindowPosChat; + QByteArray vecWindowPosProfile; + QByteArray vecWindowPosConnect; + bool bWindowWasShownSettings; + bool bWindowWasShownChat; + bool bWindowWasShownProfile; + bool bWindowWasShownConnect; + protected: virtual void ReadFromXML ( const QDomDocument& IniXMLDocument ) override; virtual void WriteToXML ( QDomDocument& IniXMLDocument ) override;