show the server name in the title of the audio mixer board
This commit is contained in:
parent
1b94baa9e2
commit
59c9d9e364
6 changed files with 147 additions and 105 deletions
|
@ -281,8 +281,8 @@ double CChannelFader::CalcFaderGain ( const int value )
|
||||||
CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
|
CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
|
||||||
QGroupBox ( parent )
|
QGroupBox ( parent )
|
||||||
{
|
{
|
||||||
// set title text and title properties
|
// set title text (default: no server given)
|
||||||
setTitle ( "Server" );
|
SetServerName ( "" );
|
||||||
|
|
||||||
// add hboxlayout
|
// add hboxlayout
|
||||||
pMainLayout = new QHBoxLayout ( this );
|
pMainLayout = new QHBoxLayout ( this );
|
||||||
|
@ -329,6 +329,19 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
|
||||||
QObject::connect ( vecpChanFader[11], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChangedCh11 ( int ) ) );
|
QObject::connect ( vecpChanFader[11], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChangedCh11 ( int ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAudioMixerBoard::SetServerName ( const QString& strNewServerName )
|
||||||
|
{
|
||||||
|
// set title text of the group box
|
||||||
|
if ( strNewServerName.isEmpty() )
|
||||||
|
{
|
||||||
|
setTitle ( "Server" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setTitle ( "Server: " + strNewServerName );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CAudioMixerBoard::SetGUIDesign ( const EGUIDesign eNewDesign )
|
void CAudioMixerBoard::SetGUIDesign ( const EGUIDesign eNewDesign )
|
||||||
{
|
{
|
||||||
// apply GUI design to child GUI controls
|
// apply GUI design to child GUI controls
|
||||||
|
|
|
@ -101,6 +101,7 @@ public:
|
||||||
|
|
||||||
void HideAll();
|
void HideAll();
|
||||||
void ApplyNewConClientList ( CVector<CChannelShortInfo>& vecChanInfo );
|
void ApplyNewConClientList ( CVector<CChannelShortInfo>& vecChanInfo );
|
||||||
|
void SetServerName ( const QString& strNewServerName );
|
||||||
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -30,6 +30,7 @@ CConnectDlg::CConnectDlg ( QWidget* parent, Qt::WindowFlags f )
|
||||||
: QDialog ( parent, f ),
|
: QDialog ( parent, f ),
|
||||||
strCentralServerAddress ( "" ),
|
strCentralServerAddress ( "" ),
|
||||||
strSelectedAddress ( "" ),
|
strSelectedAddress ( "" ),
|
||||||
|
strSelectedServerName ( "" ),
|
||||||
bServerListReceived ( false ),
|
bServerListReceived ( false ),
|
||||||
bStateOK ( false ),
|
bStateOK ( false ),
|
||||||
bServerListItemWasChosen ( false )
|
bServerListItemWasChosen ( false )
|
||||||
|
@ -119,8 +120,9 @@ void CConnectDlg::showEvent ( QShowEvent* )
|
||||||
bStateOK = false;
|
bStateOK = false;
|
||||||
bServerListItemWasChosen = false;
|
bServerListItemWasChosen = false;
|
||||||
|
|
||||||
// clear current address
|
// clear current address and name
|
||||||
strSelectedAddress = "";
|
strSelectedAddress = "";
|
||||||
|
strSelectedServerName = "";
|
||||||
|
|
||||||
// clear server list view
|
// clear server list view
|
||||||
ListViewServers->clear();
|
ListViewServers->clear();
|
||||||
|
@ -154,6 +156,9 @@ void CConnectDlg::hideEvent ( QHideEvent* )
|
||||||
strSelectedAddress =
|
strSelectedAddress =
|
||||||
CurSelListItemList[0]->data ( 0, Qt::UserRole ).toString();
|
CurSelListItemList[0]->data ( 0, Qt::UserRole ).toString();
|
||||||
|
|
||||||
|
// store selected server name
|
||||||
|
strSelectedServerName = CurSelListItemList[0]->text ( 0 );
|
||||||
|
|
||||||
// set flag that a server list item was chosen to connect
|
// set flag that a server list item was chosen to connect
|
||||||
bServerListItemWasChosen = true;
|
bServerListItemWasChosen = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,7 @@ public:
|
||||||
bool GetStateOK() const { return bStateOK; }
|
bool GetStateOK() const { return bStateOK; }
|
||||||
bool GetServerListItemWasChosen() const { return bServerListItemWasChosen; }
|
bool GetServerListItemWasChosen() const { return bServerListItemWasChosen; }
|
||||||
QString GetSelectedAddress() const { return strSelectedAddress; }
|
QString GetSelectedAddress() const { return strSelectedAddress; }
|
||||||
|
QString GetSelectedServerName() const { return strSelectedServerName; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void showEvent ( QShowEvent* );
|
virtual void showEvent ( QShowEvent* );
|
||||||
|
@ -81,6 +82,7 @@ protected:
|
||||||
CHostAddress CentralServerAddress;
|
CHostAddress CentralServerAddress;
|
||||||
CVector<QString> vstrIPAddresses;
|
CVector<QString> vstrIPAddresses;
|
||||||
QString strSelectedAddress;
|
QString strSelectedAddress;
|
||||||
|
QString strSelectedServerName;
|
||||||
bool bServerListReceived;
|
bool bServerListReceived;
|
||||||
bool bStateOK;
|
bool bStateOK;
|
||||||
bool bServerListItemWasChosen;
|
bool bServerListItemWasChosen;
|
||||||
|
|
|
@ -799,8 +799,25 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart )
|
||||||
|
|
||||||
if ( bStartOk )
|
if ( bStartOk )
|
||||||
{
|
{
|
||||||
|
// change connect button text to "disconnect"
|
||||||
PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT );
|
PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT );
|
||||||
|
|
||||||
|
// set server name in audio mixer group box title
|
||||||
|
if ( ConnectDlg.GetServerListItemWasChosen() )
|
||||||
|
{
|
||||||
|
// in case a server in the server list was chosen,
|
||||||
|
// display the server name of the server list
|
||||||
|
MainMixerBoard->SetServerName (
|
||||||
|
ConnectDlg.GetSelectedServerName() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// an item of the server address combo box was chosen,
|
||||||
|
// just show the address string as it was entered by the
|
||||||
|
// user
|
||||||
|
MainMixerBoard->SetServerName ( strSelectedAddress );
|
||||||
|
}
|
||||||
|
|
||||||
// start timer for level meter bar and ping time measurement
|
// start timer for level meter bar and ping time measurement
|
||||||
TimerSigMet.start ( LEVELMETER_UPDATE_TIME_MS );
|
TimerSigMet.start ( LEVELMETER_UPDATE_TIME_MS );
|
||||||
TimerPing.start ( PING_UPDATE_TIME_MS );
|
TimerPing.start ( PING_UPDATE_TIME_MS );
|
||||||
|
@ -825,8 +842,12 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart )
|
||||||
pClient->Stop();
|
pClient->Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// change connect button text to "connect"
|
||||||
PushButtonConnect->setText ( CON_BUT_CONNECTTEXT );
|
PushButtonConnect->setText ( CON_BUT_CONNECTTEXT );
|
||||||
|
|
||||||
|
// reset server name in audio mixer group box title
|
||||||
|
MainMixerBoard->SetServerName ( "" );
|
||||||
|
|
||||||
// stop timer for level meter bars and reset them
|
// stop timer for level meter bars and reset them
|
||||||
TimerSigMet.stop();
|
TimerSigMet.stop();
|
||||||
MultiColorLEDBarInputLevelL->setValue ( 0 );
|
MultiColorLEDBarInputLevelL->setValue ( 0 );
|
||||||
|
|
|
@ -407,7 +407,7 @@
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType" >
|
<property name="sizeType" >
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Minimum</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
|
@ -445,7 +445,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="LineEditFaderTag" >
|
<widget class="QLineEdit" name="LineEditFaderTag" >
|
||||||
<property name="sizePolicy" >
|
<property name="sizePolicy" >
|
||||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -470,7 +470,7 @@
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType" >
|
<property name="sizeType" >
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Minimum</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
|
|
Loading…
Reference in a new issue