rename GUI controls according to new prefix definition

This commit is contained in:
Volker Fischer 2011-05-08 20:13:26 +00:00
parent 6596a464a4
commit 856bd35039
18 changed files with 565 additions and 555 deletions

View File

@ -66,7 +66,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="TextLabelVersion" > <widget class="QLabel" name="lblVersion" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" > <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -121,7 +121,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="TextLabelAuthorNames" > <widget class="QLabel" name="lblAuthorNames" >
<property name="text" > <property name="text" >
<string>Author: Volker Fischer</string> <string>Author: Volker Fischer</string>
</property> </property>
@ -131,7 +131,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="TextLabelCopyright" > <widget class="QLabel" name="lblCopyright" >
<property name="text" > <property name="text" >
<string>Copyright (C) 2005 - 2011</string> <string>Copyright (C) 2005 - 2011</string>
</property> </property>
@ -165,7 +165,7 @@
<item> <item>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QLabel" name="label" > <widget class="QLabel" name="pxlGigPicture" >
<property name="text" > <property name="text" >
<string/> <string/>
</property> </property>
@ -195,7 +195,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QTextBrowser" name="TextViewCredits" /> <widget class="QTextBrowser" name="txvCredits" />
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
@ -249,7 +249,7 @@
</widget> </widget>
<tabstops> <tabstops>
<tabstop>buttonOk</tabstop> <tabstop>buttonOk</tabstop>
<tabstop>TextViewCredits</tabstop> <tabstop>txvCredits</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="resources.qrc" /> <include location="resources.qrc" />

View File

@ -33,56 +33,56 @@ CChatDlg::CChatDlg ( QWidget* parent, Qt::WindowFlags f ) :
// Add help text to controls ----------------------------------------------- // Add help text to controls -----------------------------------------------
lineEditLocalInputText->setAccessibleName ( "New chat text edit box" ); edtLocalInputText->setAccessibleName ( "New chat text edit box" );
TextViewChatWindow->setAccessibleName ( "Chat history" ); txvChatWindow->setAccessibleName ( "Chat history" );
// clear chat window and edit line // clear chat window and edit line
TextViewChatWindow->clear(); txvChatWindow->clear();
lineEditLocalInputText->clear(); edtLocalInputText->clear();
// Connections ------------------------------------------------------------- // Connections -------------------------------------------------------------
QObject::connect ( lineEditLocalInputText, QObject::connect ( edtLocalInputText,
SIGNAL ( textChanged ( const QString& ) ), SIGNAL ( textChanged ( const QString& ) ),
this, SLOT ( OnChatTextChanged ( const QString& ) ) ); this, SLOT ( OnLocalInputTextTextChanged ( const QString& ) ) );
QObject::connect ( lineEditLocalInputText, SIGNAL ( returnPressed() ), QObject::connect ( edtLocalInputText, SIGNAL ( returnPressed() ),
this, SLOT ( OnNewLocalInputText() ) ); this, SLOT ( OnLocalInputTextReturnPressed() ) );
QObject::connect ( pbClear, SIGNAL ( pressed() ), QObject::connect ( butClear, SIGNAL ( pressed() ),
this, SLOT ( OnClearButtonPressed() ) ); this, SLOT ( OnClearPressed() ) );
} }
void CChatDlg::OnChatTextChanged ( const QString& strNewText ) void CChatDlg::OnLocalInputTextTextChanged ( const QString& strNewText )
{ {
// check and correct length // check and correct length
if ( strNewText.length() > MAX_LEN_CHAT_TEXT ) if ( strNewText.length() > MAX_LEN_CHAT_TEXT )
{ {
// text is too long, update control with shortend text // text is too long, update control with shortend text
lineEditLocalInputText->setText ( strNewText.left ( MAX_LEN_CHAT_TEXT ) ); edtLocalInputText->setText ( strNewText.left ( MAX_LEN_CHAT_TEXT ) );
} }
} }
void CChatDlg::OnNewLocalInputText() void CChatDlg::OnLocalInputTextReturnPressed()
{ {
// send new text and clear line afterwards // send new text and clear line afterwards
emit NewLocalInputText ( lineEditLocalInputText->text() ); emit NewLocalInputText ( edtLocalInputText->text() );
lineEditLocalInputText->clear(); edtLocalInputText->clear();
} }
void CChatDlg::OnClearButtonPressed() void CChatDlg::OnClearPressed()
{ {
// clear chat window // clear chat window
TextViewChatWindow->clear(); txvChatWindow->clear();
} }
void CChatDlg::AddChatText ( QString strChatText ) void CChatDlg::AddChatText ( QString strChatText )
{ {
// add new text in chat window // add new text in chat window
TextViewChatWindow->append ( strChatText ); txvChatWindow->append ( strChatText );
// notify accessibility plugin that text has changed // notify accessibility plugin that text has changed
QAccessible::updateAccessibility ( TextViewChatWindow, 0, QAccessible::updateAccessibility ( txvChatWindow, 0,
QAccessible::ValueChanged ); QAccessible::ValueChanged );
} }

View File

@ -52,9 +52,9 @@ public:
void AddChatText ( QString strChatText ); void AddChatText ( QString strChatText );
public slots: public slots:
void OnNewLocalInputText(); void OnLocalInputTextReturnPressed();
void OnChatTextChanged ( const QString& strNewText ); void OnLocalInputTextTextChanged ( const QString& strNewText );
void OnClearButtonPressed(); void OnClearPressed();
signals: signals:
void NewLocalInputText ( QString strNewText ); void NewLocalInputText ( QString strNewText );

View File

@ -26,14 +26,14 @@
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QTextBrowser" name="TextViewChatWindow" > <widget class="QTextBrowser" name="txvChatWindow" >
<property name="textInteractionFlags" > <property name="textInteractionFlags" >
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="lineEditLocalInputText" /> <widget class="QLineEdit" name="edtLocalInputText" />
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
@ -54,7 +54,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pbClear" > <widget class="QPushButton" name="butClear" >
<property name="text" > <property name="text" >
<string>Cl&amp;ear</string> <string>Cl&amp;ear</string>
</property> </property>
@ -81,9 +81,9 @@
</layout> </layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>lineEditLocalInputText</tabstop> <tabstop>edtLocalInputText</tabstop>
<tabstop>TextViewChatWindow</tabstop> <tabstop>txvChatWindow</tabstop>
<tabstop>pbClear</tabstop> <tabstop>butClear</tabstop>
<tabstop>buttonClose</tabstop> <tabstop>buttonClose</tabstop>
</tabstops> </tabstops>
<resources> <resources>

View File

@ -59,20 +59,20 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
"of dropouts is reached. The LED indicator will visualize the audio " "of dropouts is reached. The LED indicator will visualize the audio "
"dropouts by a red light" ) + TOOLTIP_COM_END_TEXT; "dropouts by a red light" ) + TOOLTIP_COM_END_TEXT;
TextNetBuf->setWhatsThis ( strJitterBufferSize ); TextNetBuf->setWhatsThis ( strJitterBufferSize );
TextNetBuf->setToolTip ( strJitterBufferSizeTT ); TextNetBuf->setToolTip ( strJitterBufferSizeTT );
GroupBoxJitterBuffer->setWhatsThis ( strJitterBufferSize ); grbJitterBuffer->setWhatsThis ( strJitterBufferSize );
GroupBoxJitterBuffer->setToolTip ( strJitterBufferSizeTT ); grbJitterBuffer->setToolTip ( strJitterBufferSizeTT );
SliderNetBuf->setWhatsThis ( strJitterBufferSize ); sldNetBuf->setWhatsThis ( strJitterBufferSize );
SliderNetBuf->setAccessibleName ( tr ( "Jitter buffer slider control" ) ); sldNetBuf->setAccessibleName ( tr ( "Jitter buffer slider control" ) );
SliderNetBuf->setToolTip ( strJitterBufferSizeTT ); sldNetBuf->setToolTip ( strJitterBufferSizeTT );
cbAutoJitBuf->setAccessibleName ( tr ( "Auto jitter buffer switch" ) ); chbAutoJitBuf->setAccessibleName ( tr ( "Auto jitter buffer switch" ) );
cbAutoJitBuf->setToolTip ( strJitterBufferSizeTT ); chbAutoJitBuf->setToolTip ( strJitterBufferSizeTT );
CLEDNetw->setAccessibleName ( tr ( "Jitter buffer status LED indicator" ) ); ledNetw->setAccessibleName ( tr ( "Jitter buffer status LED indicator" ) );
CLEDNetw->setToolTip ( strJitterBufferSizeTT ); ledNetw->setToolTip ( strJitterBufferSizeTT );
// sound card device // sound card device
cbSoundcard->setWhatsThis ( tr ( "<b>Sound Card Device:</b> The ASIO " cbxSoundcard->setWhatsThis ( tr ( "<b>Sound Card Device:</b> The ASIO "
"driver (sound card) can be selected using llcon under the Windows " "driver (sound card) can be selected using llcon under the Windows "
"operating system. Under Linux, no sound card selection is possible " "operating system. Under Linux, no sound card selection is possible "
"(always wave mapper is shown and cannot be changed). If the selected " "(always wave mapper is shown and cannot be changed). If the selected "
@ -82,9 +82,9 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
"is stopped, the driver is changed and the connection is started again " "is stopped, the driver is changed and the connection is started again "
"automatically." ) ); "automatically." ) );
cbSoundcard->setAccessibleName ( tr ( "Sound card device selector combo box" ) ); cbxSoundcard->setAccessibleName ( tr ( "Sound card device selector combo box" ) );
cbSoundcard->setToolTip ( tr ( "In case the <b>ASIO4ALL</b> driver is used, " cbxSoundcard->setToolTip ( tr ( "In case the <b>ASIO4ALL</b> driver is used, "
"please note that this driver usually introduces approx. 10-30 ms of " "please note that this driver usually introduces approx. 10-30 ms of "
"additional audio delay. Using a sound card with a native ASIO driver " "additional audio delay. Using a sound card with a native ASIO driver "
"is therefore recommended.<br>If you are using the <b>kX ASIO</b> " "is therefore recommended.<br>If you are using the <b>kX ASIO</b> "
@ -100,16 +100,16 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
"Right channel) a different actual sound card channel can be " "Right channel) a different actual sound card channel can be "
"selected." ); "selected." );
lbInChannelMapping->setWhatsThis ( strSndCrdChanMapp ); lblInChannelMapping->setWhatsThis ( strSndCrdChanMapp );
lbOutChannelMapping->setWhatsThis ( strSndCrdChanMapp ); lblOutChannelMapping->setWhatsThis ( strSndCrdChanMapp );
cbLInChan->setWhatsThis ( strSndCrdChanMapp ); cbxLInChan->setWhatsThis ( strSndCrdChanMapp );
cbLInChan->setAccessibleName ( tr ( "Left input channel selection combo box" ) ); cbxLInChan->setAccessibleName ( tr ( "Left input channel selection combo box" ) );
cbRInChan->setWhatsThis ( strSndCrdChanMapp ); cbxRInChan->setWhatsThis ( strSndCrdChanMapp );
cbRInChan->setAccessibleName ( tr ( "Right input channel selection combo box" ) ); cbxRInChan->setAccessibleName ( tr ( "Right input channel selection combo box" ) );
cbLOutChan->setWhatsThis ( strSndCrdChanMapp ); cbxLOutChan->setWhatsThis ( strSndCrdChanMapp );
cbLOutChan->setAccessibleName ( tr ( "Left output channel selection combo box" ) ); cbxLOutChan->setAccessibleName ( tr ( "Left output channel selection combo box" ) );
cbROutChan->setWhatsThis ( strSndCrdChanMapp ); cbxROutChan->setWhatsThis ( strSndCrdChanMapp );
cbROutChan->setAccessibleName ( tr ( "Right output channel selection combo box" ) ); cbxROutChan->setAccessibleName ( tr ( "Right output channel selection combo box" ) );
// sound card buffer delay // sound card buffer delay
QString strSndCrdBufDelay = tr ( "<b>Sound Card Buffer Delay:</b> The " QString strSndCrdBufDelay = tr ( "<b>Sound Card Buffer Delay:</b> The "
@ -148,43 +148,43 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
"use the Jack configuration tool to change the buffer size." ) + "use the Jack configuration tool to change the buffer size." ) +
TOOLTIP_COM_END_TEXT; TOOLTIP_COM_END_TEXT;
rButBufferDelayPreferred->setWhatsThis ( strSndCrdBufDelay ); rbtBufferDelayPreferred->setWhatsThis ( strSndCrdBufDelay );
rButBufferDelayPreferred->setAccessibleName ( tr ( "128 samples setting radio button" ) ); rbtBufferDelayPreferred->setAccessibleName ( tr ( "128 samples setting radio button" ) );
rButBufferDelayPreferred->setToolTip ( strSndCrdBufDelayTT ); rbtBufferDelayPreferred->setToolTip ( strSndCrdBufDelayTT );
rButBufferDelayDefault->setWhatsThis ( strSndCrdBufDelay ); rbtBufferDelayDefault->setWhatsThis ( strSndCrdBufDelay );
rButBufferDelayDefault->setAccessibleName ( tr ( "256 samples setting radio button" ) ); rbtBufferDelayDefault->setAccessibleName ( tr ( "256 samples setting radio button" ) );
rButBufferDelayDefault->setToolTip ( strSndCrdBufDelayTT ); rbtBufferDelayDefault->setToolTip ( strSndCrdBufDelayTT );
rButBufferDelaySafe->setWhatsThis ( strSndCrdBufDelay ); rbtBufferDelaySafe->setWhatsThis ( strSndCrdBufDelay );
rButBufferDelaySafe->setAccessibleName ( tr ( "512 samples setting radio button" ) ); rbtBufferDelaySafe->setAccessibleName ( tr ( "512 samples setting radio button" ) );
rButBufferDelaySafe->setToolTip ( strSndCrdBufDelayTT ); rbtBufferDelaySafe->setToolTip ( strSndCrdBufDelayTT );
ButtonDriverSetup->setWhatsThis ( strSndCrdBufDelay ); butDriverSetup->setWhatsThis ( strSndCrdBufDelay );
ButtonDriverSetup->setAccessibleName ( tr ( "ASIO setup push button" ) ); butDriverSetup->setAccessibleName ( tr ( "ASIO setup push button" ) );
ButtonDriverSetup->setToolTip ( strSndCrdBufDelayTT ); butDriverSetup->setToolTip ( strSndCrdBufDelayTT );
// open chat on new message // open chat on new message
cbOpenChatOnNewMessage->setWhatsThis ( tr ( "<b>Open Chat on New " chbOpenChatOnNewMessage->setWhatsThis ( tr ( "<b>Open Chat on New "
"Message:</b> If this checkbox is enabled, the chat window will " "Message:</b> If this checkbox is enabled, the chat window will "
"open on any incoming chat text if it not already opened." ) ); "open on any incoming chat text if it not already opened." ) );
cbOpenChatOnNewMessage->setAccessibleName ( tr ( "Open chat on new " chbOpenChatOnNewMessage->setAccessibleName ( tr ( "Open chat on new "
"message check box" ) ); "message check box" ) );
cbOpenChatOnNewMessage->setToolTip ( tr ( "If Open Chat on New Message " chbOpenChatOnNewMessage->setToolTip ( tr ( "If Open Chat on New Message "
"is disabled, a LED in the main window turns green when a " "is disabled, a LED in the main window turns green when a "
"new message has arrived." ) + TOOLTIP_COM_END_TEXT ); "new message has arrived." ) + TOOLTIP_COM_END_TEXT );
// use high quality audio // use high quality audio
cbUseHighQualityAudio->setWhatsThis ( tr ( "<b>Use High Quality Audio</b> " chbUseHighQualityAudio->setWhatsThis ( tr ( "<b>Use High Quality Audio</b> "
"Enabling ""Use High Quality Audio"" will improve the audio quality " "Enabling ""Use High Quality Audio"" will improve the audio quality "
"by increasing the stream data rate. Make sure that the current " "by increasing the stream data rate. Make sure that the current "
"upload rate does not exceed the available bandwidth of your " "upload rate does not exceed the available bandwidth of your "
"internet connection." ) ); "internet connection." ) );
cbUseHighQualityAudio->setAccessibleName ( tr ( "Use high quality audio " chbUseHighQualityAudio->setAccessibleName ( tr ( "Use high quality audio "
"check box" ) ); "check box" ) );
// use stereo // use stereo
cbUseStereo->setWhatsThis ( tr ( "<b>Stereo Streaming</b> " chbUseStereo->setWhatsThis ( tr ( "<b>Stereo Streaming</b> "
"Enables the stereo streaming mode. If not checked, a mono streaming " "Enables the stereo streaming mode. If not checked, a mono streaming "
"mode is used. Enabling the stereo streaming mode will increase the " "mode is used. Enabling the stereo streaming mode will increase the "
"stream data rate. Make sure that the current upload rate does not " "stream data rate. Make sure that the current upload rate does not "
@ -193,7 +193,7 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
"for the reverberation effect will be available on the main window " "for the reverberation effect will be available on the main window "
"since the effect is applied on both channels in this case." ) ); "since the effect is applied on both channels in this case." ) );
cbUseStereo->setAccessibleName ( tr ( "Stereo check box" ) ); chbUseStereo->setAccessibleName ( tr ( "Stereo check box" ) );
// central server address // central server address
QString strCentrServAddr = tr ( "<b>Central Server Address:</b> The " QString strCentrServAddr = tr ( "<b>Central Server Address:</b> The "
@ -202,14 +202,14 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
"Default check box is checked, the default central server address is " "Default check box is checked, the default central server address is "
"shown read-only." ); "shown read-only." );
LabelCentralServerAddress->setWhatsThis ( strCentrServAddr ); lblCentralServerAddress->setWhatsThis ( strCentrServAddr );
cbDefaultCentralServer->setWhatsThis ( strCentrServAddr ); chbDefaultCentralServer->setWhatsThis ( strCentrServAddr );
LineEditCentralServerAddress->setWhatsThis ( strCentrServAddr ); edtCentralServerAddress->setWhatsThis ( strCentrServAddr );
cbDefaultCentralServer->setAccessibleName ( chbDefaultCentralServer->setAccessibleName (
tr ( "Default central server check box" ) ); tr ( "Default central server check box" ) );
LineEditCentralServerAddress->setAccessibleName ( edtCentralServerAddress->setAccessibleName (
tr ( "Central server address line edit" ) ); tr ( "Central server address line edit" ) );
// current connection status parameter // current connection status parameter
@ -227,52 +227,52 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
"higher than the available rate (check the upstream capabilities of " "higher than the available rate (check the upstream capabilities of "
"your internet connection by, e.g., using speedtest.net)." ); "your internet connection by, e.g., using speedtest.net)." );
TextPingTime->setWhatsThis ( strConnStats ); lblPingTime->setWhatsThis ( strConnStats );
TextLabelPingTime->setWhatsThis ( strConnStats ); lblPingTimeValue->setWhatsThis ( strConnStats );
TextOverallDelay->setWhatsThis ( strConnStats ); lblOverallDelay->setWhatsThis ( strConnStats );
TextLabelOverallDelay->setWhatsThis ( strConnStats ); lblOverallDelayValue->setWhatsThis ( strConnStats );
TextUpstream->setWhatsThis ( strConnStats ); lblUpstream->setWhatsThis ( strConnStats );
TextUpstreamValue->setWhatsThis ( strConnStats ); lblUpstreamValue->setWhatsThis ( strConnStats );
CLEDOverallDelay->setWhatsThis ( strConnStats ); ledOverallDelay->setWhatsThis ( strConnStats );
CLEDOverallDelay->setToolTip ( tr ( "If this LED indicator turns red, " ledOverallDelay->setToolTip ( tr ( "If this LED indicator turns red, "
"you will not have much fun using the llcon software." ) + "you will not have much fun using the llcon software." ) +
TOOLTIP_COM_END_TEXT ); TOOLTIP_COM_END_TEXT );
// init driver button // init driver button
#ifdef _WIN32 #ifdef _WIN32
ButtonDriverSetup->setText ( "ASIO Setup" ); butDriverSetup->setText ( "ASIO Setup" );
#else #else
// no use for this button for Linux right now, maybe later used // no use for this button for Linux right now, maybe later used
// for Jack // for Jack
ButtonDriverSetup->hide(); butDriverSetup->hide();
// for Jack interface, we cannot choose the audio hardware from // for Jack interface, we cannot choose the audio hardware from
// within the llcon software, hide the combo box // within the llcon software, hide the combo box
TextSoundcardDevice->hide(); lblSoundcardDevice->hide();
cbSoundcard->hide(); cbxSoundcard->hide();
#endif #endif
// init delay and other information controls // init delay and other information controls
CLEDOverallDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME_MS ); ledOverallDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME_MS );
CLEDOverallDelay->Reset(); ledOverallDelay->Reset();
TextLabelPingTime->setText ( "" ); lblPingTimeValue->setText ( "" );
TextLabelOverallDelay->setText ( "" ); lblOverallDelayValue->setText ( "" );
TextUpstreamValue->setText ( "" ); lblUpstreamValue->setText ( "" );
// init slider controls --- // init slider controls ---
// network buffer // network buffer
SliderNetBuf->setRange ( MIN_NET_BUF_SIZE_NUM_BL, MAX_NET_BUF_SIZE_NUM_BL ); sldNetBuf->setRange ( MIN_NET_BUF_SIZE_NUM_BL, MAX_NET_BUF_SIZE_NUM_BL );
UpdateJitterBufferFrame(); UpdateJitterBufferFrame();
// init combo box containing all available sound cards in the system // init combo box containing all available sound cards in the system
cbSoundcard->clear(); cbxSoundcard->clear();
for ( int iSndDevIdx = 0; iSndDevIdx < pClient->GetSndCrdNumDev(); iSndDevIdx++ ) for ( int iSndDevIdx = 0; iSndDevIdx < pClient->GetSndCrdNumDev(); iSndDevIdx++ )
{ {
cbSoundcard->addItem ( pClient->GetSndCrdDeviceName ( iSndDevIdx ) ); cbxSoundcard->addItem ( pClient->GetSndCrdDeviceName ( iSndDevIdx ) );
} }
cbSoundcard->setCurrentIndex ( pClient->GetSndCrdDev() ); cbxSoundcard->setCurrentIndex ( pClient->GetSndCrdDev() );
// init sound card channel selection frame // init sound card channel selection frame
UpdateSoundChannelSelectionFrame(); UpdateSoundChannelSelectionFrame();
@ -280,70 +280,70 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
// "OpenChatOnNewMessage" check box // "OpenChatOnNewMessage" check box
if ( pClient->GetOpenChatOnNewMessage() ) if ( pClient->GetOpenChatOnNewMessage() )
{ {
cbOpenChatOnNewMessage->setCheckState ( Qt::Checked ); chbOpenChatOnNewMessage->setCheckState ( Qt::Checked );
} }
else else
{ {
cbOpenChatOnNewMessage->setCheckState ( Qt::Unchecked ); chbOpenChatOnNewMessage->setCheckState ( Qt::Unchecked );
} }
// fancy GUI design check box // fancy GUI design check box
if ( pClient->GetGUIDesign() == GD_STANDARD ) if ( pClient->GetGUIDesign() == GD_STANDARD )
{ {
cbGUIDesignFancy->setCheckState ( Qt::Unchecked ); chbGUIDesignFancy->setCheckState ( Qt::Unchecked );
} }
else else
{ {
cbGUIDesignFancy->setCheckState ( Qt::Checked ); chbGUIDesignFancy->setCheckState ( Qt::Checked );
} }
// "High Quality Audio" check box // "High Quality Audio" check box
if ( pClient->GetCELTHighQuality() ) if ( pClient->GetCELTHighQuality() )
{ {
cbUseHighQualityAudio->setCheckState ( Qt::Checked ); chbUseHighQualityAudio->setCheckState ( Qt::Checked );
} }
else else
{ {
cbUseHighQualityAudio->setCheckState ( Qt::Unchecked ); chbUseHighQualityAudio->setCheckState ( Qt::Unchecked );
} }
// "Stereo" check box // "Stereo" check box
if ( pClient->GetUseStereo() ) if ( pClient->GetUseStereo() )
{ {
cbUseStereo->setCheckState ( Qt::Checked ); chbUseStereo->setCheckState ( Qt::Checked );
} }
else else
{ {
cbUseStereo->setCheckState ( Qt::Unchecked ); chbUseStereo->setCheckState ( Qt::Unchecked );
} }
// update default central server address check box // update default central server address check box
if ( pClient->GetUseDefaultCentralServerAddress() ) if ( pClient->GetUseDefaultCentralServerAddress() )
{ {
cbDefaultCentralServer->setCheckState ( Qt::Checked ); chbDefaultCentralServer->setCheckState ( Qt::Checked );
} }
else else
{ {
cbDefaultCentralServer->setCheckState ( Qt::Unchecked ); chbDefaultCentralServer->setCheckState ( Qt::Unchecked );
} }
UpdateCentralServerDependency(); UpdateCentralServerDependency();
// set text for sound card buffer delay radio buttons // set text for sound card buffer delay radio buttons
rButBufferDelayPreferred->setText ( GenSndCrdBufferDelayString ( rbtBufferDelayPreferred->setText ( GenSndCrdBufferDelayString (
FRAME_SIZE_FACTOR_PREFERRED * SYSTEM_FRAME_SIZE_SAMPLES, FRAME_SIZE_FACTOR_PREFERRED * SYSTEM_FRAME_SIZE_SAMPLES,
", preferred" ) ); ", preferred" ) );
rButBufferDelayDefault->setText ( GenSndCrdBufferDelayString ( rbtBufferDelayDefault->setText ( GenSndCrdBufferDelayString (
FRAME_SIZE_FACTOR_DEFAULT * SYSTEM_FRAME_SIZE_SAMPLES, FRAME_SIZE_FACTOR_DEFAULT * SYSTEM_FRAME_SIZE_SAMPLES,
", default" ) ); ", default" ) );
rButBufferDelaySafe->setText ( GenSndCrdBufferDelayString ( rbtBufferDelaySafe->setText ( GenSndCrdBufferDelayString (
FRAME_SIZE_FACTOR_SAFE * SYSTEM_FRAME_SIZE_SAMPLES ) ); FRAME_SIZE_FACTOR_SAFE * SYSTEM_FRAME_SIZE_SAMPLES ) );
// sound card buffer delay inits // sound card buffer delay inits
SndCrdBufferDelayButtonGroup.addButton ( rButBufferDelayPreferred ); SndCrdBufferDelayButtonGroup.addButton ( rbtBufferDelayPreferred );
SndCrdBufferDelayButtonGroup.addButton ( rButBufferDelayDefault ); SndCrdBufferDelayButtonGroup.addButton ( rbtBufferDelayDefault );
SndCrdBufferDelayButtonGroup.addButton ( rButBufferDelaySafe ); SndCrdBufferDelayButtonGroup.addButton ( rbtBufferDelaySafe );
UpdateSoundCardFrame(); UpdateSoundCardFrame();
@ -354,52 +354,51 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
this, SLOT ( OnTimerStatus() ) ); this, SLOT ( OnTimerStatus() ) );
// slider controls // slider controls
QObject::connect ( SliderNetBuf, SIGNAL ( valueChanged ( int ) ), QObject::connect ( sldNetBuf, SIGNAL ( valueChanged ( int ) ),
this, SLOT ( OnSliderNetBuf ( int ) ) ); this, SLOT ( OnNetBufValueChanged ( int ) ) );
// check boxes // check boxes
QObject::connect ( cbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnOpenChatOnNewMessageStateChanged ( int ) ) ); this, SLOT ( OnOpenChatOnNewMessageStateChanged ( int ) ) );
QObject::connect ( cbGUIDesignFancy, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbGUIDesignFancy, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnGUIDesignFancyStateChanged ( int ) ) ); this, SLOT ( OnGUIDesignFancyStateChanged ( int ) ) );
QObject::connect ( cbUseHighQualityAudio, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbUseHighQualityAudio, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnUseHighQualityAudioStateChanged ( int ) ) ); this, SLOT ( OnUseHighQualityAudioStateChanged ( int ) ) );
QObject::connect ( cbUseStereo, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbUseStereo, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnUseStereoStateChanged ( int ) ) ); this, SLOT ( OnUseStereoStateChanged ( int ) ) );
QObject::connect ( cbAutoJitBuf, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbAutoJitBuf, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnAutoJitBuf ( int ) ) ); this, SLOT ( OnAutoJitBufStateChanged ( int ) ) );
QObject::connect ( cbDefaultCentralServer, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbDefaultCentralServer, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnDefaultCentralServerStateChanged ( int ) ) ); this, SLOT ( OnDefaultCentralServerStateChanged ( int ) ) );
// line edits // line edits
QObject::connect ( LineEditCentralServerAddress, QObject::connect ( edtCentralServerAddress, SIGNAL ( editingFinished() ),
SIGNAL ( editingFinished() ), this, SLOT ( OnCentralServerAddressEditingFinished() ) );
this, SLOT ( OnLineEditCentralServerAddressEditingFinished() ) );
// combo boxes // combo boxes
QObject::connect ( cbSoundcard, SIGNAL ( activated ( int ) ), QObject::connect ( cbxSoundcard, SIGNAL ( activated ( int ) ),
this, SLOT ( OnSoundCrdSelection ( int ) ) ); this, SLOT ( OnSoundcardActivated ( int ) ) );
QObject::connect ( cbLInChan, SIGNAL ( activated ( int ) ), QObject::connect ( cbxLInChan, SIGNAL ( activated ( int ) ),
this, SLOT ( OnSndCrdLeftInChannelSelection ( int ) ) ); this, SLOT ( OnLInChanActivated ( int ) ) );
QObject::connect ( cbRInChan, SIGNAL ( activated ( int ) ), QObject::connect ( cbxRInChan, SIGNAL ( activated ( int ) ),
this, SLOT ( OnSndCrdRightInChannelSelection ( int ) ) ); this, SLOT ( OnRInChanActivated ( int ) ) );
QObject::connect ( cbLOutChan, SIGNAL ( activated ( int ) ), QObject::connect ( cbxLOutChan, SIGNAL ( activated ( int ) ),
this, SLOT ( OnSndCrdLeftOutChannelSelection ( int ) ) ); this, SLOT ( OnLOutChanActivated ( int ) ) );
QObject::connect ( cbROutChan, SIGNAL ( activated ( int ) ), QObject::connect ( cbxROutChan, SIGNAL ( activated ( int ) ),
this, SLOT ( OnSndCrdRightOutChannelSelection ( int ) ) ); this, SLOT ( OnROutChanActivated ( int ) ) );
// buttons // buttons
QObject::connect ( ButtonDriverSetup, SIGNAL ( clicked() ), QObject::connect ( butDriverSetup, SIGNAL ( clicked() ),
this, SLOT ( OnDriverSetupBut() ) ); this, SLOT ( OnDriverSetupClicked() ) );
// misc // misc
QObject::connect ( &SndCrdBufferDelayButtonGroup, QObject::connect ( &SndCrdBufferDelayButtonGroup,
@ -416,13 +415,13 @@ void CClientSettingsDlg::UpdateJitterBufferFrame()
{ {
// update slider value and text // update slider value and text
const int iCurNumNetBuf = pClient->GetSockBufNumFrames(); const int iCurNumNetBuf = pClient->GetSockBufNumFrames();
SliderNetBuf->setValue ( iCurNumNetBuf ); sldNetBuf->setValue ( iCurNumNetBuf );
TextNetBuf->setText ( "Size: " + QString().setNum ( iCurNumNetBuf ) ); TextNetBuf->setText ( "Size: " + QString().setNum ( iCurNumNetBuf ) );
// if auto setting is enabled, disable slider control // if auto setting is enabled, disable slider control
cbAutoJitBuf->setChecked ( pClient->GetDoAutoSockBufSize() ); chbAutoJitBuf->setChecked ( pClient->GetDoAutoSockBufSize() );
SliderNetBuf->setEnabled ( !pClient->GetDoAutoSockBufSize() ); sldNetBuf->setEnabled ( !pClient->GetDoAutoSockBufSize() );
TextNetBuf->setEnabled ( !pClient->GetDoAutoSockBufSize() ); TextNetBuf->setEnabled ( !pClient->GetDoAutoSockBufSize() );
} }
QString CClientSettingsDlg::GenSndCrdBufferDelayString ( const int iFrameSize, QString CClientSettingsDlg::GenSndCrdBufferDelayString ( const int iFrameSize,
@ -449,25 +448,25 @@ void CClientSettingsDlg::UpdateSoundCardFrame()
// are disabeld and unchecked.). // are disabeld and unchecked.).
SndCrdBufferDelayButtonGroup.setExclusive ( false ); SndCrdBufferDelayButtonGroup.setExclusive ( false );
rButBufferDelayPreferred->setChecked ( iCurActualBufSize == rbtBufferDelayPreferred->setChecked ( iCurActualBufSize ==
SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_PREFERRED ); SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_PREFERRED );
rButBufferDelayDefault->setChecked ( iCurActualBufSize == rbtBufferDelayDefault->setChecked ( iCurActualBufSize ==
SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_DEFAULT ); SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_DEFAULT );
rButBufferDelaySafe->setChecked ( iCurActualBufSize == rbtBufferDelaySafe->setChecked ( iCurActualBufSize ==
SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_SAFE ); SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_SAFE );
SndCrdBufferDelayButtonGroup.setExclusive ( true ); SndCrdBufferDelayButtonGroup.setExclusive ( true );
// disable radio buttons which are not supported by audio interface // disable radio buttons which are not supported by audio interface
rButBufferDelayPreferred->setEnabled ( rbtBufferDelayPreferred->setEnabled (
pClient->GetFraSiFactPrefSupported() ); pClient->GetFraSiFactPrefSupported() );
rButBufferDelayDefault->setEnabled ( rbtBufferDelayDefault->setEnabled (
pClient->GetFraSiFactDefSupported() ); pClient->GetFraSiFactDefSupported() );
rButBufferDelaySafe->setEnabled ( rbtBufferDelaySafe->setEnabled (
pClient->GetFraSiFactSafeSupported() ); pClient->GetFraSiFactSafeSupported() );
} }
@ -492,26 +491,26 @@ void CClientSettingsDlg::UpdateSoundChannelSelectionFrame()
FrameSoundcardChannelSelection->setVisible ( true ); FrameSoundcardChannelSelection->setVisible ( true );
// input // input
cbLInChan->clear(); cbxLInChan->clear();
cbRInChan->clear(); cbxRInChan->clear();
for ( iSndChanIdx = 0; iSndChanIdx < pClient->GetSndCrdNumInputChannels(); iSndChanIdx++ ) for ( iSndChanIdx = 0; iSndChanIdx < pClient->GetSndCrdNumInputChannels(); iSndChanIdx++ )
{ {
cbLInChan->addItem ( pClient->GetSndCrdInputChannelName ( iSndChanIdx ) ); cbxLInChan->addItem ( pClient->GetSndCrdInputChannelName ( iSndChanIdx ) );
cbRInChan->addItem ( pClient->GetSndCrdInputChannelName ( iSndChanIdx ) ); cbxRInChan->addItem ( pClient->GetSndCrdInputChannelName ( iSndChanIdx ) );
} }
cbLInChan->setCurrentIndex ( pClient->GetSndCrdLeftInputChannel() ); cbxLInChan->setCurrentIndex ( pClient->GetSndCrdLeftInputChannel() );
cbRInChan->setCurrentIndex ( pClient->GetSndCrdRightInputChannel() ); cbxRInChan->setCurrentIndex ( pClient->GetSndCrdRightInputChannel() );
// output // output
cbLOutChan->clear(); cbxLOutChan->clear();
cbROutChan->clear(); cbxROutChan->clear();
for ( iSndChanIdx = 0; iSndChanIdx < pClient->GetSndCrdNumOutputChannels(); iSndChanIdx++ ) for ( iSndChanIdx = 0; iSndChanIdx < pClient->GetSndCrdNumOutputChannels(); iSndChanIdx++ )
{ {
cbLOutChan->addItem ( pClient->GetSndCrdOutputChannelName ( iSndChanIdx ) ); cbxLOutChan->addItem ( pClient->GetSndCrdOutputChannelName ( iSndChanIdx ) );
cbROutChan->addItem ( pClient->GetSndCrdOutputChannelName ( iSndChanIdx ) ); cbxROutChan->addItem ( pClient->GetSndCrdOutputChannelName ( iSndChanIdx ) );
} }
cbLOutChan->setCurrentIndex ( pClient->GetSndCrdLeftOutputChannel() ); cbxLOutChan->setCurrentIndex ( pClient->GetSndCrdLeftOutputChannel() );
cbROutChan->setCurrentIndex ( pClient->GetSndCrdRightOutputChannel() ); cbxROutChan->setCurrentIndex ( pClient->GetSndCrdRightOutputChannel() );
} }
#else #else
// for other OS, no sound card channel selection is supported // for other OS, no sound card channel selection is supported
@ -527,31 +526,31 @@ void CClientSettingsDlg::UpdateCentralServerDependency()
// If the default central server address is enabled, the line edit shows // If the default central server address is enabled, the line edit shows
// the default server and is not editable. Make sure the line edit does not // the default server and is not editable. Make sure the line edit does not
// fire signals when we update the text. // fire signals when we update the text.
LineEditCentralServerAddress->blockSignals ( true ); edtCentralServerAddress->blockSignals ( true );
{ {
if ( bCurUseDefCentServAddr ) if ( bCurUseDefCentServAddr )
{ {
LineEditCentralServerAddress->setText ( DEFAULT_SERVER_ADDRESS ); edtCentralServerAddress->setText ( DEFAULT_SERVER_ADDRESS );
} }
else else
{ {
LineEditCentralServerAddress->setText ( edtCentralServerAddress->setText (
pClient->GetServerListCentralServerAddress() ); pClient->GetServerListCentralServerAddress() );
} }
} }
LineEditCentralServerAddress->blockSignals ( false ); edtCentralServerAddress->blockSignals ( false );
// the line edit of the central server address is only enabled, if not the // the line edit of the central server address is only enabled, if not the
// default address is used // default address is used
LineEditCentralServerAddress->setEnabled ( !bCurUseDefCentServAddr ); edtCentralServerAddress->setEnabled ( !bCurUseDefCentServAddr );
} }
void CClientSettingsDlg::OnDriverSetupBut() void CClientSettingsDlg::OnDriverSetupClicked()
{ {
pClient->OpenSndCrdDriverSetup(); pClient->OpenSndCrdDriverSetup();
} }
void CClientSettingsDlg::OnSliderNetBuf ( int value ) void CClientSettingsDlg::OnNetBufValueChanged ( int value )
{ {
pClient->SetSockBufNumFrames ( value ); pClient->SetSockBufNumFrames ( value );
UpdateJitterBufferFrame(); UpdateJitterBufferFrame();
@ -563,7 +562,7 @@ void CClientSettingsDlg::OnSliderSndCrdBufferDelay ( int value )
UpdateDisplay(); UpdateDisplay();
} }
void CClientSettingsDlg::OnSoundCrdSelection ( int iSndDevIdx ) void CClientSettingsDlg::OnSoundcardActivated ( int iSndDevIdx )
{ {
const QString strError = pClient->SetSndCrdDev ( iSndDevIdx ); const QString strError = pClient->SetSndCrdDev ( iSndDevIdx );
@ -576,37 +575,37 @@ void CClientSettingsDlg::OnSoundCrdSelection ( int iSndDevIdx )
"Ok", 0 ); "Ok", 0 );
// recover old selection // recover old selection
cbSoundcard->setCurrentIndex ( pClient->GetSndCrdDev() ); cbxSoundcard->setCurrentIndex ( pClient->GetSndCrdDev() );
} }
UpdateSoundChannelSelectionFrame(); UpdateSoundChannelSelectionFrame();
UpdateDisplay(); UpdateDisplay();
} }
void CClientSettingsDlg::OnSndCrdLeftInChannelSelection ( int iChanIdx ) void CClientSettingsDlg::OnLInChanActivated ( int iChanIdx )
{ {
pClient->SetSndCrdLeftInputChannel ( iChanIdx ); pClient->SetSndCrdLeftInputChannel ( iChanIdx );
UpdateSoundChannelSelectionFrame(); UpdateSoundChannelSelectionFrame();
} }
void CClientSettingsDlg::OnSndCrdRightInChannelSelection ( int iChanIdx ) void CClientSettingsDlg::OnRInChanActivated ( int iChanIdx )
{ {
pClient->SetSndCrdRightInputChannel ( iChanIdx ); pClient->SetSndCrdRightInputChannel ( iChanIdx );
UpdateSoundChannelSelectionFrame(); UpdateSoundChannelSelectionFrame();
} }
void CClientSettingsDlg::OnSndCrdLeftOutChannelSelection ( int iChanIdx ) void CClientSettingsDlg::OnLOutChanActivated ( int iChanIdx )
{ {
pClient->SetSndCrdLeftOutputChannel ( iChanIdx ); pClient->SetSndCrdLeftOutputChannel ( iChanIdx );
UpdateSoundChannelSelectionFrame(); UpdateSoundChannelSelectionFrame();
} }
void CClientSettingsDlg::OnSndCrdRightOutChannelSelection ( int iChanIdx ) void CClientSettingsDlg::OnROutChanActivated ( int iChanIdx )
{ {
pClient->SetSndCrdRightOutputChannel ( iChanIdx ); pClient->SetSndCrdRightOutputChannel ( iChanIdx );
UpdateSoundChannelSelectionFrame(); UpdateSoundChannelSelectionFrame();
} }
void CClientSettingsDlg::OnAutoJitBuf ( int value ) void CClientSettingsDlg::OnAutoJitBufStateChanged ( int value )
{ {
pClient->SetDoAutoSockBufSize ( value == Qt::Checked ); pClient->SetDoAutoSockBufSize ( value == Qt::Checked );
UpdateJitterBufferFrame(); UpdateJitterBufferFrame();
@ -654,26 +653,26 @@ void CClientSettingsDlg::OnDefaultCentralServerStateChanged ( int value )
UpdateCentralServerDependency(); UpdateCentralServerDependency();
} }
void CClientSettingsDlg::OnLineEditCentralServerAddressEditingFinished() void CClientSettingsDlg::OnCentralServerAddressEditingFinished()
{ {
// store new setting in the client // store new setting in the client
pClient->SetServerListCentralServerAddress ( pClient->SetServerListCentralServerAddress (
LineEditCentralServerAddress->text() ); edtCentralServerAddress->text() );
} }
void CClientSettingsDlg::OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button ) void CClientSettingsDlg::OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button )
{ {
if ( button == rButBufferDelayPreferred ) if ( button == rbtBufferDelayPreferred )
{ {
pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_PREFERRED ); pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_PREFERRED );
} }
if ( button == rButBufferDelayDefault ) if ( button == rbtBufferDelayDefault )
{ {
pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT ); pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT );
} }
if ( button == rButBufferDelaySafe ) if ( button == rbtBufferDelaySafe )
{ {
pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_SAFE ); pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_SAFE );
} }
@ -692,18 +691,18 @@ void CClientSettingsDlg::SetPingTimeResult ( const int iPingTime,
const QString sErrorText = const QString sErrorText =
"<font color=""red""><b>&#62;500 ms</b></font>"; "<font color=""red""><b>&#62;500 ms</b></font>";
TextLabelPingTime->setText ( sErrorText ); lblPingTimeValue->setText ( sErrorText );
TextLabelOverallDelay->setText ( sErrorText ); lblOverallDelayValue->setText ( sErrorText );
} }
else else
{ {
TextLabelPingTime->setText ( QString().setNum ( iPingTime ) + " ms" ); lblPingTimeValue->setText ( QString().setNum ( iPingTime ) + " ms" );
TextLabelOverallDelay->setText ( lblOverallDelayValue->setText (
QString().setNum ( iOverallDelayMs ) + " ms" ); QString().setNum ( iOverallDelayMs ) + " ms" );
} }
// set current LED status // set current LED status
CLEDOverallDelay->SetLight ( iOverallDelayLEDColor ); ledOverallDelay->SetLight ( iOverallDelayLEDColor );
} }
void CClientSettingsDlg::UpdateDisplay() void CClientSettingsDlg::UpdateDisplay()
@ -715,14 +714,14 @@ void CClientSettingsDlg::UpdateDisplay()
if ( !pClient->IsRunning() ) if ( !pClient->IsRunning() )
{ {
// clear text labels with client parameters // clear text labels with client parameters
TextLabelPingTime->setText ( "" ); lblPingTimeValue->setText ( "" );
TextLabelOverallDelay->setText ( "" ); lblOverallDelayValue->setText ( "" );
TextUpstreamValue->setText ( "" ); lblUpstreamValue->setText ( "" );
} }
else else
{ {
// update upstream rate information label (only if client is running) // update upstream rate information label (only if client is running)
TextUpstreamValue->setText ( lblUpstreamValue->setText (
QString().setNum ( pClient->GetUploadRateKbps() ) + " kbps" ); QString().setNum ( pClient->GetUploadRateKbps() ) + " kbps" );
} }
} }
@ -734,11 +733,11 @@ void CClientSettingsDlg::SetStatus ( const int iMessType, const int iStatus )
case MS_JIT_BUF_PUT: case MS_JIT_BUF_PUT:
case MS_JIT_BUF_GET: case MS_JIT_BUF_GET:
// network LED shows combined status of put and get // network LED shows combined status of put and get
CLEDNetw->SetLight ( iStatus ); ledNetw->SetLight ( iStatus );
break; break;
case MS_RESET_ALL: case MS_RESET_ALL:
CLEDNetw->Reset(); ledNetw->Reset();
break; break;
} }
} }

View File

@ -84,22 +84,22 @@ protected:
public slots: public slots:
void OnTimerStatus() { UpdateDisplay(); } void OnTimerStatus() { UpdateDisplay(); }
void OnSliderNetBuf ( int value ); void OnNetBufValueChanged ( int value );
void OnSliderSndCrdBufferDelay ( int value ); void OnSliderSndCrdBufferDelay ( int value );
void OnAutoJitBuf ( int value ); void OnAutoJitBufStateChanged ( int value );
void OnOpenChatOnNewMessageStateChanged ( int value ); void OnOpenChatOnNewMessageStateChanged ( int value );
void OnGUIDesignFancyStateChanged ( int value ); void OnGUIDesignFancyStateChanged ( int value );
void OnUseHighQualityAudioStateChanged ( int value ); void OnUseHighQualityAudioStateChanged ( int value );
void OnUseStereoStateChanged ( int value ); void OnUseStereoStateChanged ( int value );
void OnDefaultCentralServerStateChanged ( int value ); void OnDefaultCentralServerStateChanged ( int value );
void OnLineEditCentralServerAddressEditingFinished(); void OnCentralServerAddressEditingFinished();
void OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button ); void OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button );
void OnSoundCrdSelection ( int iSndDevIdx ); void OnSoundcardActivated ( int iSndDevIdx );
void OnSndCrdLeftInChannelSelection ( int iChanIdx ); void OnLInChanActivated ( int iChanIdx );
void OnSndCrdRightInChannelSelection ( int iChanIdx ); void OnRInChanActivated ( int iChanIdx );
void OnSndCrdLeftOutChannelSelection ( int iChanIdx ); void OnLOutChanActivated ( int iChanIdx );
void OnSndCrdRightOutChannelSelection ( int iChanIdx ); void OnROutChanActivated ( int iChanIdx );
void OnDriverSetupBut(); void OnDriverSetupClicked();
signals: signals:
void GUIDesignChanged(); void GUIDesignChanged();

View File

@ -20,13 +20,13 @@
</property> </property>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QGroupBox" name="GroupBoxJitterBuffer" > <widget class="QGroupBox" name="grbJitterBuffer" >
<property name="title" > <property name="title" >
<string>Jitter Buffer</string> <string>Jitter Buffer</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QCheckBox" name="cbAutoJitBuf" > <widget class="QCheckBox" name="chbAutoJitBuf" >
<property name="text" > <property name="text" >
<string>Auto</string> <string>Auto</string>
</property> </property>
@ -85,7 +85,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QSlider" name="SliderNetBuf" > <widget class="QSlider" name="sldNetBuf" >
<property name="pageStep" > <property name="pageStep" >
<number>1</number> <number>1</number>
</property> </property>
@ -134,7 +134,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="CMultiColorLED" native="1" name="CLEDNetw" > <widget class="CMultiColorLED" native="1" name="ledNetw" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -177,20 +177,20 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="GroupBoxSoundCard" > <widget class="QGroupBox" name="grbSoundCard" >
<property name="title" > <property name="title" >
<string>Soundcard</string> <string>Soundcard</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextSoundcardDevice" > <widget class="QLabel" name="lblSoundcardDevice" >
<property name="text" > <property name="text" >
<string>Device</string> <string>Device</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="cbSoundcard" > <widget class="QComboBox" name="cbxSoundcard" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" > <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -233,7 +233,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="lbInChannelMapping" > <widget class="QLabel" name="lblInChannelMapping" >
<property name="text" > <property name="text" >
<string>Input Channel Mapping</string> <string>Input Channel Mapping</string>
</property> </property>
@ -247,7 +247,7 @@
<item> <item>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QLabel" name="labelLInChan" > <widget class="QLabel" name="lblLInChan" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -260,7 +260,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="labelRInChan" > <widget class="QLabel" name="lblRInChan" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -280,17 +280,17 @@
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<widget class="QComboBox" name="cbLInChan" /> <widget class="QComboBox" name="cbxLInChan" />
</item> </item>
<item> <item>
<widget class="QComboBox" name="cbRInChan" /> <widget class="QComboBox" name="cbxRInChan" />
</item> </item>
</layout> </layout>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QLabel" name="lbOutChannelMapping" > <widget class="QLabel" name="lblOutChannelMapping" >
<property name="text" > <property name="text" >
<string>Output Channel Mapping</string> <string>Output Channel Mapping</string>
</property> </property>
@ -304,7 +304,7 @@
<item> <item>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QLabel" name="labelLOutChan" > <widget class="QLabel" name="lblLOutChan" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -317,7 +317,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="labelROutChan" > <widget class="QLabel" name="lblROutChan" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -337,10 +337,10 @@
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<widget class="QComboBox" name="cbLOutChan" /> <widget class="QComboBox" name="cbxLOutChan" />
</item> </item>
<item> <item>
<widget class="QComboBox" name="cbROutChan" /> <widget class="QComboBox" name="cbxROutChan" />
</item> </item>
</layout> </layout>
</item> </item>
@ -363,34 +363,34 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="GroupBoxSoundCrdBufDelay" > <widget class="QGroupBox" name="grbSoundCrdBufDelay" >
<property name="title" > <property name="title" >
<string>Buffer Delay</string> <string>Buffer Delay</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QRadioButton" name="rButBufferDelayPreferred" > <widget class="QRadioButton" name="rbtBufferDelayPreferred" >
<property name="text" > <property name="text" >
<string>(preferred)</string> <string>(preferred)</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="rButBufferDelayDefault" > <widget class="QRadioButton" name="rbtBufferDelayDefault" >
<property name="text" > <property name="text" >
<string>(default)</string> <string>(default)</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="rButBufferDelaySafe" > <widget class="QRadioButton" name="rbtBufferDelaySafe" >
<property name="text" > <property name="text" >
<string>(safe)</string> <string>(safe)</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="ButtonDriverSetup" > <widget class="QPushButton" name="butDriverSetup" >
<property name="text" > <property name="text" >
<string>Driver Setup</string> <string>Driver Setup</string>
</property> </property>
@ -403,27 +403,27 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="GroupBoxMeasureResults" > <widget class="QGroupBox" name="grbMeasureResults" >
<property name="title" > <property name="title" >
<string>Misc</string> <string>Misc</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QCheckBox" name="cbOpenChatOnNewMessage" > <widget class="QCheckBox" name="chbOpenChatOnNewMessage" >
<property name="text" > <property name="text" >
<string>Open Chat on New Message</string> <string>Open Chat on New Message</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="cbGUIDesignFancy" > <widget class="QCheckBox" name="chbGUIDesignFancy" >
<property name="text" > <property name="text" >
<string>Fancy GUI Design</string> <string>Fancy GUI Design</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="cbUseHighQualityAudio" > <widget class="QCheckBox" name="chbUseHighQualityAudio" >
<property name="windowModality" > <property name="windowModality" >
<enum>Qt::NonModal</enum> <enum>Qt::NonModal</enum>
</property> </property>
@ -433,7 +433,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="cbUseStereo" > <widget class="QCheckBox" name="chbUseStereo" >
<property name="windowModality" > <property name="windowModality" >
<enum>Qt::NonModal</enum> <enum>Qt::NonModal</enum>
</property> </property>
@ -445,14 +445,14 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="LabelCentralServerAddress" > <widget class="QLabel" name="lblCentralServerAddress" >
<property name="text" > <property name="text" >
<string>Central Server Address:</string> <string>Central Server Address:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="cbDefaultCentralServer" > <widget class="QCheckBox" name="chbDefaultCentralServer" >
<property name="text" > <property name="text" >
<string>Default</string> <string>Default</string>
</property> </property>
@ -461,7 +461,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="LineEditCentralServerAddress" > <widget class="QLineEdit" name="edtCentralServerAddress" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" > <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -486,14 +486,14 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextPingTime" > <widget class="QLabel" name="lblPingTime" >
<property name="text" > <property name="text" >
<string>Ping Time</string> <string>Ping Time</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="TextLabelPingTime" > <widget class="QLabel" name="lblPingTimeValue" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" > <sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -522,7 +522,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextOverallDelay" > <widget class="QLabel" name="lblOverallDelay" >
<property name="text" > <property name="text" >
<string>Overall Delay</string> <string>Overall Delay</string>
</property> </property>
@ -534,7 +534,7 @@
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="TextLabelOverallDelay" > <widget class="QLabel" name="lblOverallDelayValue" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Maximum" hsizetype="Preferred" > <sizepolicy vsizetype="Maximum" hsizetype="Preferred" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -565,7 +565,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="CMultiColorLED" native="1" name="CLEDOverallDelay" > <widget class="CMultiColorLED" native="1" name="ledOverallDelay" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -593,14 +593,14 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextUpstream" > <widget class="QLabel" name="lblUpstream" >
<property name="text" > <property name="text" >
<string>Audio Stream Rate</string> <string>Audio Stream Rate</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="TextUpstreamValue" > <widget class="QLabel" name="lblUpstreamValue" >
<property name="minimumSize" > <property name="minimumSize" >
<size> <size>
<width>0</width> <width>0</width>
@ -639,23 +639,23 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>cbAutoJitBuf</tabstop> <tabstop>chbAutoJitBuf</tabstop>
<tabstop>SliderNetBuf</tabstop> <tabstop>sldNetBuf</tabstop>
<tabstop>cbSoundcard</tabstop> <tabstop>cbxSoundcard</tabstop>
<tabstop>cbLInChan</tabstop> <tabstop>cbxLInChan</tabstop>
<tabstop>cbRInChan</tabstop> <tabstop>cbxRInChan</tabstop>
<tabstop>cbLOutChan</tabstop> <tabstop>cbxLOutChan</tabstop>
<tabstop>cbROutChan</tabstop> <tabstop>cbxROutChan</tabstop>
<tabstop>rButBufferDelayPreferred</tabstop> <tabstop>rbtBufferDelayPreferred</tabstop>
<tabstop>rButBufferDelayDefault</tabstop> <tabstop>rbtBufferDelayDefault</tabstop>
<tabstop>rButBufferDelaySafe</tabstop> <tabstop>rbtBufferDelaySafe</tabstop>
<tabstop>ButtonDriverSetup</tabstop> <tabstop>butDriverSetup</tabstop>
<tabstop>cbOpenChatOnNewMessage</tabstop> <tabstop>chbOpenChatOnNewMessage</tabstop>
<tabstop>cbGUIDesignFancy</tabstop> <tabstop>chbGUIDesignFancy</tabstop>
<tabstop>cbUseHighQualityAudio</tabstop> <tabstop>chbUseHighQualityAudio</tabstop>
<tabstop>cbUseStereo</tabstop> <tabstop>chbUseStereo</tabstop>
<tabstop>cbDefaultCentralServer</tabstop> <tabstop>chbDefaultCentralServer</tabstop>
<tabstop>LineEditCentralServerAddress</tabstop> <tabstop>edtCentralServerAddress</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="resources.qrc" /> <include location="resources.qrc" />

View File

@ -45,47 +45,46 @@ CConnectDlg::CConnectDlg ( QWidget* parent, Qt::WindowFlags f )
"A list of the most recent used server URLs is available for " "A list of the most recent used server URLs is available for "
"selection." ); "selection." );
TextLabelServerAddr->setWhatsThis ( strServAddrH ); lblServerAddr->setWhatsThis ( strServAddrH );
LineEditServerAddr->setWhatsThis ( strServAddrH ); cbxServerAddr->setWhatsThis ( strServAddrH );
LineEditServerAddr->setAccessibleName ( tr ( "Server address edit box" ) ); cbxServerAddr->setAccessibleName ( tr ( "Server address edit box" ) );
LineEditServerAddr->setAccessibleDescription ( tr ( "Holds the current server " cbxServerAddr->setAccessibleDescription ( tr ( "Holds the current server "
"URL. It also stores old URLs in the combo box list." ) ); "URL. It also stores old URLs in the combo box list." ) );
// init server address combo box (max MAX_NUM_SERVER_ADDR_ITEMS entries) // init server address combo box (max MAX_NUM_SERVER_ADDR_ITEMS entries)
LineEditServerAddr->setMaxCount ( MAX_NUM_SERVER_ADDR_ITEMS ); cbxServerAddr->setMaxCount ( MAX_NUM_SERVER_ADDR_ITEMS );
LineEditServerAddr->setInsertPolicy ( QComboBox::NoInsert ); cbxServerAddr->setInsertPolicy ( QComboBox::NoInsert );
// set up list view for connected clients // set up list view for connected clients
ListViewServers->setColumnWidth ( 0, 170 ); lvwServers->setColumnWidth ( 0, 170 );
ListViewServers->setColumnWidth ( 1, 65 ); lvwServers->setColumnWidth ( 1, 65 );
ListViewServers->setColumnWidth ( 2, 55 ); lvwServers->setColumnWidth ( 2, 55 );
ListViewServers->setColumnWidth ( 3, 130 ); lvwServers->setColumnWidth ( 3, 130 );
ListViewServers->clear(); lvwServers->clear();
// Connections ------------------------------------------------------------- // Connections -------------------------------------------------------------
// list view // list view
QObject::connect ( ListViewServers, QObject::connect ( lvwServers,
SIGNAL ( itemSelectionChanged() ), SIGNAL ( itemSelectionChanged() ),
this, SLOT ( OnServerListItemSelectionChanged() ) ); this, SLOT ( OnServerListItemSelectionChanged() ) );
QObject::connect ( ListViewServers, QObject::connect ( lvwServers,
SIGNAL ( itemDoubleClicked ( QTreeWidgetItem*, int ) ), SIGNAL ( itemDoubleClicked ( QTreeWidgetItem*, int ) ),
this, SLOT ( OnServerListItemDoubleClicked ( QTreeWidgetItem*, int ) ) ); this, SLOT ( OnServerListItemDoubleClicked ( QTreeWidgetItem*, int ) ) );
// combo boxes // combo boxes
QObject::connect ( LineEditServerAddr, QObject::connect ( cbxServerAddr, SIGNAL ( editTextChanged ( const QString& ) ),
SIGNAL ( editTextChanged ( const QString& ) ), this, SLOT ( OnServerAddrEditTextChanged ( const QString& ) ) );
this, SLOT ( OnLineEditServerAddrEditTextChanged ( const QString& ) ) );
// buttons // buttons
QObject::connect ( CancelButton, SIGNAL ( clicked() ), QObject::connect ( butCancel, SIGNAL ( clicked() ),
this, SLOT ( close() ) ); this, SLOT ( close() ) );
QObject::connect ( ConnectButton, SIGNAL ( clicked() ), QObject::connect ( butConnect, SIGNAL ( clicked() ),
this, SLOT ( OnConnectButtonClicked() ) ); this, SLOT ( OnConnectClicked() ) );
// timers // timers
QObject::connect ( &TimerPing, SIGNAL ( timeout() ), QObject::connect ( &TimerPing, SIGNAL ( timeout() ),
@ -102,12 +101,12 @@ void CConnectDlg::Init ( const QString strNewCentralServerAddr,
strCentralServerAddress = strNewCentralServerAddr; strCentralServerAddress = strNewCentralServerAddr;
// load stored IP addresses in combo box // load stored IP addresses in combo box
LineEditServerAddr->clear(); cbxServerAddr->clear();
for ( int iLEIdx = 0; iLEIdx < MAX_NUM_SERVER_ADDR_ITEMS; iLEIdx++ ) for ( int iLEIdx = 0; iLEIdx < MAX_NUM_SERVER_ADDR_ITEMS; iLEIdx++ )
{ {
if ( !vstrIPAddresses[iLEIdx].isEmpty() ) if ( !vstrIPAddresses[iLEIdx].isEmpty() )
{ {
LineEditServerAddr->addItem ( vstrIPAddresses[iLEIdx] ); cbxServerAddr->addItem ( vstrIPAddresses[iLEIdx] );
} }
} }
} }
@ -125,7 +124,7 @@ void CConnectDlg::showEvent ( QShowEvent* )
strSelectedServerName = ""; strSelectedServerName = "";
// clear server list view // clear server list view
ListViewServers->clear(); lvwServers->clear();
// get the IP address of the central server (using the ParseNetworAddress // get the IP address of the central server (using the ParseNetworAddress
// function) when the connect dialog is opened, this seems to be the correct // function) when the connect dialog is opened, this seems to be the correct
@ -147,8 +146,7 @@ void CConnectDlg::hideEvent ( QHideEvent* )
// get the IP address to be used according to the following definitions: // get the IP address to be used according to the following definitions:
// - if the list has focus and a line is selected, use this line // - if the list has focus and a line is selected, use this line
// - if the list has no focus, use the current combo box text // - if the list has no focus, use the current combo box text
QList<QTreeWidgetItem*> CurSelListItemList = QList<QTreeWidgetItem*> CurSelListItemList = lvwServers->selectedItems();
ListViewServers->selectedItems();
if ( CurSelListItemList.count() > 0 ) if ( CurSelListItemList.count() > 0 )
{ {
@ -164,7 +162,7 @@ void CConnectDlg::hideEvent ( QHideEvent* )
} }
else else
{ {
strSelectedAddress = LineEditServerAddr->currentText(); strSelectedAddress = cbxServerAddr->currentText();
} }
// if window is closed, stop timers // if window is closed, stop timers
@ -190,7 +188,7 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr,
TimerReRequestServList.stop(); TimerReRequestServList.stop();
// first clear list // first clear list
ListViewServers->clear(); lvwServers->clear();
// add list item for each server in the server list // add list item for each server in the server list
const int iServerInfoLen = vecServerInfo.Size(); const int iServerInfoLen = vecServerInfo.Size();
@ -212,8 +210,7 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr,
} }
// create new list view item // create new list view item
QTreeWidgetItem* pNewListViewItem = QTreeWidgetItem* pNewListViewItem = new QTreeWidgetItem ( lvwServers );
new QTreeWidgetItem ( ListViewServers );
// make the entry invisible (will be set to visible on successful ping // make the entry invisible (will be set to visible on successful ping
// result) // result)
@ -278,19 +275,17 @@ void CConnectDlg::OnServerListItemSelectionChanged()
{ {
// get current selected item (we are only interested in the first selcted // get current selected item (we are only interested in the first selcted
// item) // item)
QList<QTreeWidgetItem*> CurSelListItemList = QList<QTreeWidgetItem*> CurSelListItemList = lvwServers->selectedItems();
ListViewServers->selectedItems();
// if an item is clicked/selected, copy the server name to the combo box // if an item is clicked/selected, copy the server name to the combo box
if ( CurSelListItemList.count() > 0 ) if ( CurSelListItemList.count() > 0 )
{ {
// make sure no signals are send when we change the text // make sure no signals are send when we change the text
LineEditServerAddr->blockSignals ( true ); cbxServerAddr->blockSignals ( true );
{ {
LineEditServerAddr->setEditText ( cbxServerAddr->setEditText ( CurSelListItemList[0]->text ( 0 ) );
CurSelListItemList[0]->text ( 0 ) );
} }
LineEditServerAddr->blockSignals ( false ); cbxServerAddr->blockSignals ( false );
} }
} }
@ -301,18 +296,18 @@ void CConnectDlg::OnServerListItemDoubleClicked ( QTreeWidgetItem* Item,
// connect button was clicked // connect button was clicked
if ( Item != 0 ) if ( Item != 0 )
{ {
OnConnectButtonClicked(); OnConnectClicked();
} }
} }
void CConnectDlg::OnLineEditServerAddrEditTextChanged ( const QString& ) void CConnectDlg::OnServerAddrEditTextChanged ( const QString& )
{ {
// in the server address combo box, a text was changed, remove selection // in the server address combo box, a text was changed, remove selection
// in the server list (if any) // in the server list (if any)
ListViewServers->clearSelection(); lvwServers->clearSelection();
} }
void CConnectDlg::OnConnectButtonClicked() void CConnectDlg::OnConnectClicked()
{ {
// set state OK flag // set state OK flag
bStateOK = true; bStateOK = true;
@ -324,7 +319,7 @@ void CConnectDlg::OnConnectButtonClicked()
void CConnectDlg::OnTimerPing() void CConnectDlg::OnTimerPing()
{ {
// send ping messages to the servers in the list // send ping messages to the servers in the list
const int iServerListLen = ListViewServers->topLevelItemCount(); const int iServerListLen = lvwServers->topLevelItemCount();
for ( int iIdx = 0; iIdx < iServerListLen; iIdx++ ) for ( int iIdx = 0; iIdx < iServerListLen; iIdx++ )
{ {
@ -333,7 +328,7 @@ void CConnectDlg::OnTimerPing()
// try to parse host address string which is stored as user data // try to parse host address string which is stored as user data
// in the server list item GUI control element // in the server list item GUI control element
if ( LlconNetwUtil().ParseNetworkAddress ( if ( LlconNetwUtil().ParseNetworkAddress (
ListViewServers->topLevelItem ( iIdx )-> lvwServers->topLevelItem ( iIdx )->
data ( 0, Qt::UserRole ).toString(), data ( 0, Qt::UserRole ).toString(),
CurServerAddress ) ) CurServerAddress ) )
{ {
@ -349,13 +344,13 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress& InetAddr,
const int iNumClients ) const int iNumClients )
{ {
// apply the received ping time to the correct server list entry // apply the received ping time to the correct server list entry
const int iServerListLen = ListViewServers->topLevelItemCount(); const int iServerListLen = lvwServers->topLevelItemCount();
for ( int iIdx = 0; iIdx < iServerListLen; iIdx++ ) for ( int iIdx = 0; iIdx < iServerListLen; iIdx++ )
{ {
// compare the received address with the user data string of the // compare the received address with the user data string of the
// host address by a string compare // host address by a string compare
if ( !ListViewServers->topLevelItem ( iIdx )-> if ( !lvwServers->topLevelItem ( iIdx )->
data ( 0, Qt::UserRole ).toString(). data ( 0, Qt::UserRole ).toString().
compare ( InetAddr.toString() ) ) compare ( InetAddr.toString() ) )
{ {
@ -363,31 +358,31 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress& InetAddr,
switch ( iPingTimeLEDColor ) switch ( iPingTimeLEDColor )
{ {
case MUL_COL_LED_GREEN: case MUL_COL_LED_GREEN:
ListViewServers-> lvwServers->
topLevelItem ( iIdx )->setTextColor ( 1, Qt::darkGreen ); topLevelItem ( iIdx )->setTextColor ( 1, Qt::darkGreen );
break; break;
case MUL_COL_LED_YELLOW: case MUL_COL_LED_YELLOW:
ListViewServers-> lvwServers->
topLevelItem ( iIdx )->setTextColor ( 1, Qt::darkYellow ); topLevelItem ( iIdx )->setTextColor ( 1, Qt::darkYellow );
break; break;
case MUL_COL_LED_RED: case MUL_COL_LED_RED:
ListViewServers-> lvwServers->
topLevelItem ( iIdx )->setTextColor ( 1, Qt::red ); topLevelItem ( iIdx )->setTextColor ( 1, Qt::red );
break; break;
} }
// update ping text // update ping text
ListViewServers->topLevelItem ( iIdx )-> lvwServers->topLevelItem ( iIdx )->
setText ( 1, QString().setNum ( iPingTime ) + " ms" ); setText ( 1, QString().setNum ( iPingTime ) + " ms" );
// update number of clients text // update number of clients text
ListViewServers->topLevelItem ( iIdx )-> lvwServers->topLevelItem ( iIdx )->
setText ( 2, QString().setNum ( iNumClients ) ); setText ( 2, QString().setNum ( iNumClients ) );
// a ping time was received, set item to visible // a ping time was received, set item to visible
ListViewServers->topLevelItem ( iIdx )->setHidden ( false ); lvwServers->topLevelItem ( iIdx )->setHidden ( false );
} }
} }
} }

View File

@ -90,8 +90,8 @@ protected:
public slots: public slots:
void OnServerListItemSelectionChanged(); void OnServerListItemSelectionChanged();
void OnServerListItemDoubleClicked ( QTreeWidgetItem* Item, int ); void OnServerListItemDoubleClicked ( QTreeWidgetItem* Item, int );
void OnLineEditServerAddrEditTextChanged ( const QString& ); void OnServerAddrEditTextChanged ( const QString& );
void OnConnectButtonClicked(); void OnConnectClicked();
void OnTimerPing(); void OnTimerPing();
void OnTimerReRequestServList(); void OnTimerReRequestServList();

View File

@ -23,7 +23,7 @@
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QTreeWidget" name="ListViewServers" > <widget class="QTreeWidget" name="lvwServers" >
<property name="editTriggers" > <property name="editTriggers" >
<set>QAbstractItemView::NoEditTriggers</set> <set>QAbstractItemView::NoEditTriggers</set>
</property> </property>
@ -61,7 +61,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextLabelServerAddr" > <widget class="QLabel" name="lblServerAddr" >
<property name="text" > <property name="text" >
<string>Server Name/Address</string> <string>Server Name/Address</string>
</property> </property>
@ -71,7 +71,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="LineEditServerAddr" > <widget class="QComboBox" name="cbxServerAddr" >
<property name="editable" > <property name="editable" >
<bool>true</bool> <bool>true</bool>
</property> </property>
@ -95,14 +95,14 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="CancelButton" > <widget class="QPushButton" name="butCancel" >
<property name="text" > <property name="text" >
<string>C&amp;ancel</string> <string>C&amp;ancel</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="ConnectButton" > <widget class="QPushButton" name="butConnect" >
<property name="text" > <property name="text" >
<string>&amp;Connect</string> <string>&amp;Connect</string>
</property> </property>

View File

@ -4,6 +4,23 @@
* Author(s): * Author(s):
* Volker Fischer * Volker Fischer
* *
Prefix definitions for the GUI:
label: lbl
combo box: cbx
line edit: edt
list view: lvw
check box: chb
radio button: rbt
button: but
text view: txv
slider: sld
LED: led
group box: grb
pixmap label: pxl
LED bar: lbr
****************************************************************************** ******************************************************************************
* *
* This program is free software; you can redistribute it and/or modify it under * This program is free software; you can redistribute it and/or modify it under

View File

@ -65,28 +65,28 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
QString strInpLevHAccText = tr ( "Input level meter" ); QString strInpLevHAccText = tr ( "Input level meter" );
QString strInpLevHAccDescr = tr ( "Simulates an analog LED level meter." ); QString strInpLevHAccDescr = tr ( "Simulates an analog LED level meter." );
TextInputLEDMeter->setWhatsThis ( strInpLevH ); lblInputLEDMeter->setWhatsThis ( strInpLevH );
TextLevelMeterLeft->setWhatsThis ( strInpLevH ); lblLevelMeterLeft->setWhatsThis ( strInpLevH );
TextLevelMeterRight->setWhatsThis ( strInpLevH ); lblLevelMeterRight->setWhatsThis ( strInpLevH );
MultiColorLEDBarInputLevelL->setWhatsThis ( strInpLevH ); lbrInputLevelL->setWhatsThis ( strInpLevH );
MultiColorLEDBarInputLevelL->setAccessibleName ( strInpLevHAccText ); lbrInputLevelL->setAccessibleName ( strInpLevHAccText );
MultiColorLEDBarInputLevelL->setAccessibleDescription ( strInpLevHAccDescr ); lbrInputLevelL->setAccessibleDescription ( strInpLevHAccDescr );
MultiColorLEDBarInputLevelL->setToolTip ( strInpLevHTT ); lbrInputLevelL->setToolTip ( strInpLevHTT );
MultiColorLEDBarInputLevelR->setWhatsThis ( strInpLevH ); lbrInputLevelR->setWhatsThis ( strInpLevH );
MultiColorLEDBarInputLevelR->setAccessibleName ( strInpLevHAccText ); lbrInputLevelR->setAccessibleName ( strInpLevHAccText );
MultiColorLEDBarInputLevelR->setAccessibleDescription ( strInpLevHAccDescr ); lbrInputLevelR->setAccessibleDescription ( strInpLevHAccDescr );
MultiColorLEDBarInputLevelR->setToolTip ( strInpLevHTT ); lbrInputLevelR->setToolTip ( strInpLevHTT );
// connect/disconnect button // connect/disconnect button
PushButtonConnect->setWhatsThis ( tr ( "<b>Connect / Disconnect Button:" butConnect->setWhatsThis ( tr ( "<b>Connect / Disconnect Button:"
"</b> Push this button to connect the server. A valid IP address has " "</b> Push this button to connect the server. A valid IP address has "
"to be specified before. If the client is connected, pressing this " "to be specified before. If the client is connected, pressing this "
"button will disconnect the connection." ) ); "button will disconnect the connection." ) );
PushButtonConnect->setAccessibleName ( butConnect->setAccessibleName (
tr ( "Connect and disconnect toggle button" ) ); tr ( "Connect and disconnect toggle button" ) );
PushButtonConnect->setAccessibleDescription ( tr ( "Clicking on this " butConnect->setAccessibleDescription ( tr ( "Clicking on this "
"button changes the caption of the button from Connect to " "button changes the caption of the button from Connect to "
"Disconnect, i.e., it implements a toggle functionality for connecting " "Disconnect, i.e., it implements a toggle functionality for connecting "
"and disconnecting the llcon software." ) ); "and disconnecting the llcon software." ) );
@ -103,12 +103,12 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
"pseoudonym here so that the other musicians can identify you." ) + "pseoudonym here so that the other musicians can identify you." ) +
TOOLTIP_COM_END_TEXT; TOOLTIP_COM_END_TEXT;
TextLabelServerTag->setWhatsThis ( strFaderTag ); lblServerTag->setWhatsThis ( strFaderTag );
TextLabelServerTag->setToolTip ( strFaderTagTT ); lblServerTag->setToolTip ( strFaderTagTT );
LineEditFaderTag->setWhatsThis ( strFaderTag ); edtFaderTag->setWhatsThis ( strFaderTag );
LineEditFaderTag->setToolTip ( strFaderTagTT ); edtFaderTag->setToolTip ( strFaderTagTT );
LineEditFaderTag->setAccessibleName ( tr ( "Fader tag edit box" ) ); edtFaderTag->setAccessibleName ( tr ( "Fader tag edit box" ) );
// local audio input fader // local audio input fader
QString strAudFader = tr ( "<b>Local Audio Input Fader:</b> With the " QString strAudFader = tr ( "<b>Local Audio Input Fader:</b> With the "
@ -120,10 +120,10 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
"a direction where the label above the fader shows <i>L -x</i>, where " "a direction where the label above the fader shows <i>L -x</i>, where "
"<i>x</i> is the current attenuation indication. " ); "<i>x</i> is the current attenuation indication. " );
TextAudInFader->setWhatsThis ( strAudFader ); lblAudioPan->setWhatsThis ( strAudFader );
SliderAudInFader->setWhatsThis ( strAudFader ); sldAudioPan->setWhatsThis ( strAudFader );
SliderAudInFader->setAccessibleName ( tr ( "Local audio input fader (left/right)" ) ); sldAudioPan->setAccessibleName ( tr ( "Local audio input fader (left/right)" ) );
// reverberation level // reverberation level
QString strAudReverb = tr ( "<b>Reverberation Level:</b> A reverberation " QString strAudReverb = tr ( "<b>Reverberation Level:</b> A reverberation "
@ -138,10 +138,10 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
"minimum (which is the default setting), the reverberation effect is " "minimum (which is the default setting), the reverberation effect is "
"switched off and does not cause any additional CPU usage." ); "switched off and does not cause any additional CPU usage." );
TextLabelAudReverb->setWhatsThis ( strAudReverb ); lblAudioReverb->setWhatsThis ( strAudReverb );
SliderAudReverb->setWhatsThis ( strAudReverb ); sldAudioReverb->setWhatsThis ( strAudReverb );
SliderAudReverb->setAccessibleName ( tr ( "Reverberation effect level setting" ) ); sldAudioReverb->setAccessibleName ( tr ( "Reverberation effect level setting" ) );
// reverberation channel selection // reverberation channel selection
QString strRevChanSel = tr ( "<b>Reverberation Channel Selection:</b> " QString strRevChanSel = tr ( "<b>Reverberation Channel Selection:</b> "
@ -149,10 +149,10 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
"reverberation effect is applied can be chosen. Either the left " "reverberation effect is applied can be chosen. Either the left "
"or right input channel can be selected." ); "or right input channel can be selected." );
RadioButtonRevSelL->setWhatsThis ( strRevChanSel ); rbtReverbSelL->setWhatsThis ( strRevChanSel );
RadioButtonRevSelL->setAccessibleName ( tr ( "Left channel selection for reverberation" ) ); rbtReverbSelL->setAccessibleName ( tr ( "Left channel selection for reverberation" ) );
RadioButtonRevSelR->setWhatsThis ( strRevChanSel ); rbtReverbSelR->setWhatsThis ( strRevChanSel );
RadioButtonRevSelR->setAccessibleName ( tr ( "Right channel selection for reverberation" ) ); rbtReverbSelR->setAccessibleName ( tr ( "Right channel selection for reverberation" ) );
// connection LED // connection LED
QString strLEDConnection = tr ( "<b>Connection Status LED:</b> " QString strLEDConnection = tr ( "<b>Connection Status LED:</b> "
@ -163,10 +163,10 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
"If the light turns red and stays red, the connection to the " "If the light turns red and stays red, the connection to the "
"server is lost." ); "server is lost." );
TextLabelConnection->setWhatsThis ( strLEDConnection ); lblConnection->setWhatsThis ( strLEDConnection );
LEDConnection->setWhatsThis ( strLEDConnection ); ledConnection->setWhatsThis ( strLEDConnection );
LEDConnection->setAccessibleName ( tr ( "Connection status LED indicator" ) ); ledConnection->setAccessibleName ( tr ( "Connection status LED indicator" ) );
// delay LED // delay LED
QString strLEDDelay = tr ( "<b>Delay Status LED:</b> " QString strLEDDelay = tr ( "<b>Delay Status LED:</b> "
@ -176,13 +176,13 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
"it may be harder to play. If the light is red, the delay is too " "it may be harder to play. If the light is red, the delay is too "
"large for jamming." ); "large for jamming." );
TextLabelDelay->setWhatsThis ( strLEDDelay ); lblDelay->setWhatsThis ( strLEDDelay );
LEDDelay->setWhatsThis ( strLEDDelay ); ledDelay->setWhatsThis ( strLEDDelay );
LEDDelay->setToolTip ( tr ( "If this LED indicator turns red, " ledDelay->setToolTip ( tr ( "If this LED indicator turns red, "
"you will not have much fun using the llcon software." ) + "you will not have much fun using the llcon software." ) +
TOOLTIP_COM_END_TEXT ); TOOLTIP_COM_END_TEXT );
LEDDelay->setAccessibleName ( tr ( "Delay status LED indicator" ) ); ledDelay->setAccessibleName ( tr ( "Delay status LED indicator" ) );
// buffers LED // buffers LED
QString strLEDBuffers = tr ( "<b>Buffers Status LED:</b> " QString strLEDBuffers = tr ( "<b>Buffers Status LED:</b> "
@ -200,20 +200,20 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
"<li>The CPU of the client or server is at 100%.</li>" "<li>The CPU of the client or server is at 100%.</li>"
"</ul>" ); "</ul>" );
TextLabelBuffers->setWhatsThis ( strLEDBuffers ); lblBuffers->setWhatsThis ( strLEDBuffers );
LEDBuffers->setWhatsThis ( strLEDBuffers ); ledBuffers->setWhatsThis ( strLEDBuffers );
LEDBuffers->setAccessibleName ( tr ( "Buffers status LED indicator" ) ); ledBuffers->setAccessibleName ( tr ( "Buffers status LED indicator" ) );
// chat LED // chat LED
QString strLEDChat = tr ( "<b>Chat Status LED:</b> " QString strLEDChat = tr ( "<b>Chat Status LED:</b> "
"If the option Open Chat on New Message is not activated, this " "If the option Open Chat on New Message is not activated, this "
"status LED will turn green on a new received chat message." ); "status LED will turn green on a new received chat message." );
TextLabelChat->setWhatsThis ( strLEDChat ); lblChat->setWhatsThis ( strLEDChat );
LEDChat->setWhatsThis ( strLEDChat ); ledChat->setWhatsThis ( strLEDChat );
LEDBuffers->setAccessibleName ( tr ( "Chat status LED indicator" ) ); ledBuffers->setAccessibleName ( tr ( "Chat status LED indicator" ) );
// init GUI design // init GUI design
@ -223,36 +223,36 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
MainMixerBoard->HideAll(); MainMixerBoard->HideAll();
// init fader tag line edit // init fader tag line edit
LineEditFaderTag->setText ( pClient->strName ); edtFaderTag->setText ( pClient->strName );
// init status label // init status label
OnTimerStatus(); OnTimerStatus();
// init connection button text // init connection button text
PushButtonConnect->setText ( CON_BUT_CONNECTTEXT ); butConnect->setText ( CON_BUT_CONNECTTEXT );
// init input level meter bars // init input level meter bars
MultiColorLEDBarInputLevelL->setValue ( 0 ); lbrInputLevelL->setValue ( 0 );
MultiColorLEDBarInputLevelR->setValue ( 0 ); lbrInputLevelR->setValue ( 0 );
// init status LEDs // init status LEDs
LEDConnection->SetUpdateTime ( 2 * LED_BAR_UPDATE_TIME_MS ); ledConnection->SetUpdateTime ( 2 * LED_BAR_UPDATE_TIME_MS );
LEDChat->SetUpdateTime ( 2 * LED_BAR_UPDATE_TIME_MS ); ledChat->SetUpdateTime ( 2 * LED_BAR_UPDATE_TIME_MS );
LEDDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME_MS ); ledDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME_MS );
LEDDelay->Reset(); ledDelay->Reset();
// init slider controls --- // init slider controls ---
// audio in fader // audio in fader
SliderAudInFader->setRange ( AUD_FADER_IN_MIN, AUD_FADER_IN_MAX ); sldAudioPan->setRange ( AUD_FADER_IN_MIN, AUD_FADER_IN_MAX );
SliderAudInFader->setTickInterval ( AUD_FADER_IN_MAX / 5 ); sldAudioPan->setTickInterval ( AUD_FADER_IN_MAX / 5 );
UpdateAudioFaderSlider(); UpdateAudioFaderSlider();
// audio reverberation // audio reverberation
SliderAudReverb->setRange ( 0, AUD_REVERB_MAX ); sldAudioReverb->setRange ( 0, AUD_REVERB_MAX );
const int iCurAudReverb = pClient->GetReverbLevel(); const int iCurAudReverb = pClient->GetReverbLevel();
SliderAudReverb->setValue ( iCurAudReverb ); sldAudioReverb->setValue ( iCurAudReverb );
SliderAudReverb->setTickInterval ( AUD_REVERB_MAX / 5 ); sldAudioReverb->setTickInterval ( AUD_REVERB_MAX / 5 );
// init reverb channel // init reverb channel
UpdateRevSelection(); UpdateRevSelection();
@ -272,13 +272,13 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
// disable LEDs in main window if requested // disable LEDs in main window if requested
if ( bNewDisalbeLEDs ) if ( bNewDisalbeLEDs )
{ {
MultiColorLEDBarInputLevelL->setEnabled ( false ); lbrInputLevelL->setEnabled ( false );
MultiColorLEDBarInputLevelR->setEnabled ( false ); lbrInputLevelR->setEnabled ( false );
LEDConnection->setEnabled ( false ); ledConnection->setEnabled ( false );
LEDBuffers->setEnabled ( false ); ledBuffers->setEnabled ( false );
LEDDelay->setEnabled ( false ); ledDelay->setEnabled ( false );
LEDChat->setEnabled ( false ); ledChat->setEnabled ( false );
PushButtonConnect->setFocus(); butConnect->setFocus();
} }
@ -289,7 +289,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
// Better solution: increase thread priority of worker thread (since the // Better solution: increase thread priority of worker thread (since the
// user can always highlight the button manually, too) -> TODO // user can always highlight the button manually, too) -> TODO
#if defined ( __APPLE__ ) || defined ( __MACOSX ) #if defined ( __APPLE__ ) || defined ( __MACOSX )
PushButtonConnect->setDefault ( false ); butConnect->setDefault ( false );
#endif #endif
@ -320,7 +320,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
// Connections ------------------------------------------------------------- // Connections -------------------------------------------------------------
// push-buttons // push-buttons
QObject::connect ( PushButtonConnect, SIGNAL ( clicked() ), QObject::connect ( butConnect, SIGNAL ( clicked() ),
this, SLOT ( OnConnectDisconBut() ) ); this, SLOT ( OnConnectDisconBut() ) );
// timers // timers
@ -334,21 +334,21 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
this, SLOT ( OnTimerPing() ) ); this, SLOT ( OnTimerPing() ) );
// sliders // sliders
QObject::connect ( SliderAudInFader, SIGNAL ( valueChanged ( int ) ), QObject::connect ( sldAudioPan, SIGNAL ( valueChanged ( int ) ),
this, SLOT ( OnSliderAudInFader ( int ) ) ); this, SLOT ( OnAudioPanValueChanged ( int ) ) );
QObject::connect ( SliderAudReverb, SIGNAL ( valueChanged ( int ) ), QObject::connect ( sldAudioReverb, SIGNAL ( valueChanged ( int ) ),
this, SLOT ( OnSliderAudReverb ( int ) ) ); this, SLOT ( OnAudioReverbValueChanged ( int ) ) );
// radio buttons // radio buttons
QObject::connect ( RadioButtonRevSelL, SIGNAL ( clicked() ), QObject::connect ( rbtReverbSelL, SIGNAL ( clicked() ),
this, SLOT ( OnRevSelL() ) ); this, SLOT ( OnReverbSelLClicked() ) );
QObject::connect ( RadioButtonRevSelR, SIGNAL ( clicked() ), QObject::connect ( rbtReverbSelR, SIGNAL ( clicked() ),
this, SLOT ( OnRevSelR() ) ); this, SLOT ( OnReverbSelRClicked() ) );
// line edits // line edits
QObject::connect ( LineEditFaderTag, SIGNAL ( textChanged ( const QString& ) ), QObject::connect ( edtFaderTag, SIGNAL ( textChanged ( const QString& ) ),
this, SLOT ( OnFaderTagTextChanged ( const QString& ) ) ); this, SLOT ( OnFaderTagTextChanged ( const QString& ) ) );
// other // other
@ -416,7 +416,7 @@ void CLlconClientDlg::closeEvent ( QCloseEvent* Event )
} }
// store fader tag // store fader tag
pClient->strName = LineEditFaderTag->text(); pClient->strName = edtFaderTag->text();
// default implementation of this event handler routine // default implementation of this event handler routine
Event->accept(); Event->accept();
@ -426,26 +426,26 @@ void CLlconClientDlg::UpdateAudioFaderSlider()
{ {
// update slider and label of audio fader // update slider and label of audio fader
const int iCurAudInFader = pClient->GetAudioInFader(); const int iCurAudInFader = pClient->GetAudioInFader();
SliderAudInFader->setValue ( iCurAudInFader ); sldAudioPan->setValue ( iCurAudInFader );
// show in label the center position and what channel is // show in label the center position and what channel is
// attenuated // attenuated
if ( iCurAudInFader == AUD_FADER_IN_MIDDLE ) if ( iCurAudInFader == AUD_FADER_IN_MIDDLE )
{ {
TextLabelAudFader->setText ( "Center" ); lblAudioPanValue->setText ( "Center" );
} }
else else
{ {
if ( iCurAudInFader > AUD_FADER_IN_MIDDLE ) if ( iCurAudInFader > AUD_FADER_IN_MIDDLE )
{ {
// attenuation on right channel // attenuation on right channel
TextLabelAudFader->setText ( "R -" + lblAudioPanValue->setText ( "R -" +
QString().setNum ( iCurAudInFader - AUD_FADER_IN_MIDDLE ) ); QString().setNum ( iCurAudInFader - AUD_FADER_IN_MIDDLE ) );
} }
else else
{ {
// attenuation on left channel // attenuation on left channel
TextLabelAudFader->setText ( "L -" + lblAudioPanValue->setText ( "L -" +
QString().setNum ( AUD_FADER_IN_MIDDLE - iCurAudInFader ) ); QString().setNum ( AUD_FADER_IN_MIDDLE - iCurAudInFader ) );
} }
} }
@ -457,28 +457,28 @@ void CLlconClientDlg::UpdateRevSelection()
{ {
// for stereo make channel selection invisible since // for stereo make channel selection invisible since
// reverberation effect is always applied to both channels // reverberation effect is always applied to both channels
RadioButtonRevSelL->setVisible ( false ); rbtReverbSelL->setVisible ( false );
RadioButtonRevSelR->setVisible ( false ); rbtReverbSelR->setVisible ( false );
} }
else else
{ {
// make radio buttons visible // make radio buttons visible
RadioButtonRevSelL->setVisible ( true ); rbtReverbSelL->setVisible ( true );
RadioButtonRevSelR->setVisible ( true ); rbtReverbSelR->setVisible ( true );
// update value // update value
if ( pClient->IsReverbOnLeftChan() ) if ( pClient->IsReverbOnLeftChan() )
{ {
RadioButtonRevSelL->setChecked ( true ); rbtReverbSelL->setChecked ( true );
} }
else else
{ {
RadioButtonRevSelR->setChecked ( true ); rbtReverbSelR->setChecked ( true );
} }
} }
} }
void CLlconClientDlg::OnSliderAudInFader ( int value ) void CLlconClientDlg::OnAudioPanValueChanged ( int value )
{ {
pClient->SetAudioInFader ( value ); pClient->SetAudioInFader ( value );
UpdateAudioFaderSlider(); UpdateAudioFaderSlider();
@ -596,7 +596,7 @@ void CLlconClientDlg::OnFaderTagTextChanged ( const QString& strNewName )
else else
{ {
// text is too long, update control with shortend text // text is too long, update control with shortend text
LineEditFaderTag->setText ( strNewName.left ( MAX_LEN_FADER_TAG ) ); edtFaderTag->setText ( strNewName.left ( MAX_LEN_FADER_TAG ) );
} }
} }
@ -629,8 +629,8 @@ void CLlconClientDlg::OnTimerSigMet()
} }
// show current level // show current level
MultiColorLEDBarInputLevelL->setValue ( (int) ceil ( dCurSigLevelL ) ); lbrInputLevelL->setValue ( (int) ceil ( dCurSigLevelL ) );
MultiColorLEDBarInputLevelR->setValue ( (int) ceil ( dCurSigLevelR ) ); lbrInputLevelR->setValue ( (int) ceil ( dCurSigLevelR ) );
} }
void CLlconClientDlg::OnTimerPing() void CLlconClientDlg::OnTimerPing()
@ -673,7 +673,7 @@ void CLlconClientDlg::OnPingTimeResult ( int iPingTime )
} }
// update delay LED on the main window // update delay LED on the main window
LEDDelay->SetLight ( iOverallDelayLEDColor ); ledDelay->SetLight ( iOverallDelayLEDColor );
} }
void CLlconClientDlg::OnCLPingTimeWithNumClientsReceived ( CHostAddress InetAddr, void CLlconClientDlg::OnCLPingTimeWithNumClientsReceived ( CHostAddress InetAddr,
@ -785,7 +785,7 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart )
if ( bStartOk ) if ( bStartOk )
{ {
// change connect button text to "disconnect" // change connect button text to "disconnect"
PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT ); butConnect->setText ( CON_BUT_DISCONNECTTEXT );
// set server name in audio mixer group box title // set server name in audio mixer group box title
if ( ConnectDlg.GetServerListItemWasChosen() ) if ( ConnectDlg.GetServerListItemWasChosen() )
@ -811,7 +811,7 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart )
else else
{ {
// show the error as red light // show the error as red light
LEDConnection->SetLight ( MUL_COL_LED_RED ); ledConnection->SetLight ( MUL_COL_LED_RED );
} }
} }
@ -828,15 +828,15 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart )
} }
// change connect button text to "connect" // change connect button text to "connect"
PushButtonConnect->setText ( CON_BUT_CONNECTTEXT ); butConnect->setText ( CON_BUT_CONNECTTEXT );
// reset server name in audio mixer group box title // reset server name in audio mixer group box title
MainMixerBoard->SetServerName ( "" ); 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 ); lbrInputLevelL->setValue ( 0 );
MultiColorLEDBarInputLevelR->setValue ( 0 ); lbrInputLevelR->setValue ( 0 );
// stop ping time measurement timer // stop ping time measurement timer
TimerPing.stop(); TimerPing.stop();
@ -848,10 +848,10 @@ OnTimerStatus();
// TODO this seems not to work, LEDs are still updated afterwards... // TODO this seems not to work, LEDs are still updated afterwards...
// reset LEDs // reset LEDs
LEDConnection->Reset(); ledConnection->Reset();
LEDBuffers->Reset(); ledBuffers->Reset();
LEDDelay->Reset(); ledDelay->Reset();
LEDChat->Reset(); ledChat->Reset();
// clear mixer board (remove all faders) // clear mixer board (remove all faders)
@ -869,20 +869,20 @@ void CLlconClientDlg::UpdateDisplay()
// chat LED // chat LED
if ( bUnreadChatMessage ) if ( bUnreadChatMessage )
{ {
LEDChat->SetLight ( MUL_COL_LED_GREEN ); ledChat->SetLight ( MUL_COL_LED_GREEN );
} }
else else
{ {
LEDChat->Reset(); ledChat->Reset();
} }
// connection LED // connection LED
LEDConnection->SetLight ( MUL_COL_LED_GREEN ); ledConnection->SetLight ( MUL_COL_LED_GREEN );
} }
else else
{ {
// connection LED // connection LED
LEDConnection->SetLight ( MUL_COL_LED_RED ); ledConnection->SetLight ( MUL_COL_LED_RED );
} }
} }
} }
@ -912,10 +912,10 @@ void CLlconClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
// background frame the style sheet for QRadioButton was already set. But it // background frame the style sheet for QRadioButton was already set. But it
// seems that it is only applied if the style was set to default and then back // seems that it is only applied if the style was set to default and then back
// to GD_ORIGINAL. This seems to be a QT related issue... // to GD_ORIGINAL. This seems to be a QT related issue...
RadioButtonRevSelL->setStyleSheet ( "color: rgb(148, 148, 148);" rbtReverbSelL->setStyleSheet ( "color: rgb(148, 148, 148);"
"font: bold;" ); "font: bold;" );
RadioButtonRevSelR->setStyleSheet ( "color: rgb(148, 148, 148);" rbtReverbSelR->setStyleSheet ( "color: rgb(148, 148, 148);"
"font: bold;" ); "font: bold;" );
#endif #endif
break; break;
@ -926,8 +926,8 @@ RadioButtonRevSelR->setStyleSheet ( "color: rgb(148, 148, 148);"
#ifdef _WIN32 #ifdef _WIN32
// Workaround QT-Windows problem: See above description // Workaround QT-Windows problem: See above description
RadioButtonRevSelL->setStyleSheet ( "" ); rbtReverbSelL->setStyleSheet ( "" );
RadioButtonRevSelR->setStyleSheet ( "" ); rbtReverbSelR->setStyleSheet ( "" );
#endif #endif
break; break;
@ -951,14 +951,14 @@ void CLlconClientDlg::customEvent ( QEvent* Event )
case MS_JIT_BUF_PUT: case MS_JIT_BUF_PUT:
case MS_JIT_BUF_GET: case MS_JIT_BUF_GET:
// buffer status -> if any buffer goes red, this LED will go red // buffer status -> if any buffer goes red, this LED will go red
LEDBuffers->SetLight ( iStatus ); ledBuffers->SetLight ( iStatus );
break; break;
case MS_RESET_ALL: case MS_RESET_ALL:
LEDConnection->Reset(); ledConnection->Reset();
LEDBuffers->Reset(); ledBuffers->Reset();
LEDDelay->Reset(); ledDelay->Reset();
LEDChat->Reset(); ledChat->Reset();
break; break;
case MS_SET_JIT_BUF_SIZE: case MS_SET_JIT_BUF_SIZE:

View File

@ -123,15 +123,15 @@ public slots:
void OnOpenChatDialog() void OnOpenChatDialog()
{ ShowChatWindow(); } { ShowChatWindow(); }
void OnSliderAudInFader ( int value ); void OnAudioPanValueChanged ( int value );
void OnSliderAudReverb ( int value ) void OnAudioReverbValueChanged ( int value )
{ pClient->SetReverbLevel ( value ); } { pClient->SetReverbLevel ( value ); }
void OnRevSelL() void OnReverbSelLClicked()
{ pClient->SetReverbOnLeftChan ( true ); } { pClient->SetReverbOnLeftChan ( true ); }
void OnRevSelR() void OnReverbSelRClicked()
{ pClient->SetReverbOnLeftChan ( false ); } { pClient->SetReverbOnLeftChan ( false ); }
void OnConClientListMesReceived ( CVector<CChannelShortInfo> vecChanInfo ); void OnConClientListMesReceived ( CVector<CChannelShortInfo> vecChanInfo );

View File

@ -61,7 +61,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="PixmapLabelCorrados" > <widget class="QLabel" name="pxlLogo" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" > <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -113,7 +113,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextLabelConnection" > <widget class="QLabel" name="lblConnection" >
<property name="text" > <property name="text" >
<string>Connection</string> <string>Connection</string>
</property> </property>
@ -126,7 +126,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="CMultiColorLED" native="1" name="LEDConnection" > <widget class="CMultiColorLED" native="1" name="ledConnection" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -165,7 +165,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextLabelDelay" > <widget class="QLabel" name="lblDelay" >
<property name="text" > <property name="text" >
<string>Delay</string> <string>Delay</string>
</property> </property>
@ -178,7 +178,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="CMultiColorLED" native="1" name="LEDDelay" > <widget class="CMultiColorLED" native="1" name="ledDelay" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -217,7 +217,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextLabelBuffers" > <widget class="QLabel" name="lblBuffers" >
<property name="text" > <property name="text" >
<string>Buffers</string> <string>Buffers</string>
</property> </property>
@ -230,7 +230,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="CMultiColorLED" native="1" name="LEDBuffers" > <widget class="CMultiColorLED" native="1" name="ledBuffers" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -269,7 +269,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextLabelChat" > <widget class="QLabel" name="lblChat" >
<property name="text" > <property name="text" >
<string>Chat</string> <string>Chat</string>
</property> </property>
@ -282,7 +282,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="CMultiColorLED" native="1" name="LEDChat" > <widget class="CMultiColorLED" native="1" name="ledChat" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -330,7 +330,7 @@
<item> <item>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextInputLEDMeter" > <widget class="QLabel" name="lblInputLEDMeter" >
<property name="text" > <property name="text" >
<string>Input</string> <string>Input</string>
</property> </property>
@ -342,7 +342,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="CMultiColorLEDBar" native="1" name="MultiColorLEDBarInputLevelL" > <widget class="CMultiColorLEDBar" native="1" name="lbrInputLevelL" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" > <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -358,7 +358,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="CMultiColorLEDBar" native="1" name="MultiColorLEDBarInputLevelR" > <widget class="CMultiColorLEDBar" native="1" name="lbrInputLevelR" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" > <sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -378,7 +378,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="TextLevelMeterLeft" > <widget class="QLabel" name="lblLevelMeterLeft" >
<property name="text" > <property name="text" >
<string>L</string> <string>L</string>
</property> </property>
@ -388,7 +388,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="TextLevelMeterRight" > <widget class="QLabel" name="lblLevelMeterRight" >
<property name="text" > <property name="text" >
<string>R</string> <string>R</string>
</property> </property>
@ -427,7 +427,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="TextLabelServerTag" > <widget class="QLabel" name="lblServerTag" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" > <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -443,7 +443,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="LineEditFaderTag" > <widget class="QLineEdit" name="edtFaderTag" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" > <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -455,7 +455,7 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QPushButton" name="PushButtonConnect" > <widget class="QPushButton" name="butConnect" >
<property name="text" > <property name="text" >
<string>C&amp;onnect</string> <string>C&amp;onnect</string>
</property> </property>
@ -499,7 +499,7 @@
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="TextAudInFader" > <widget class="QLabel" name="lblAudioPan" >
<property name="text" > <property name="text" >
<string>Pan</string> <string>Pan</string>
</property> </property>
@ -509,7 +509,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="TextLabelAudFader" > <widget class="QLabel" name="lblAudioPanValue" >
<property name="minimumSize" > <property name="minimumSize" >
<size> <size>
<width>50</width> <width>50</width>
@ -561,7 +561,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QSlider" name="SliderAudInFader" > <widget class="QSlider" name="sldAudioPan" >
<property name="styleSheet" > <property name="styleSheet" >
<string/> <string/>
</property> </property>
@ -616,7 +616,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="TextLabelAudReverb" > <widget class="QLabel" name="lblAudioReverb" >
<property name="text" > <property name="text" >
<string>Reverb</string> <string>Reverb</string>
</property> </property>
@ -659,7 +659,7 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QSlider" name="SliderAudReverb" > <widget class="QSlider" name="sldAudioReverb" >
<property name="pageStep" > <property name="pageStep" >
<number>1</number> <number>1</number>
</property> </property>
@ -697,14 +697,14 @@
<number>3</number> <number>3</number>
</property> </property>
<item> <item>
<widget class="QRadioButton" name="RadioButtonRevSelL" > <widget class="QRadioButton" name="rbtReverbSelL" >
<property name="text" > <property name="text" >
<string>Left</string> <string>Left</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="RadioButtonRevSelR" > <widget class="QRadioButton" name="rbtReverbSelR" >
<property name="text" > <property name="text" >
<string>Right</string> <string>Right</string>
</property> </property>
@ -750,12 +750,12 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>PushButtonConnect</tabstop> <tabstop>butConnect</tabstop>
<tabstop>LineEditFaderTag</tabstop> <tabstop>edtFaderTag</tabstop>
<tabstop>SliderAudInFader</tabstop> <tabstop>sldAudioPan</tabstop>
<tabstop>SliderAudReverb</tabstop> <tabstop>sldAudioReverb</tabstop>
<tabstop>RadioButtonRevSelL</tabstop> <tabstop>rbtReverbSelL</tabstop>
<tabstop>RadioButtonRevSelR</tabstop> <tabstop>rbtReverbSelR</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="resources.qrc" /> <include location="resources.qrc" />

View File

@ -40,15 +40,15 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP,
// Add help text to controls ----------------------------------------------- // Add help text to controls -----------------------------------------------
// client list // client list
ListViewClients->setWhatsThis ( tr ( "<b>Client List:</b> The client list " lvwClients->setWhatsThis ( tr ( "<b>Client List:</b> The client list "
"shows all clients which are currently connected to this server. Some " "shows all clients which are currently connected to this server. Some "
"informations about the clients like the IP address, name, buffer " "informations about the clients like the IP address, name, buffer "
"state are given for each connected client." ) ); "state are given for each connected client." ) );
ListViewClients->setAccessibleName ( tr ( "Connected clients list view" ) ); lvwClients->setAccessibleName ( tr ( "Connected clients list view" ) );
// register server flag // register server flag
cbRegisterServer->setWhatsThis ( tr ( "<b>Register Server Status:</b> If " chbRegisterServer->setWhatsThis ( tr ( "<b>Register Server Status:</b> If "
"the register server check box is checked, this server registers " "the register server check box is checked, this server registers "
"itself at the central server so that all " ) + APP_NAME + "itself at the central server so that all " ) + APP_NAME +
tr ( " users can see the server in the connect dialog server list and " tr ( " users can see the server in the connect dialog server list and "
@ -62,14 +62,14 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP,
"at which this server is registered. If the Default check box is " "at which this server is registered. If the Default check box is "
"checked, the default central server address is shown read-only." ); "checked, the default central server address is shown read-only." );
LabelCentralServerAddress->setWhatsThis ( strCentrServAddr ); lblCentralServerAddress->setWhatsThis ( strCentrServAddr );
cbDefaultCentralServer->setWhatsThis ( strCentrServAddr ); chbDefaultCentralServer->setWhatsThis ( strCentrServAddr );
LineEditCentralServerAddress->setWhatsThis ( strCentrServAddr ); edtCentralServerAddress->setWhatsThis ( strCentrServAddr );
cbDefaultCentralServer->setAccessibleName ( chbDefaultCentralServer->setAccessibleName (
tr ( "Default central server check box" ) ); tr ( "Default central server check box" ) );
LineEditCentralServerAddress->setAccessibleName ( edtCentralServerAddress->setAccessibleName (
tr ( "Central server address line edit" ) ); tr ( "Central server address line edit" ) );
// server name // server name
@ -77,20 +77,20 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP,
"your server in the connect dialog server list at the clients. If no " "your server in the connect dialog server list at the clients. If no "
"name is given, the IP address is shown instead." ); "name is given, the IP address is shown instead." );
LabelServerName->setWhatsThis ( strServName ); lblServerName->setWhatsThis ( strServName );
LineEditServerName->setWhatsThis ( strServName ); edtServerName->setWhatsThis ( strServName );
LineEditServerName->setAccessibleName ( tr ( "Server name line edit" ) ); edtServerName->setAccessibleName ( tr ( "Server name line edit" ) );
// location city // location city
QString strLocCity = tr ( "<b>Location City:</b> The city in which this " QString strLocCity = tr ( "<b>Location City:</b> The city in which this "
"server is located can be set here. If a city name is entered, it " "server is located can be set here. If a city name is entered, it "
"will be shown in the connect dialog server list at the clients." ); "will be shown in the connect dialog server list at the clients." );
LabelLocationCity->setWhatsThis ( strLocCity ); lblLocationCity->setWhatsThis ( strLocCity );
LineEditLocationCity->setWhatsThis ( strLocCity ); edtLocationCity->setWhatsThis ( strLocCity );
LineEditLocationCity->setAccessibleName ( tr ( edtLocationCity->setAccessibleName ( tr (
"City where the server is located line edit" ) ); "City where the server is located line edit" ) );
// location country // location country
@ -99,10 +99,10 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP,
"entered, it will be shown in the connect dialog server list at the " "entered, it will be shown in the connect dialog server list at the "
"clients." ); "clients." );
LabelLocationCountry->setWhatsThis ( strLocCountry ); lblLocationCountry->setWhatsThis ( strLocCountry );
ComboBoxLocationCountry->setWhatsThis ( strLocCountry ); cbxLocationCountry->setWhatsThis ( strLocCountry );
ComboBoxLocationCountry->setAccessibleName ( tr ( cbxLocationCountry->setAccessibleName ( tr (
"Country where the server is located combo box" ) ); "Country where the server is located combo box" ) );
@ -141,19 +141,19 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP,
} }
// set text for version and application name // set text for version and application name
TextLabelNameVersion->setText ( QString ( APP_NAME ) + lblNameVersion->setText ( QString ( APP_NAME ) +
tr ( " server " ) + QString ( VERSION ) ); tr ( " server " ) + QString ( VERSION ) );
// set up list view for connected clients // set up list view for connected clients
ListViewClients->setColumnWidth ( 0, 170 ); lvwClients->setColumnWidth ( 0, 170 );
ListViewClients->setColumnWidth ( 1, 130 ); lvwClients->setColumnWidth ( 1, 130 );
ListViewClients->setColumnWidth ( 2, 60 ); lvwClients->setColumnWidth ( 2, 60 );
ListViewClients->clear(); lvwClients->clear();
// TEST workaround for resize problem of window after iconize in task bar // TEST workaround for resize problem of window after iconize in task bar
ListViewClients->setMinimumWidth ( 170 + 130 + 60 + 205 ); lvwClients->setMinimumWidth ( 170 + 130 + 60 + 205 );
ListViewClients->setMinimumHeight ( 140 ); lvwClients->setMinimumHeight ( 140 );
// insert items in reverse order because in Windows all of them are // insert items in reverse order because in Windows all of them are
@ -161,29 +161,29 @@ ListViewClients->setMinimumHeight ( 140 );
vecpListViewItems.Init ( USED_NUM_CHANNELS ); vecpListViewItems.Init ( USED_NUM_CHANNELS );
for ( int i = USED_NUM_CHANNELS - 1; i >= 0; i-- ) for ( int i = USED_NUM_CHANNELS - 1; i >= 0; i-- )
{ {
vecpListViewItems[i] = new CServerListViewItem ( ListViewClients ); vecpListViewItems[i] = new CServerListViewItem ( lvwClients );
vecpListViewItems[i]->setHidden ( true ); vecpListViewItems[i]->setHidden ( true );
} }
// update default central server address check box // update default central server address check box
if ( pServer->GetUseDefaultCentralServerAddress() ) if ( pServer->GetUseDefaultCentralServerAddress() )
{ {
cbDefaultCentralServer->setCheckState ( Qt::Checked ); chbDefaultCentralServer->setCheckState ( Qt::Checked );
} }
else else
{ {
cbDefaultCentralServer->setCheckState ( Qt::Unchecked ); chbDefaultCentralServer->setCheckState ( Qt::Unchecked );
} }
// update server name line edit // update server name line edit
LineEditServerName->setText ( pServer->GetServerName() ); edtServerName->setText ( pServer->GetServerName() );
// update server city line edit // update server city line edit
LineEditLocationCity->setText ( pServer->GetServerCity() ); edtLocationCity->setText ( pServer->GetServerCity() );
// load country combo box with all available countries // load country combo box with all available countries
ComboBoxLocationCountry->setInsertPolicy ( QComboBox::NoInsert ); cbxLocationCountry->setInsertPolicy ( QComboBox::NoInsert );
ComboBoxLocationCountry->clear(); cbxLocationCountry->clear();
for ( int iCurCntry = static_cast<int> ( QLocale::AnyCountry ); for ( int iCurCntry = static_cast<int> ( QLocale::AnyCountry );
iCurCntry < static_cast<int> ( QLocale::LastCountry ); iCurCntry++ ) iCurCntry < static_cast<int> ( QLocale::LastCountry ); iCurCntry++ )
@ -193,42 +193,42 @@ ListViewClients->setMinimumHeight ( 140 );
{ {
// store the country enum index together with the string (this is // store the country enum index together with the string (this is
// important since we sort the combo box items later on) // important since we sort the combo box items later on)
ComboBoxLocationCountry->addItem ( QLocale::countryToString ( cbxLocationCountry->addItem ( QLocale::countryToString (
static_cast<QLocale::Country> ( iCurCntry ) ), iCurCntry ); static_cast<QLocale::Country> ( iCurCntry ) ), iCurCntry );
} }
} }
// sort country combo box items in alphabetical order // sort country combo box items in alphabetical order
ComboBoxLocationCountry->model()->sort ( 0, Qt::AscendingOrder ); cbxLocationCountry->model()->sort ( 0, Qt::AscendingOrder );
// select current country // select current country
ComboBoxLocationCountry->setCurrentIndex ( cbxLocationCountry->setCurrentIndex (
ComboBoxLocationCountry->findData ( cbxLocationCountry->findData (
static_cast<int> ( pServer->GetServerCountry() ) ) ); static_cast<int> ( pServer->GetServerCountry() ) ) );
// update register server check box // update register server check box
if ( pServer->GetServerListEnabled() ) if ( pServer->GetServerListEnabled() )
{ {
cbRegisterServer->setCheckState ( Qt::Checked ); chbRegisterServer->setCheckState ( Qt::Checked );
} }
else else
{ {
cbRegisterServer->setCheckState ( Qt::Unchecked ); chbRegisterServer->setCheckState ( Qt::Unchecked );
} }
// update start minimized check box (only available for Windows) // update start minimized check box (only available for Windows)
#ifndef _WIN32 #ifndef _WIN32
cbStartOnOSStart->setVisible ( false ); chbStartOnOSStart->setVisible ( false );
#else #else
const bool bCurAutoStartMinState = pServer->GetAutoRunMinimized(); const bool bCurAutoStartMinState = pServer->GetAutoRunMinimized();
if ( bCurAutoStartMinState ) if ( bCurAutoStartMinState )
{ {
cbStartOnOSStart->setCheckState ( Qt::Checked ); chbStartOnOSStart->setCheckState ( Qt::Checked );
} }
else else
{ {
cbStartOnOSStart->setCheckState ( Qt::Unchecked ); chbStartOnOSStart->setCheckState ( Qt::Unchecked );
} }
// modify registry according to setting (this is just required in case a // modify registry according to setting (this is just required in case a
@ -259,29 +259,28 @@ ListViewClients->setMinimumHeight ( 140 );
// Connections ------------------------------------------------------------- // Connections -------------------------------------------------------------
// check boxes // check boxes
QObject::connect ( cbRegisterServer, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbRegisterServer, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnRegisterServerStateChanged ( int ) ) ); this, SLOT ( OnRegisterServerStateChanged ( int ) ) );
QObject::connect ( cbDefaultCentralServer, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbDefaultCentralServer, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnDefaultCentralServerStateChanged ( int ) ) ); this, SLOT ( OnDefaultCentralServerStateChanged ( int ) ) );
QObject::connect ( cbStartOnOSStart, SIGNAL ( stateChanged ( int ) ), QObject::connect ( chbStartOnOSStart, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnStartOnOSStartStateChanged ( int ) ) ); this, SLOT ( OnStartOnOSStartStateChanged ( int ) ) );
// line edits // line edits
QObject::connect ( LineEditCentralServerAddress, QObject::connect ( edtCentralServerAddress, SIGNAL ( editingFinished() ),
SIGNAL ( editingFinished() ), this, SLOT ( OnCentralServerAddressEditingFinished() ) );
this, SLOT ( OnLineEditCentralServerAddressEditingFinished() ) );
QObject::connect ( LineEditServerName, SIGNAL ( textChanged ( const QString& ) ), QObject::connect ( edtServerName, SIGNAL ( textChanged ( const QString& ) ),
this, SLOT ( OnLineEditServerNameTextChanged ( const QString& ) ) ); this, SLOT ( OnServerNameTextChanged ( const QString& ) ) );
QObject::connect ( LineEditLocationCity, SIGNAL ( textChanged ( const QString& ) ), QObject::connect ( edtLocationCity, SIGNAL ( textChanged ( const QString& ) ),
this, SLOT ( OnLineEditLocationCityTextChanged ( const QString& ) ) ); this, SLOT ( OnLocationCityTextChanged ( const QString& ) ) );
// combo boxes // combo boxes
QObject::connect ( ComboBoxLocationCountry, SIGNAL ( activated ( int ) ), QObject::connect ( cbxLocationCountry, SIGNAL ( activated ( int ) ),
this, SLOT ( OnComboBoxLocationCountryActivated ( int ) ) ); this, SLOT ( OnLocationCountryActivated ( int ) ) );
// timers // timers
QObject::connect ( &Timer, SIGNAL ( timeout() ), this, SLOT ( OnTimer() ) ); QObject::connect ( &Timer, SIGNAL ( timeout() ), this, SLOT ( OnTimer() ) );
@ -303,16 +302,16 @@ ListViewClients->setMinimumHeight ( 140 );
Timer.start ( GUI_CONTRL_UPDATE_TIME ); Timer.start ( GUI_CONTRL_UPDATE_TIME );
} }
void CLlconServerDlg::closeEvent ( QCloseEvent* Event ) void CLlconServerDlg::closeEvent ( QCloseEvent* Event )
{ {
// if server was registered at the central server, unregister on shutdown // if server was registered at the central server, unregister on shutdown
if ( pServer->GetServerListEnabled() ) if ( pServer->GetServerListEnabled() )
{ {
pServer->UnregisterSlaveServer(); pServer->UnregisterSlaveServer();
} }
// default implementation of this event handler routine // default implementation of this event handler routine
Event->accept(); Event->accept();
} }
void CLlconServerDlg::OnStartOnOSStartStateChanged ( int value ) void CLlconServerDlg::OnStartOnOSStartStateChanged ( int value )
@ -356,16 +355,16 @@ void CLlconServerDlg::OnRegisterServerStateChanged ( int value )
UpdateGUIDependencies(); UpdateGUIDependencies();
} }
void CLlconServerDlg::OnLineEditCentralServerAddressEditingFinished() void CLlconServerDlg::OnCentralServerAddressEditingFinished()
{ {
// apply new setting to the server and update it // apply new setting to the server and update it
pServer->SetServerListCentralServerAddress ( pServer->SetServerListCentralServerAddress (
LineEditCentralServerAddress->text() ); edtCentralServerAddress->text() );
pServer->UpdateServerList(); pServer->UpdateServerList();
} }
void CLlconServerDlg::OnLineEditServerNameTextChanged ( const QString& strNewName ) void CLlconServerDlg::OnServerNameTextChanged ( const QString& strNewName )
{ {
// check length // check length
if ( strNewName.length() <= MAX_LEN_SERVER_NAME ) if ( strNewName.length() <= MAX_LEN_SERVER_NAME )
@ -377,11 +376,11 @@ void CLlconServerDlg::OnLineEditServerNameTextChanged ( const QString& strNewNam
else else
{ {
// text is too long, update control with shortend text // text is too long, update control with shortend text
LineEditServerName->setText ( strNewName.left ( MAX_LEN_SERVER_NAME ) ); edtServerName->setText ( strNewName.left ( MAX_LEN_SERVER_NAME ) );
} }
} }
void CLlconServerDlg::OnLineEditLocationCityTextChanged ( const QString& strNewCity ) void CLlconServerDlg::OnLocationCityTextChanged ( const QString& strNewCity )
{ {
// check length // check length
if ( strNewCity.length() <= MAX_LEN_SERVER_CITY ) if ( strNewCity.length() <= MAX_LEN_SERVER_CITY )
@ -393,15 +392,15 @@ void CLlconServerDlg::OnLineEditLocationCityTextChanged ( const QString& strNewC
else else
{ {
// text is too long, update control with shortend text // text is too long, update control with shortend text
LineEditLocationCity->setText ( strNewCity.left ( MAX_LEN_SERVER_CITY ) ); edtLocationCity->setText ( strNewCity.left ( MAX_LEN_SERVER_CITY ) );
} }
} }
void CLlconServerDlg::OnComboBoxLocationCountryActivated ( int iCntryListItem ) void CLlconServerDlg::OnLocationCountryActivated ( int iCntryListItem )
{ {
// apply new setting to the server and update it // apply new setting to the server and update it
pServer->SetServerCountry ( static_cast<QLocale::Country> ( pServer->SetServerCountry ( static_cast<QLocale::Country> (
ComboBoxLocationCountry->itemData ( iCntryListItem ).toInt() ) ); cbxLocationCountry->itemData ( iCntryListItem ).toInt() ) );
pServer->UpdateServerList(); pServer->UpdateServerList();
} }
@ -472,29 +471,29 @@ void CLlconServerDlg::UpdateGUIDependencies()
// if register server is not enabled, we disable all the configuration // if register server is not enabled, we disable all the configuration
// controls for the server list // controls for the server list
cbDefaultCentralServer->setEnabled ( bCurSerListEnabled ); chbDefaultCentralServer->setEnabled ( bCurSerListEnabled );
GroupBoxServerInfo->setEnabled ( bCurSerListEnabled ); grbServerInfo->setEnabled ( bCurSerListEnabled );
// If the default central server address is enabled, the line edit shows // If the default central server address is enabled, the line edit shows
// the default server and is not editable. Make sure the line edit does not // the default server and is not editable. Make sure the line edit does not
// fire signals when we update the text. // fire signals when we update the text.
LineEditCentralServerAddress->blockSignals ( true ); edtCentralServerAddress->blockSignals ( true );
{ {
if ( bCurUseDefCentServAddr ) if ( bCurUseDefCentServAddr )
{ {
LineEditCentralServerAddress->setText ( DEFAULT_SERVER_ADDRESS ); edtCentralServerAddress->setText ( DEFAULT_SERVER_ADDRESS );
} }
else else
{ {
LineEditCentralServerAddress->setText ( edtCentralServerAddress->setText (
pServer->GetServerListCentralServerAddress() ); pServer->GetServerListCentralServerAddress() );
} }
} }
LineEditCentralServerAddress->blockSignals ( false ); edtCentralServerAddress->blockSignals ( false );
// the line edit of the central server address is only enabled, if the // the line edit of the central server address is only enabled, if the
// server list is enabled and not the default address is used // server list is enabled and not the default address is used
LineEditCentralServerAddress->setEnabled ( edtCentralServerAddress->setEnabled (
!bCurUseDefCentServAddr && bCurSerListEnabled ); !bCurUseDefCentServAddr && bCurSerListEnabled );
} }

View File

@ -90,10 +90,10 @@ public slots:
void OnRegisterServerStateChanged ( int value ); void OnRegisterServerStateChanged ( int value );
void OnDefaultCentralServerStateChanged ( int value ); void OnDefaultCentralServerStateChanged ( int value );
void OnStartOnOSStartStateChanged ( int value ); void OnStartOnOSStartStateChanged ( int value );
void OnLineEditCentralServerAddressEditingFinished(); void OnCentralServerAddressEditingFinished();
void OnLineEditServerNameTextChanged ( const QString& strNewName ); void OnServerNameTextChanged ( const QString& strNewName );
void OnLineEditLocationCityTextChanged ( const QString& strNewCity ); void OnLocationCityTextChanged ( const QString& strNewCity );
void OnComboBoxLocationCountryActivated ( int iCntryListItem ); void OnLocationCountryActivated ( int iCntryListItem );
void OnTimer(); void OnTimer();
void OnServerStarted() { UpdateSystemTrayIcon ( true ); } void OnServerStarted() { UpdateSystemTrayIcon ( true ); }
void OnServerStopped() { UpdateSystemTrayIcon ( false ); } void OnServerStopped() { UpdateSystemTrayIcon ( false ); }

View File

@ -20,7 +20,7 @@
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QTreeWidget" name="ListViewClients" > <widget class="QTreeWidget" name="lvwClients" >
<property name="rootIsDecorated" > <property name="rootIsDecorated" >
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -52,14 +52,14 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="cbStartOnOSStart" > <widget class="QCheckBox" name="chbStartOnOSStart" >
<property name="text" > <property name="text" >
<string>Start Minimized on Windows Start</string> <string>Start Minimized on Windows Start</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="cbRegisterServer" > <widget class="QCheckBox" name="chbRegisterServer" >
<property name="text" > <property name="text" >
<string>Register My Server in the Server List at the Central Server</string> <string>Register My Server in the Server List at the Central Server</string>
</property> </property>
@ -68,17 +68,17 @@
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<item> <item>
<widget class="QLabel" name="LabelCentralServerAddress" > <widget class="QLabel" name="lblCentralServerAddress" >
<property name="text" > <property name="text" >
<string>Central Server Address:</string> <string>Central Server Address:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="LineEditCentralServerAddress" /> <widget class="QLineEdit" name="edtCentralServerAddress" />
</item> </item>
<item> <item>
<widget class="QCheckBox" name="cbDefaultCentralServer" > <widget class="QCheckBox" name="chbDefaultCentralServer" >
<property name="text" > <property name="text" >
<string>Default</string> <string>Default</string>
</property> </property>
@ -87,7 +87,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="GroupBoxServerInfo" > <widget class="QGroupBox" name="grbServerInfo" >
<property name="title" > <property name="title" >
<string>My Server Info</string> <string>My Server Info</string>
</property> </property>
@ -95,21 +95,21 @@
<item> <item>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QLabel" name="LabelServerName" > <widget class="QLabel" name="lblServerName" >
<property name="text" > <property name="text" >
<string>Name</string> <string>Name</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="LabelLocationCity" > <widget class="QLabel" name="lblLocationCity" >
<property name="text" > <property name="text" >
<string>Location: City</string> <string>Location: City</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="LabelLocationCountry" > <widget class="QLabel" name="lblLocationCountry" >
<property name="text" > <property name="text" >
<string>Location: Country</string> <string>Location: Country</string>
</property> </property>
@ -120,13 +120,13 @@
<item> <item>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
<widget class="QLineEdit" name="LineEditServerName" /> <widget class="QLineEdit" name="edtServerName" />
</item> </item>
<item> <item>
<widget class="QLineEdit" name="LineEditLocationCity" /> <widget class="QLineEdit" name="edtLocationCity" />
</item> </item>
<item> <item>
<widget class="QComboBox" name="ComboBoxLocationCountry" /> <widget class="QComboBox" name="cbxLocationCountry" />
</item> </item>
</layout> </layout>
</item> </item>
@ -151,7 +151,7 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="TextLabelNameVersion" > <widget class="QLabel" name="lblNameVersion" >
<property name="text" > <property name="text" >
<string>TextLabelNameVersion</string> <string>TextLabelNameVersion</string>
</property> </property>

View File

@ -308,8 +308,8 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : QDialog ( parent )
setupUi ( this ); setupUi ( this );
// set the text for the about dialog html text control // set the text for the about dialog html text control
TextViewCredits->setOpenExternalLinks ( true ); txvCredits->setOpenExternalLinks ( true );
TextViewCredits->setText ( txvCredits->setText (
"<p>" // general description of llcon software "<p>" // general description of llcon software
"<big><b>llcon</b> " + tr("The llcon software enables musicians to " "<big><b>llcon</b> " + tr("The llcon software enables musicians to "
"perform real-time jam sessions over the internet. There is a llcon " "perform real-time jam sessions over the internet. There is a llcon "
@ -350,7 +350,7 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : QDialog ( parent )
"</center><br>"); "</center><br>");
// set version number in about dialog // set version number in about dialog
TextLabelVersion->setText ( GetVersionAndNameStr() ); lblVersion->setText ( GetVersionAndNameStr() );
} }
QString CAboutDlg::GetVersionAndNameStr ( const bool bWithHtml ) QString CAboutDlg::GetVersionAndNameStr ( const bool bWithHtml )