Add a preference for the Channel Levels
This commit is contained in:
parent
8db54e8616
commit
36e54f4da7
9 changed files with 73 additions and 5 deletions
|
@ -159,6 +159,7 @@ public:
|
||||||
void CreateReqConnClientsList() { Protocol.CreateReqConnClientsList(); }
|
void CreateReqConnClientsList() { Protocol.CreateReqConnClientsList(); }
|
||||||
void CreateChatTextMes ( const QString& strChatText ) { Protocol.CreateChatTextMes ( strChatText ); }
|
void CreateChatTextMes ( const QString& strChatText ) { Protocol.CreateChatTextMes ( strChatText ); }
|
||||||
void CreateLicReqMes ( const ELicenceType eLicenceType ) { Protocol.CreateLicenceRequiredMes ( eLicenceType ); }
|
void CreateLicReqMes ( const ELicenceType eLicenceType ) { Protocol.CreateLicenceRequiredMes ( eLicenceType ); }
|
||||||
|
void CreateReqChannelLevelListMes ( bool bOptIn ) { Protocol.CreateReqChannelLevelListMes ( bOptIn ); }
|
||||||
|
|
||||||
void CreateConClientListMes ( const CVector<CChannelInfo>& vecChanInfo )
|
void CreateConClientListMes ( const CVector<CChannelInfo>& vecChanInfo )
|
||||||
{ Protocol.CreateConClientListMes ( vecChanInfo ); }
|
{ Protocol.CreateConClientListMes ( vecChanInfo ); }
|
||||||
|
|
|
@ -65,6 +65,7 @@ CClient::CClient ( const quint16 iPortNumber,
|
||||||
bFraSiFactDefSupported ( false ),
|
bFraSiFactDefSupported ( false ),
|
||||||
bFraSiFactSafeSupported ( false ),
|
bFraSiFactSafeSupported ( false ),
|
||||||
eGUIDesign ( GD_ORIGINAL ),
|
eGUIDesign ( GD_ORIGINAL ),
|
||||||
|
bDisplayChannelLevels ( true ),
|
||||||
bJitterBufferOK ( true ),
|
bJitterBufferOK ( true ),
|
||||||
strCentralServerAddress ( "" ),
|
strCentralServerAddress ( "" ),
|
||||||
bUseDefaultCentralServerAddress ( true ),
|
bUseDefaultCentralServerAddress ( true ),
|
||||||
|
@ -279,6 +280,9 @@ void CClient::OnNewConnection()
|
||||||
// Same problem is with the jitter buffer message.
|
// Same problem is with the jitter buffer message.
|
||||||
Channel.CreateReqConnClientsList();
|
Channel.CreateReqConnClientsList();
|
||||||
CreateServerJitterBufferMessage();
|
CreateServerJitterBufferMessage();
|
||||||
|
|
||||||
|
// send opt-in / out for Channel Level updates
|
||||||
|
Channel.CreateReqChannelLevelListMes ( bDisplayChannelLevels );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CClient::CreateServerJitterBufferMessage()
|
void CClient::CreateServerJitterBufferMessage()
|
||||||
|
@ -387,6 +391,14 @@ bool CClient::GetAndResetbJitterBufferOKFlag()
|
||||||
return bSocketJitBufOKFlag;
|
return bSocketJitBufOKFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CClient::SetDisplayChannelLevels ( const bool bNDCL )
|
||||||
|
{
|
||||||
|
bDisplayChannelLevels = bNDCL;
|
||||||
|
|
||||||
|
// tell any connected server about the change
|
||||||
|
Channel.CreateReqChannelLevelListMes ( bDisplayChannelLevels );
|
||||||
|
}
|
||||||
|
|
||||||
void CClient::SetSndCrdPrefFrameSizeFactor ( const int iNewFactor )
|
void CClient::SetSndCrdPrefFrameSizeFactor ( const int iNewFactor )
|
||||||
{
|
{
|
||||||
// first check new input parameter
|
// first check new input parameter
|
||||||
|
|
|
@ -128,6 +128,9 @@ public:
|
||||||
EGUIDesign GetGUIDesign() const { return eGUIDesign; }
|
EGUIDesign GetGUIDesign() const { return eGUIDesign; }
|
||||||
void SetGUIDesign ( const EGUIDesign eNGD ) { eGUIDesign = eNGD; }
|
void SetGUIDesign ( const EGUIDesign eNGD ) { eGUIDesign = eNGD; }
|
||||||
|
|
||||||
|
bool GetDisplayChannelLevels() const { return bDisplayChannelLevels; }
|
||||||
|
void SetDisplayChannelLevels ( const bool bNDCL );
|
||||||
|
|
||||||
EAudioQuality GetAudioQuality() const { return eAudioQuality; }
|
EAudioQuality GetAudioQuality() const { return eAudioQuality; }
|
||||||
void SetAudioQuality ( const EAudioQuality eNAudioQuality );
|
void SetAudioQuality ( const EAudioQuality eNAudioQuality );
|
||||||
|
|
||||||
|
@ -359,6 +362,7 @@ protected:
|
||||||
int iStereoBlockSizeSam;
|
int iStereoBlockSizeSam;
|
||||||
|
|
||||||
EGUIDesign eGUIDesign;
|
EGUIDesign eGUIDesign;
|
||||||
|
bool bDisplayChannelLevels;
|
||||||
|
|
||||||
bool bJitterBufferOK;
|
bool bJitterBufferOK;
|
||||||
|
|
||||||
|
|
|
@ -185,6 +185,9 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
||||||
// reset mixer board
|
// reset mixer board
|
||||||
MainMixerBoard->HideAll();
|
MainMixerBoard->HideAll();
|
||||||
|
|
||||||
|
// restore channel level display preference
|
||||||
|
MainMixerBoard->SetDisplayChannelLevels ( pClient->GetDisplayChannelLevels() );
|
||||||
|
|
||||||
// restore fader settings
|
// restore fader settings
|
||||||
MainMixerBoard->vecStoredFaderTags = pClient->vecStoredFaderTags;
|
MainMixerBoard->vecStoredFaderTags = pClient->vecStoredFaderTags;
|
||||||
MainMixerBoard->vecStoredFaderLevels = pClient->vecStoredFaderLevels;
|
MainMixerBoard->vecStoredFaderLevels = pClient->vecStoredFaderLevels;
|
||||||
|
@ -495,6 +498,9 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
||||||
QObject::connect ( &ClientSettingsDlg, SIGNAL ( GUIDesignChanged() ),
|
QObject::connect ( &ClientSettingsDlg, SIGNAL ( GUIDesignChanged() ),
|
||||||
this, SLOT ( OnGUIDesignChanged() ) );
|
this, SLOT ( OnGUIDesignChanged() ) );
|
||||||
|
|
||||||
|
QObject::connect ( &ClientSettingsDlg, SIGNAL ( DisplayChannelLevelsChanged() ),
|
||||||
|
this, SLOT ( OnDisplayChannelLevelsChanged() ) );
|
||||||
|
|
||||||
QObject::connect ( &ClientSettingsDlg, SIGNAL ( AudioChannelsChanged() ),
|
QObject::connect ( &ClientSettingsDlg, SIGNAL ( AudioChannelsChanged() ),
|
||||||
this, SLOT ( OnAudioChannelsChanged() ) );
|
this, SLOT ( OnAudioChannelsChanged() ) );
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,9 @@ public slots:
|
||||||
void OnGUIDesignChanged()
|
void OnGUIDesignChanged()
|
||||||
{ SetGUIDesign ( pClient->GetGUIDesign() ); }
|
{ SetGUIDesign ( pClient->GetGUIDesign() ); }
|
||||||
|
|
||||||
|
void OnDisplayChannelLevelsChanged()
|
||||||
|
{ MainMixerBoard->SetDisplayChannelLevels ( pClient->GetDisplayChannelLevels() ); }
|
||||||
|
|
||||||
void OnAudioChannelsChanged() { UpdateRevSelection(); }
|
void OnAudioChannelsChanged() { UpdateRevSelection(); }
|
||||||
void OnNumClientsChanged ( int iNewNumClients );
|
void OnNumClientsChanged ( int iNewNumClients );
|
||||||
void OnNewClientLevelChanged() { MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel; }
|
void OnNewClientLevelChanged() { MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel; }
|
||||||
|
|
|
@ -189,6 +189,12 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
|
|
||||||
chbGUIDesignFancy->setAccessibleName ( tr ( "Fancy skin check box" ) );
|
chbGUIDesignFancy->setAccessibleName ( tr ( "Fancy skin check box" ) );
|
||||||
|
|
||||||
|
// display channel levels
|
||||||
|
chbDisplayChannelLevels->setWhatsThis ( tr ( "<b>Display Channel Levels:</b> "
|
||||||
|
"If enabled, each client channel will display a pre-fader level bar." ) );
|
||||||
|
|
||||||
|
chbDisplayChannelLevels->setAccessibleName ( tr ( "Display channel levels check box" ) );
|
||||||
|
|
||||||
// audio channels
|
// audio channels
|
||||||
QString strAudioChannels = tr ( "<b>Audio Channels:</b> "
|
QString strAudioChannels = tr ( "<b>Audio Channels:</b> "
|
||||||
"Select the number of audio channels to be used. There are three "
|
"Select the number of audio channels to be used. There are three "
|
||||||
|
@ -323,6 +329,9 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
chbGUIDesignFancy->setCheckState ( Qt::Checked );
|
chbGUIDesignFancy->setCheckState ( Qt::Checked );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Display Channel Levels check box
|
||||||
|
chbDisplayChannelLevels->setCheckState ( pClient->GetDisplayChannelLevels() ? Qt::Checked : Qt::Unchecked );
|
||||||
|
|
||||||
// "Audio Channels" combo box
|
// "Audio Channels" combo box
|
||||||
cbxAudioChannels->clear();
|
cbxAudioChannels->clear();
|
||||||
cbxAudioChannels->addItem ( "Mono" ); // CC_MONO
|
cbxAudioChannels->addItem ( "Mono" ); // CC_MONO
|
||||||
|
@ -386,6 +395,9 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
QObject::connect ( chbGUIDesignFancy, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbGUIDesignFancy, SIGNAL ( stateChanged ( int ) ),
|
||||||
this, SLOT ( OnGUIDesignFancyStateChanged ( int ) ) );
|
this, SLOT ( OnGUIDesignFancyStateChanged ( int ) ) );
|
||||||
|
|
||||||
|
QObject::connect ( chbDisplayChannelLevels, SIGNAL ( stateChanged ( int ) ),
|
||||||
|
this, SLOT ( OnDisplayChannelLevelsStateChanged ( int ) ) );
|
||||||
|
|
||||||
QObject::connect ( chbAutoJitBuf, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( chbAutoJitBuf, SIGNAL ( stateChanged ( int ) ),
|
||||||
this, SLOT ( OnAutoJitBufStateChanged ( int ) ) );
|
this, SLOT ( OnAutoJitBufStateChanged ( int ) ) );
|
||||||
|
|
||||||
|
@ -704,6 +716,12 @@ void CClientSettingsDlg::OnGUIDesignFancyStateChanged ( int value )
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CClientSettingsDlg::OnDisplayChannelLevelsStateChanged ( int value )
|
||||||
|
{
|
||||||
|
pClient->SetDisplayChannelLevels ( value != Qt::Unchecked );
|
||||||
|
emit DisplayChannelLevelsChanged();
|
||||||
|
}
|
||||||
|
|
||||||
void CClientSettingsDlg::OnDefaultCentralServerStateChanged ( int value )
|
void CClientSettingsDlg::OnDefaultCentralServerStateChanged ( int value )
|
||||||
{
|
{
|
||||||
// apply new setting to the client
|
// apply new setting to the client
|
||||||
|
|
|
@ -90,6 +90,7 @@ protected:
|
||||||
void OnSliderSndCrdBufferDelay ( int value );
|
void OnSliderSndCrdBufferDelay ( int value );
|
||||||
void OnAutoJitBufStateChanged ( int value );
|
void OnAutoJitBufStateChanged ( int value );
|
||||||
void OnGUIDesignFancyStateChanged ( int value );
|
void OnGUIDesignFancyStateChanged ( int value );
|
||||||
|
void OnDisplayChannelLevelsStateChanged ( int value );
|
||||||
void OnDefaultCentralServerStateChanged ( int value );
|
void OnDefaultCentralServerStateChanged ( int value );
|
||||||
void OnCentralServerAddressEditingFinished();
|
void OnCentralServerAddressEditingFinished();
|
||||||
void OnNewClientLevelEditingFinished();
|
void OnNewClientLevelEditingFinished();
|
||||||
|
@ -105,6 +106,7 @@ protected:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void GUIDesignChanged();
|
void GUIDesignChanged();
|
||||||
|
void DisplayChannelLevelsChanged();
|
||||||
void AudioChannelsChanged();
|
void AudioChannelsChanged();
|
||||||
void NewClientLevelChanged();
|
void NewClientLevelChanged();
|
||||||
};
|
};
|
||||||
|
|
|
@ -529,6 +529,8 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="chbGUIDesignFancy">
|
<widget class="QCheckBox" name="chbGUIDesignFancy">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -536,6 +538,15 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chbDisplayChannelLevels">
|
||||||
|
<property name="text">
|
||||||
|
<string>Display Channel Levels</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -719,6 +730,7 @@
|
||||||
<tabstop>cbxAudioQuality</tabstop>
|
<tabstop>cbxAudioQuality</tabstop>
|
||||||
<tabstop>edtNewClientLevel</tabstop>
|
<tabstop>edtNewClientLevel</tabstop>
|
||||||
<tabstop>chbGUIDesignFancy</tabstop>
|
<tabstop>chbGUIDesignFancy</tabstop>
|
||||||
|
<tabstop>chbDisplayChannelFaders</tabstop>
|
||||||
<tabstop>chbDefaultCentralServer</tabstop>
|
<tabstop>chbDefaultCentralServer</tabstop>
|
||||||
<tabstop>edtCentralServerAddress</tabstop>
|
<tabstop>edtCentralServerAddress</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
|
|
@ -250,6 +250,12 @@ void CSettings::Load()
|
||||||
pClient->SetGUIDesign ( static_cast<EGUIDesign> ( iValue ) );
|
pClient->SetGUIDesign ( static_cast<EGUIDesign> ( iValue ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// display channel levels preference
|
||||||
|
if ( GetFlagIniSet ( IniXMLDocument, "client", "displaychannellevels", bValue ) )
|
||||||
|
{
|
||||||
|
pClient->SetDisplayChannelLevels ( bValue );
|
||||||
|
}
|
||||||
|
|
||||||
// audio channels
|
// audio channels
|
||||||
if ( GetNumericIniSet ( IniXMLDocument, "client", "audiochannels",
|
if ( GetNumericIniSet ( IniXMLDocument, "client", "audiochannels",
|
||||||
0, 2 /* CC_STEREO */, iValue ) )
|
0, 2 /* CC_STEREO */, iValue ) )
|
||||||
|
@ -490,6 +496,10 @@ void CSettings::Save()
|
||||||
SetNumericIniSet ( IniXMLDocument, "client", "guidesign",
|
SetNumericIniSet ( IniXMLDocument, "client", "guidesign",
|
||||||
static_cast<int> ( pClient->GetGUIDesign() ) );
|
static_cast<int> ( pClient->GetGUIDesign() ) );
|
||||||
|
|
||||||
|
// display channel levels preference
|
||||||
|
SetFlagIniSet ( IniXMLDocument, "client", "displaychannellevels",
|
||||||
|
pClient->GetDisplayChannelLevels() );
|
||||||
|
|
||||||
// audio channels
|
// audio channels
|
||||||
SetNumericIniSet ( IniXMLDocument, "client", "audiochannels",
|
SetNumericIniSet ( IniXMLDocument, "client", "audiochannels",
|
||||||
static_cast<int> ( pClient->GetAudioChannels() ) );
|
static_cast<int> ( pClient->GetAudioChannels() ) );
|
||||||
|
|
Loading…
Reference in a new issue