diff --git a/src/aboutdlgbase.ui b/src/aboutdlgbase.ui index 8617952d..3c1d4304 100755 --- a/src/aboutdlgbase.ui +++ b/src/aboutdlgbase.ui @@ -66,7 +66,7 @@ - + 0 @@ -121,7 +121,7 @@ 0 - + Author: Volker Fischer @@ -131,7 +131,7 @@ - + Copyright (C) 2005 - 2011 @@ -165,7 +165,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -249,7 +249,7 @@ buttonOk - TextViewCredits + txvCredits diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp index 2982916c..7f1c53c5 100755 --- a/src/chatdlg.cpp +++ b/src/chatdlg.cpp @@ -33,56 +33,56 @@ CChatDlg::CChatDlg ( QWidget* parent, Qt::WindowFlags f ) : // Add help text to controls ----------------------------------------------- - lineEditLocalInputText->setAccessibleName ( "New chat text edit box" ); - TextViewChatWindow->setAccessibleName ( "Chat history" ); + edtLocalInputText->setAccessibleName ( "New chat text edit box" ); + txvChatWindow->setAccessibleName ( "Chat history" ); // clear chat window and edit line - TextViewChatWindow->clear(); - lineEditLocalInputText->clear(); + txvChatWindow->clear(); + edtLocalInputText->clear(); // Connections ------------------------------------------------------------- - QObject::connect ( lineEditLocalInputText, + QObject::connect ( edtLocalInputText, SIGNAL ( textChanged ( const QString& ) ), - this, SLOT ( OnChatTextChanged ( const QString& ) ) ); + this, SLOT ( OnLocalInputTextTextChanged ( const QString& ) ) ); - QObject::connect ( lineEditLocalInputText, SIGNAL ( returnPressed() ), - this, SLOT ( OnNewLocalInputText() ) ); + QObject::connect ( edtLocalInputText, SIGNAL ( returnPressed() ), + this, SLOT ( OnLocalInputTextReturnPressed() ) ); - QObject::connect ( pbClear, SIGNAL ( pressed() ), - this, SLOT ( OnClearButtonPressed() ) ); + QObject::connect ( butClear, SIGNAL ( pressed() ), + this, SLOT ( OnClearPressed() ) ); } -void CChatDlg::OnChatTextChanged ( const QString& strNewText ) +void CChatDlg::OnLocalInputTextTextChanged ( const QString& strNewText ) { // check and correct length if ( strNewText.length() > MAX_LEN_CHAT_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 - emit NewLocalInputText ( lineEditLocalInputText->text() ); - lineEditLocalInputText->clear(); + emit NewLocalInputText ( edtLocalInputText->text() ); + edtLocalInputText->clear(); } -void CChatDlg::OnClearButtonPressed() +void CChatDlg::OnClearPressed() { // clear chat window - TextViewChatWindow->clear(); + txvChatWindow->clear(); } void CChatDlg::AddChatText ( QString strChatText ) { // add new text in chat window - TextViewChatWindow->append ( strChatText ); + txvChatWindow->append ( strChatText ); // notify accessibility plugin that text has changed - QAccessible::updateAccessibility ( TextViewChatWindow, 0, + QAccessible::updateAccessibility ( txvChatWindow, 0, QAccessible::ValueChanged ); } diff --git a/src/chatdlg.h b/src/chatdlg.h index c7b8aec7..f0b6be03 100755 --- a/src/chatdlg.h +++ b/src/chatdlg.h @@ -52,9 +52,9 @@ public: void AddChatText ( QString strChatText ); public slots: - void OnNewLocalInputText(); - void OnChatTextChanged ( const QString& strNewText ); - void OnClearButtonPressed(); + void OnLocalInputTextReturnPressed(); + void OnLocalInputTextTextChanged ( const QString& strNewText ); + void OnClearPressed(); signals: void NewLocalInputText ( QString strNewText ); diff --git a/src/chatdlgbase.ui b/src/chatdlgbase.ui index 43366470..164cc1f6 100755 --- a/src/chatdlgbase.ui +++ b/src/chatdlgbase.ui @@ -26,14 +26,14 @@ - + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - + @@ -54,7 +54,7 @@ - + Cl&ear @@ -81,9 +81,9 @@ - lineEditLocalInputText - TextViewChatWindow - pbClear + edtLocalInputText + txvChatWindow + butClear buttonClose diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp index 7f5aed10..0cfd80af 100755 --- a/src/clientsettingsdlg.cpp +++ b/src/clientsettingsdlg.cpp @@ -59,20 +59,20 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, "of dropouts is reached. The LED indicator will visualize the audio " "dropouts by a red light" ) + TOOLTIP_COM_END_TEXT; - TextNetBuf->setWhatsThis ( strJitterBufferSize ); - TextNetBuf->setToolTip ( strJitterBufferSizeTT ); - GroupBoxJitterBuffer->setWhatsThis ( strJitterBufferSize ); - GroupBoxJitterBuffer->setToolTip ( strJitterBufferSizeTT ); - SliderNetBuf->setWhatsThis ( strJitterBufferSize ); - SliderNetBuf->setAccessibleName ( tr ( "Jitter buffer slider control" ) ); - SliderNetBuf->setToolTip ( strJitterBufferSizeTT ); - cbAutoJitBuf->setAccessibleName ( tr ( "Auto jitter buffer switch" ) ); - cbAutoJitBuf->setToolTip ( strJitterBufferSizeTT ); - CLEDNetw->setAccessibleName ( tr ( "Jitter buffer status LED indicator" ) ); - CLEDNetw->setToolTip ( strJitterBufferSizeTT ); + TextNetBuf->setWhatsThis ( strJitterBufferSize ); + TextNetBuf->setToolTip ( strJitterBufferSizeTT ); + grbJitterBuffer->setWhatsThis ( strJitterBufferSize ); + grbJitterBuffer->setToolTip ( strJitterBufferSizeTT ); + sldNetBuf->setWhatsThis ( strJitterBufferSize ); + sldNetBuf->setAccessibleName ( tr ( "Jitter buffer slider control" ) ); + sldNetBuf->setToolTip ( strJitterBufferSizeTT ); + chbAutoJitBuf->setAccessibleName ( tr ( "Auto jitter buffer switch" ) ); + chbAutoJitBuf->setToolTip ( strJitterBufferSizeTT ); + ledNetw->setAccessibleName ( tr ( "Jitter buffer status LED indicator" ) ); + ledNetw->setToolTip ( strJitterBufferSizeTT ); // sound card device - cbSoundcard->setWhatsThis ( tr ( "Sound Card Device: The ASIO " + cbxSoundcard->setWhatsThis ( tr ( "Sound Card Device: The ASIO " "driver (sound card) can be selected using llcon under the Windows " "operating system. Under Linux, no sound card selection is possible " "(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 " "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 ASIO4ALL driver is used, " + cbxSoundcard->setToolTip ( tr ( "In case the ASIO4ALL driver is used, " "please note that this driver usually introduces approx. 10-30 ms of " "additional audio delay. Using a sound card with a native ASIO driver " "is therefore recommended.
If you are using the kX ASIO " @@ -100,16 +100,16 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, "Right channel) a different actual sound card channel can be " "selected." ); - lbInChannelMapping->setWhatsThis ( strSndCrdChanMapp ); - lbOutChannelMapping->setWhatsThis ( strSndCrdChanMapp ); - cbLInChan->setWhatsThis ( strSndCrdChanMapp ); - cbLInChan->setAccessibleName ( tr ( "Left input channel selection combo box" ) ); - cbRInChan->setWhatsThis ( strSndCrdChanMapp ); - cbRInChan->setAccessibleName ( tr ( "Right input channel selection combo box" ) ); - cbLOutChan->setWhatsThis ( strSndCrdChanMapp ); - cbLOutChan->setAccessibleName ( tr ( "Left output channel selection combo box" ) ); - cbROutChan->setWhatsThis ( strSndCrdChanMapp ); - cbROutChan->setAccessibleName ( tr ( "Right output channel selection combo box" ) ); + lblInChannelMapping->setWhatsThis ( strSndCrdChanMapp ); + lblOutChannelMapping->setWhatsThis ( strSndCrdChanMapp ); + cbxLInChan->setWhatsThis ( strSndCrdChanMapp ); + cbxLInChan->setAccessibleName ( tr ( "Left input channel selection combo box" ) ); + cbxRInChan->setWhatsThis ( strSndCrdChanMapp ); + cbxRInChan->setAccessibleName ( tr ( "Right input channel selection combo box" ) ); + cbxLOutChan->setWhatsThis ( strSndCrdChanMapp ); + cbxLOutChan->setAccessibleName ( tr ( "Left output channel selection combo box" ) ); + cbxROutChan->setWhatsThis ( strSndCrdChanMapp ); + cbxROutChan->setAccessibleName ( tr ( "Right output channel selection combo box" ) ); // sound card buffer delay QString strSndCrdBufDelay = tr ( "Sound Card Buffer Delay: The " @@ -148,43 +148,43 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, "use the Jack configuration tool to change the buffer size." ) + TOOLTIP_COM_END_TEXT; - rButBufferDelayPreferred->setWhatsThis ( strSndCrdBufDelay ); - rButBufferDelayPreferred->setAccessibleName ( tr ( "128 samples setting radio button" ) ); - rButBufferDelayPreferred->setToolTip ( strSndCrdBufDelayTT ); - rButBufferDelayDefault->setWhatsThis ( strSndCrdBufDelay ); - rButBufferDelayDefault->setAccessibleName ( tr ( "256 samples setting radio button" ) ); - rButBufferDelayDefault->setToolTip ( strSndCrdBufDelayTT ); - rButBufferDelaySafe->setWhatsThis ( strSndCrdBufDelay ); - rButBufferDelaySafe->setAccessibleName ( tr ( "512 samples setting radio button" ) ); - rButBufferDelaySafe->setToolTip ( strSndCrdBufDelayTT ); - ButtonDriverSetup->setWhatsThis ( strSndCrdBufDelay ); - ButtonDriverSetup->setAccessibleName ( tr ( "ASIO setup push button" ) ); - ButtonDriverSetup->setToolTip ( strSndCrdBufDelayTT ); + rbtBufferDelayPreferred->setWhatsThis ( strSndCrdBufDelay ); + rbtBufferDelayPreferred->setAccessibleName ( tr ( "128 samples setting radio button" ) ); + rbtBufferDelayPreferred->setToolTip ( strSndCrdBufDelayTT ); + rbtBufferDelayDefault->setWhatsThis ( strSndCrdBufDelay ); + rbtBufferDelayDefault->setAccessibleName ( tr ( "256 samples setting radio button" ) ); + rbtBufferDelayDefault->setToolTip ( strSndCrdBufDelayTT ); + rbtBufferDelaySafe->setWhatsThis ( strSndCrdBufDelay ); + rbtBufferDelaySafe->setAccessibleName ( tr ( "512 samples setting radio button" ) ); + rbtBufferDelaySafe->setToolTip ( strSndCrdBufDelayTT ); + butDriverSetup->setWhatsThis ( strSndCrdBufDelay ); + butDriverSetup->setAccessibleName ( tr ( "ASIO setup push button" ) ); + butDriverSetup->setToolTip ( strSndCrdBufDelayTT ); // open chat on new message - cbOpenChatOnNewMessage->setWhatsThis ( tr ( "Open Chat on New " + chbOpenChatOnNewMessage->setWhatsThis ( tr ( "Open Chat on New " "Message: If this checkbox is enabled, the chat window will " "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" ) ); - 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 " "new message has arrived." ) + TOOLTIP_COM_END_TEXT ); // use high quality audio - cbUseHighQualityAudio->setWhatsThis ( tr ( "Use High Quality Audio " + chbUseHighQualityAudio->setWhatsThis ( tr ( "Use High Quality Audio " "Enabling ""Use High Quality Audio"" will improve the audio quality " "by increasing the stream data rate. Make sure that the current " "upload rate does not exceed the available bandwidth of your " "internet connection." ) ); - cbUseHighQualityAudio->setAccessibleName ( tr ( "Use high quality audio " + chbUseHighQualityAudio->setAccessibleName ( tr ( "Use high quality audio " "check box" ) ); // use stereo - cbUseStereo->setWhatsThis ( tr ( "Stereo Streaming " + chbUseStereo->setWhatsThis ( tr ( "Stereo Streaming " "Enables the stereo streaming mode. If not checked, a mono streaming " "mode is used. Enabling the stereo streaming mode will increase the " "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 " "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 QString strCentrServAddr = tr ( "Central Server Address: The " @@ -202,14 +202,14 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, "Default check box is checked, the default central server address is " "shown read-only." ); - LabelCentralServerAddress->setWhatsThis ( strCentrServAddr ); - cbDefaultCentralServer->setWhatsThis ( strCentrServAddr ); - LineEditCentralServerAddress->setWhatsThis ( strCentrServAddr ); + lblCentralServerAddress->setWhatsThis ( strCentrServAddr ); + chbDefaultCentralServer->setWhatsThis ( strCentrServAddr ); + edtCentralServerAddress->setWhatsThis ( strCentrServAddr ); - cbDefaultCentralServer->setAccessibleName ( + chbDefaultCentralServer->setAccessibleName ( tr ( "Default central server check box" ) ); - LineEditCentralServerAddress->setAccessibleName ( + edtCentralServerAddress->setAccessibleName ( tr ( "Central server address line edit" ) ); // current connection status parameter @@ -227,52 +227,52 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, "higher than the available rate (check the upstream capabilities of " "your internet connection by, e.g., using speedtest.net)." ); - TextPingTime->setWhatsThis ( strConnStats ); - TextLabelPingTime->setWhatsThis ( strConnStats ); - TextOverallDelay->setWhatsThis ( strConnStats ); - TextLabelOverallDelay->setWhatsThis ( strConnStats ); - TextUpstream->setWhatsThis ( strConnStats ); - TextUpstreamValue->setWhatsThis ( strConnStats ); - CLEDOverallDelay->setWhatsThis ( strConnStats ); - CLEDOverallDelay->setToolTip ( tr ( "If this LED indicator turns red, " + lblPingTime->setWhatsThis ( strConnStats ); + lblPingTimeValue->setWhatsThis ( strConnStats ); + lblOverallDelay->setWhatsThis ( strConnStats ); + lblOverallDelayValue->setWhatsThis ( strConnStats ); + lblUpstream->setWhatsThis ( strConnStats ); + lblUpstreamValue->setWhatsThis ( strConnStats ); + ledOverallDelay->setWhatsThis ( strConnStats ); + ledOverallDelay->setToolTip ( tr ( "If this LED indicator turns red, " "you will not have much fun using the llcon software." ) + TOOLTIP_COM_END_TEXT ); // init driver button #ifdef _WIN32 - ButtonDriverSetup->setText ( "ASIO Setup" ); + butDriverSetup->setText ( "ASIO Setup" ); #else // no use for this button for Linux right now, maybe later used // for Jack - ButtonDriverSetup->hide(); + butDriverSetup->hide(); // for Jack interface, we cannot choose the audio hardware from // within the llcon software, hide the combo box - TextSoundcardDevice->hide(); - cbSoundcard->hide(); + lblSoundcardDevice->hide(); + cbxSoundcard->hide(); #endif // init delay and other information controls - CLEDOverallDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME_MS ); - CLEDOverallDelay->Reset(); - TextLabelPingTime->setText ( "" ); - TextLabelOverallDelay->setText ( "" ); - TextUpstreamValue->setText ( "" ); + ledOverallDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME_MS ); + ledOverallDelay->Reset(); + lblPingTimeValue->setText ( "" ); + lblOverallDelayValue->setText ( "" ); + lblUpstreamValue->setText ( "" ); // init slider controls --- // 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(); // init combo box containing all available sound cards in the system - cbSoundcard->clear(); + cbxSoundcard->clear(); 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 UpdateSoundChannelSelectionFrame(); @@ -280,70 +280,70 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, // "OpenChatOnNewMessage" check box if ( pClient->GetOpenChatOnNewMessage() ) { - cbOpenChatOnNewMessage->setCheckState ( Qt::Checked ); + chbOpenChatOnNewMessage->setCheckState ( Qt::Checked ); } else { - cbOpenChatOnNewMessage->setCheckState ( Qt::Unchecked ); + chbOpenChatOnNewMessage->setCheckState ( Qt::Unchecked ); } // fancy GUI design check box if ( pClient->GetGUIDesign() == GD_STANDARD ) { - cbGUIDesignFancy->setCheckState ( Qt::Unchecked ); + chbGUIDesignFancy->setCheckState ( Qt::Unchecked ); } else { - cbGUIDesignFancy->setCheckState ( Qt::Checked ); + chbGUIDesignFancy->setCheckState ( Qt::Checked ); } // "High Quality Audio" check box if ( pClient->GetCELTHighQuality() ) { - cbUseHighQualityAudio->setCheckState ( Qt::Checked ); + chbUseHighQualityAudio->setCheckState ( Qt::Checked ); } else { - cbUseHighQualityAudio->setCheckState ( Qt::Unchecked ); + chbUseHighQualityAudio->setCheckState ( Qt::Unchecked ); } // "Stereo" check box if ( pClient->GetUseStereo() ) { - cbUseStereo->setCheckState ( Qt::Checked ); + chbUseStereo->setCheckState ( Qt::Checked ); } else { - cbUseStereo->setCheckState ( Qt::Unchecked ); + chbUseStereo->setCheckState ( Qt::Unchecked ); } // update default central server address check box if ( pClient->GetUseDefaultCentralServerAddress() ) { - cbDefaultCentralServer->setCheckState ( Qt::Checked ); + chbDefaultCentralServer->setCheckState ( Qt::Checked ); } else { - cbDefaultCentralServer->setCheckState ( Qt::Unchecked ); + chbDefaultCentralServer->setCheckState ( Qt::Unchecked ); } UpdateCentralServerDependency(); // set text for sound card buffer delay radio buttons - rButBufferDelayPreferred->setText ( GenSndCrdBufferDelayString ( + rbtBufferDelayPreferred->setText ( GenSndCrdBufferDelayString ( FRAME_SIZE_FACTOR_PREFERRED * SYSTEM_FRAME_SIZE_SAMPLES, ", preferred" ) ); - rButBufferDelayDefault->setText ( GenSndCrdBufferDelayString ( + rbtBufferDelayDefault->setText ( GenSndCrdBufferDelayString ( FRAME_SIZE_FACTOR_DEFAULT * SYSTEM_FRAME_SIZE_SAMPLES, ", default" ) ); - rButBufferDelaySafe->setText ( GenSndCrdBufferDelayString ( + rbtBufferDelaySafe->setText ( GenSndCrdBufferDelayString ( FRAME_SIZE_FACTOR_SAFE * SYSTEM_FRAME_SIZE_SAMPLES ) ); // sound card buffer delay inits - SndCrdBufferDelayButtonGroup.addButton ( rButBufferDelayPreferred ); - SndCrdBufferDelayButtonGroup.addButton ( rButBufferDelayDefault ); - SndCrdBufferDelayButtonGroup.addButton ( rButBufferDelaySafe ); + SndCrdBufferDelayButtonGroup.addButton ( rbtBufferDelayPreferred ); + SndCrdBufferDelayButtonGroup.addButton ( rbtBufferDelayDefault ); + SndCrdBufferDelayButtonGroup.addButton ( rbtBufferDelaySafe ); UpdateSoundCardFrame(); @@ -354,52 +354,51 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent, this, SLOT ( OnTimerStatus() ) ); // slider controls - QObject::connect ( SliderNetBuf, SIGNAL ( valueChanged ( int ) ), - this, SLOT ( OnSliderNetBuf ( int ) ) ); + QObject::connect ( sldNetBuf, SIGNAL ( valueChanged ( int ) ), + this, SLOT ( OnNetBufValueChanged ( int ) ) ); // check boxes - QObject::connect ( cbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ), + QObject::connect ( chbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnOpenChatOnNewMessageStateChanged ( int ) ) ); - QObject::connect ( cbGUIDesignFancy, SIGNAL ( stateChanged ( int ) ), + QObject::connect ( chbGUIDesignFancy, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnGUIDesignFancyStateChanged ( int ) ) ); - QObject::connect ( cbUseHighQualityAudio, SIGNAL ( stateChanged ( int ) ), + QObject::connect ( chbUseHighQualityAudio, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnUseHighQualityAudioStateChanged ( int ) ) ); - QObject::connect ( cbUseStereo, SIGNAL ( stateChanged ( int ) ), + QObject::connect ( chbUseStereo, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnUseStereoStateChanged ( int ) ) ); - QObject::connect ( cbAutoJitBuf, SIGNAL ( stateChanged ( int ) ), - this, SLOT ( OnAutoJitBuf ( int ) ) ); + QObject::connect ( chbAutoJitBuf, SIGNAL ( stateChanged ( int ) ), + this, SLOT ( OnAutoJitBufStateChanged ( int ) ) ); - QObject::connect ( cbDefaultCentralServer, SIGNAL ( stateChanged ( int ) ), + QObject::connect ( chbDefaultCentralServer, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnDefaultCentralServerStateChanged ( int ) ) ); // line edits - QObject::connect ( LineEditCentralServerAddress, - SIGNAL ( editingFinished() ), - this, SLOT ( OnLineEditCentralServerAddressEditingFinished() ) ); + QObject::connect ( edtCentralServerAddress, SIGNAL ( editingFinished() ), + this, SLOT ( OnCentralServerAddressEditingFinished() ) ); // combo boxes - QObject::connect ( cbSoundcard, SIGNAL ( activated ( int ) ), - this, SLOT ( OnSoundCrdSelection ( int ) ) ); + QObject::connect ( cbxSoundcard, SIGNAL ( activated ( int ) ), + this, SLOT ( OnSoundcardActivated ( int ) ) ); - QObject::connect ( cbLInChan, SIGNAL ( activated ( int ) ), - this, SLOT ( OnSndCrdLeftInChannelSelection ( int ) ) ); + QObject::connect ( cbxLInChan, SIGNAL ( activated ( int ) ), + this, SLOT ( OnLInChanActivated ( int ) ) ); - QObject::connect ( cbRInChan, SIGNAL ( activated ( int ) ), - this, SLOT ( OnSndCrdRightInChannelSelection ( int ) ) ); + QObject::connect ( cbxRInChan, SIGNAL ( activated ( int ) ), + this, SLOT ( OnRInChanActivated ( int ) ) ); - QObject::connect ( cbLOutChan, SIGNAL ( activated ( int ) ), - this, SLOT ( OnSndCrdLeftOutChannelSelection ( int ) ) ); + QObject::connect ( cbxLOutChan, SIGNAL ( activated ( int ) ), + this, SLOT ( OnLOutChanActivated ( int ) ) ); - QObject::connect ( cbROutChan, SIGNAL ( activated ( int ) ), - this, SLOT ( OnSndCrdRightOutChannelSelection ( int ) ) ); + QObject::connect ( cbxROutChan, SIGNAL ( activated ( int ) ), + this, SLOT ( OnROutChanActivated ( int ) ) ); // buttons - QObject::connect ( ButtonDriverSetup, SIGNAL ( clicked() ), - this, SLOT ( OnDriverSetupBut() ) ); + QObject::connect ( butDriverSetup, SIGNAL ( clicked() ), + this, SLOT ( OnDriverSetupClicked() ) ); // misc QObject::connect ( &SndCrdBufferDelayButtonGroup, @@ -416,13 +415,13 @@ void CClientSettingsDlg::UpdateJitterBufferFrame() { // update slider value and text const int iCurNumNetBuf = pClient->GetSockBufNumFrames(); - SliderNetBuf->setValue ( iCurNumNetBuf ); + sldNetBuf->setValue ( iCurNumNetBuf ); TextNetBuf->setText ( "Size: " + QString().setNum ( iCurNumNetBuf ) ); // if auto setting is enabled, disable slider control - cbAutoJitBuf->setChecked ( pClient->GetDoAutoSockBufSize() ); - SliderNetBuf->setEnabled ( !pClient->GetDoAutoSockBufSize() ); - TextNetBuf->setEnabled ( !pClient->GetDoAutoSockBufSize() ); + chbAutoJitBuf->setChecked ( pClient->GetDoAutoSockBufSize() ); + sldNetBuf->setEnabled ( !pClient->GetDoAutoSockBufSize() ); + TextNetBuf->setEnabled ( !pClient->GetDoAutoSockBufSize() ); } QString CClientSettingsDlg::GenSndCrdBufferDelayString ( const int iFrameSize, @@ -449,25 +448,25 @@ void CClientSettingsDlg::UpdateSoundCardFrame() // are disabeld and unchecked.). SndCrdBufferDelayButtonGroup.setExclusive ( false ); - rButBufferDelayPreferred->setChecked ( iCurActualBufSize == + rbtBufferDelayPreferred->setChecked ( iCurActualBufSize == SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_PREFERRED ); - rButBufferDelayDefault->setChecked ( iCurActualBufSize == + rbtBufferDelayDefault->setChecked ( iCurActualBufSize == SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_DEFAULT ); - rButBufferDelaySafe->setChecked ( iCurActualBufSize == + rbtBufferDelaySafe->setChecked ( iCurActualBufSize == SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_SAFE ); SndCrdBufferDelayButtonGroup.setExclusive ( true ); // disable radio buttons which are not supported by audio interface - rButBufferDelayPreferred->setEnabled ( + rbtBufferDelayPreferred->setEnabled ( pClient->GetFraSiFactPrefSupported() ); - rButBufferDelayDefault->setEnabled ( + rbtBufferDelayDefault->setEnabled ( pClient->GetFraSiFactDefSupported() ); - rButBufferDelaySafe->setEnabled ( + rbtBufferDelaySafe->setEnabled ( pClient->GetFraSiFactSafeSupported() ); } @@ -492,26 +491,26 @@ void CClientSettingsDlg::UpdateSoundChannelSelectionFrame() FrameSoundcardChannelSelection->setVisible ( true ); // input - cbLInChan->clear(); - cbRInChan->clear(); + cbxLInChan->clear(); + cbxRInChan->clear(); for ( iSndChanIdx = 0; iSndChanIdx < pClient->GetSndCrdNumInputChannels(); iSndChanIdx++ ) { - cbLInChan->addItem ( pClient->GetSndCrdInputChannelName ( iSndChanIdx ) ); - cbRInChan->addItem ( pClient->GetSndCrdInputChannelName ( iSndChanIdx ) ); + cbxLInChan->addItem ( pClient->GetSndCrdInputChannelName ( iSndChanIdx ) ); + cbxRInChan->addItem ( pClient->GetSndCrdInputChannelName ( iSndChanIdx ) ); } - cbLInChan->setCurrentIndex ( pClient->GetSndCrdLeftInputChannel() ); - cbRInChan->setCurrentIndex ( pClient->GetSndCrdRightInputChannel() ); + cbxLInChan->setCurrentIndex ( pClient->GetSndCrdLeftInputChannel() ); + cbxRInChan->setCurrentIndex ( pClient->GetSndCrdRightInputChannel() ); // output - cbLOutChan->clear(); - cbROutChan->clear(); + cbxLOutChan->clear(); + cbxROutChan->clear(); for ( iSndChanIdx = 0; iSndChanIdx < pClient->GetSndCrdNumOutputChannels(); iSndChanIdx++ ) { - cbLOutChan->addItem ( pClient->GetSndCrdOutputChannelName ( iSndChanIdx ) ); - cbROutChan->addItem ( pClient->GetSndCrdOutputChannelName ( iSndChanIdx ) ); + cbxLOutChan->addItem ( pClient->GetSndCrdOutputChannelName ( iSndChanIdx ) ); + cbxROutChan->addItem ( pClient->GetSndCrdOutputChannelName ( iSndChanIdx ) ); } - cbLOutChan->setCurrentIndex ( pClient->GetSndCrdLeftOutputChannel() ); - cbROutChan->setCurrentIndex ( pClient->GetSndCrdRightOutputChannel() ); + cbxLOutChan->setCurrentIndex ( pClient->GetSndCrdLeftOutputChannel() ); + cbxROutChan->setCurrentIndex ( pClient->GetSndCrdRightOutputChannel() ); } #else // 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 // the default server and is not editable. Make sure the line edit does not // fire signals when we update the text. - LineEditCentralServerAddress->blockSignals ( true ); + edtCentralServerAddress->blockSignals ( true ); { if ( bCurUseDefCentServAddr ) { - LineEditCentralServerAddress->setText ( DEFAULT_SERVER_ADDRESS ); + edtCentralServerAddress->setText ( DEFAULT_SERVER_ADDRESS ); } else { - LineEditCentralServerAddress->setText ( + edtCentralServerAddress->setText ( pClient->GetServerListCentralServerAddress() ); } } - LineEditCentralServerAddress->blockSignals ( false ); + edtCentralServerAddress->blockSignals ( false ); // the line edit of the central server address is only enabled, if not the // default address is used - LineEditCentralServerAddress->setEnabled ( !bCurUseDefCentServAddr ); + edtCentralServerAddress->setEnabled ( !bCurUseDefCentServAddr ); } -void CClientSettingsDlg::OnDriverSetupBut() +void CClientSettingsDlg::OnDriverSetupClicked() { pClient->OpenSndCrdDriverSetup(); } -void CClientSettingsDlg::OnSliderNetBuf ( int value ) +void CClientSettingsDlg::OnNetBufValueChanged ( int value ) { pClient->SetSockBufNumFrames ( value ); UpdateJitterBufferFrame(); @@ -563,7 +562,7 @@ void CClientSettingsDlg::OnSliderSndCrdBufferDelay ( int value ) UpdateDisplay(); } -void CClientSettingsDlg::OnSoundCrdSelection ( int iSndDevIdx ) +void CClientSettingsDlg::OnSoundcardActivated ( int iSndDevIdx ) { const QString strError = pClient->SetSndCrdDev ( iSndDevIdx ); @@ -576,37 +575,37 @@ void CClientSettingsDlg::OnSoundCrdSelection ( int iSndDevIdx ) "Ok", 0 ); // recover old selection - cbSoundcard->setCurrentIndex ( pClient->GetSndCrdDev() ); + cbxSoundcard->setCurrentIndex ( pClient->GetSndCrdDev() ); } UpdateSoundChannelSelectionFrame(); UpdateDisplay(); } -void CClientSettingsDlg::OnSndCrdLeftInChannelSelection ( int iChanIdx ) +void CClientSettingsDlg::OnLInChanActivated ( int iChanIdx ) { pClient->SetSndCrdLeftInputChannel ( iChanIdx ); UpdateSoundChannelSelectionFrame(); } -void CClientSettingsDlg::OnSndCrdRightInChannelSelection ( int iChanIdx ) +void CClientSettingsDlg::OnRInChanActivated ( int iChanIdx ) { pClient->SetSndCrdRightInputChannel ( iChanIdx ); UpdateSoundChannelSelectionFrame(); } -void CClientSettingsDlg::OnSndCrdLeftOutChannelSelection ( int iChanIdx ) +void CClientSettingsDlg::OnLOutChanActivated ( int iChanIdx ) { pClient->SetSndCrdLeftOutputChannel ( iChanIdx ); UpdateSoundChannelSelectionFrame(); } -void CClientSettingsDlg::OnSndCrdRightOutChannelSelection ( int iChanIdx ) +void CClientSettingsDlg::OnROutChanActivated ( int iChanIdx ) { pClient->SetSndCrdRightOutputChannel ( iChanIdx ); UpdateSoundChannelSelectionFrame(); } -void CClientSettingsDlg::OnAutoJitBuf ( int value ) +void CClientSettingsDlg::OnAutoJitBufStateChanged ( int value ) { pClient->SetDoAutoSockBufSize ( value == Qt::Checked ); UpdateJitterBufferFrame(); @@ -654,26 +653,26 @@ void CClientSettingsDlg::OnDefaultCentralServerStateChanged ( int value ) UpdateCentralServerDependency(); } -void CClientSettingsDlg::OnLineEditCentralServerAddressEditingFinished() +void CClientSettingsDlg::OnCentralServerAddressEditingFinished() { // store new setting in the client pClient->SetServerListCentralServerAddress ( - LineEditCentralServerAddress->text() ); + edtCentralServerAddress->text() ); } void CClientSettingsDlg::OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button ) { - if ( button == rButBufferDelayPreferred ) + if ( button == rbtBufferDelayPreferred ) { pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_PREFERRED ); } - if ( button == rButBufferDelayDefault ) + if ( button == rbtBufferDelayDefault ) { pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT ); } - if ( button == rButBufferDelaySafe ) + if ( button == rbtBufferDelaySafe ) { pClient->SetSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_SAFE ); } @@ -692,18 +691,18 @@ void CClientSettingsDlg::SetPingTimeResult ( const int iPingTime, const QString sErrorText = ">500 ms"; - TextLabelPingTime->setText ( sErrorText ); - TextLabelOverallDelay->setText ( sErrorText ); + lblPingTimeValue->setText ( sErrorText ); + lblOverallDelayValue->setText ( sErrorText ); } else { - TextLabelPingTime->setText ( QString().setNum ( iPingTime ) + " ms" ); - TextLabelOverallDelay->setText ( + lblPingTimeValue->setText ( QString().setNum ( iPingTime ) + " ms" ); + lblOverallDelayValue->setText ( QString().setNum ( iOverallDelayMs ) + " ms" ); } // set current LED status - CLEDOverallDelay->SetLight ( iOverallDelayLEDColor ); + ledOverallDelay->SetLight ( iOverallDelayLEDColor ); } void CClientSettingsDlg::UpdateDisplay() @@ -715,14 +714,14 @@ void CClientSettingsDlg::UpdateDisplay() if ( !pClient->IsRunning() ) { // clear text labels with client parameters - TextLabelPingTime->setText ( "" ); - TextLabelOverallDelay->setText ( "" ); - TextUpstreamValue->setText ( "" ); + lblPingTimeValue->setText ( "" ); + lblOverallDelayValue->setText ( "" ); + lblUpstreamValue->setText ( "" ); } else { // update upstream rate information label (only if client is running) - TextUpstreamValue->setText ( + lblUpstreamValue->setText ( 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_GET: // network LED shows combined status of put and get - CLEDNetw->SetLight ( iStatus ); + ledNetw->SetLight ( iStatus ); break; case MS_RESET_ALL: - CLEDNetw->Reset(); + ledNetw->Reset(); break; } } diff --git a/src/clientsettingsdlg.h b/src/clientsettingsdlg.h index 0167fdda..6a5290d9 100755 --- a/src/clientsettingsdlg.h +++ b/src/clientsettingsdlg.h @@ -84,22 +84,22 @@ protected: public slots: void OnTimerStatus() { UpdateDisplay(); } - void OnSliderNetBuf ( int value ); + void OnNetBufValueChanged ( int value ); void OnSliderSndCrdBufferDelay ( int value ); - void OnAutoJitBuf ( int value ); + void OnAutoJitBufStateChanged ( int value ); void OnOpenChatOnNewMessageStateChanged ( int value ); void OnGUIDesignFancyStateChanged ( int value ); void OnUseHighQualityAudioStateChanged ( int value ); void OnUseStereoStateChanged ( int value ); void OnDefaultCentralServerStateChanged ( int value ); - void OnLineEditCentralServerAddressEditingFinished(); + void OnCentralServerAddressEditingFinished(); void OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button ); - void OnSoundCrdSelection ( int iSndDevIdx ); - void OnSndCrdLeftInChannelSelection ( int iChanIdx ); - void OnSndCrdRightInChannelSelection ( int iChanIdx ); - void OnSndCrdLeftOutChannelSelection ( int iChanIdx ); - void OnSndCrdRightOutChannelSelection ( int iChanIdx ); - void OnDriverSetupBut(); + void OnSoundcardActivated ( int iSndDevIdx ); + void OnLInChanActivated ( int iChanIdx ); + void OnRInChanActivated ( int iChanIdx ); + void OnLOutChanActivated ( int iChanIdx ); + void OnROutChanActivated ( int iChanIdx ); + void OnDriverSetupClicked(); signals: void GUIDesignChanged(); diff --git a/src/clientsettingsdlgbase.ui b/src/clientsettingsdlgbase.ui index ccd42fa4..d5f3b9ae 100755 --- a/src/clientsettingsdlgbase.ui +++ b/src/clientsettingsdlgbase.ui @@ -20,13 +20,13 @@ - + Jitter Buffer - + Auto @@ -85,7 +85,7 @@ - + 1 @@ -134,7 +134,7 @@ - + 0 @@ -177,20 +177,20 @@ - + Soundcard - + Device - + 0 @@ -233,7 +233,7 @@ 0 - + Input Channel Mapping @@ -247,7 +247,7 @@ - + 0 @@ -260,7 +260,7 @@ - + 0 @@ -280,17 +280,17 @@ 3 - + - + - + Output Channel Mapping @@ -304,7 +304,7 @@ - + 0 @@ -317,7 +317,7 @@ - + 0 @@ -337,10 +337,10 @@ 3 - + - + @@ -363,34 +363,34 @@ - + Buffer Delay - + (preferred) - + (default) - + (safe) - + Driver Setup @@ -403,27 +403,27 @@ - + Misc - + Open Chat on New Message - + Fancy GUI Design - + Qt::NonModal @@ -433,7 +433,7 @@ - + Qt::NonModal @@ -445,14 +445,14 @@ - + Central Server Address: - + Default @@ -461,7 +461,7 @@ - + 0 @@ -486,14 +486,14 @@ - + Ping Time - + 0 @@ -522,7 +522,7 @@ - + Overall Delay @@ -534,7 +534,7 @@ 3 - + 0 @@ -565,7 +565,7 @@ - + 0 @@ -593,14 +593,14 @@ - + Audio Stream Rate - + 0 @@ -639,23 +639,23 @@ - cbAutoJitBuf - SliderNetBuf - cbSoundcard - cbLInChan - cbRInChan - cbLOutChan - cbROutChan - rButBufferDelayPreferred - rButBufferDelayDefault - rButBufferDelaySafe - ButtonDriverSetup - cbOpenChatOnNewMessage - cbGUIDesignFancy - cbUseHighQualityAudio - cbUseStereo - cbDefaultCentralServer - LineEditCentralServerAddress + chbAutoJitBuf + sldNetBuf + cbxSoundcard + cbxLInChan + cbxRInChan + cbxLOutChan + cbxROutChan + rbtBufferDelayPreferred + rbtBufferDelayDefault + rbtBufferDelaySafe + butDriverSetup + chbOpenChatOnNewMessage + chbGUIDesignFancy + chbUseHighQualityAudio + chbUseStereo + chbDefaultCentralServer + edtCentralServerAddress diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 6447d6a9..9454f175 100755 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -45,47 +45,46 @@ CConnectDlg::CConnectDlg ( QWidget* parent, Qt::WindowFlags f ) "A list of the most recent used server URLs is available for " "selection." ); - TextLabelServerAddr->setWhatsThis ( strServAddrH ); - LineEditServerAddr->setWhatsThis ( strServAddrH ); + lblServerAddr->setWhatsThis ( strServAddrH ); + cbxServerAddr->setWhatsThis ( strServAddrH ); - LineEditServerAddr->setAccessibleName ( tr ( "Server address edit box" ) ); - LineEditServerAddr->setAccessibleDescription ( tr ( "Holds the current server " + cbxServerAddr->setAccessibleName ( tr ( "Server address edit box" ) ); + cbxServerAddr->setAccessibleDescription ( tr ( "Holds the current server " "URL. It also stores old URLs in the combo box list." ) ); // init server address combo box (max MAX_NUM_SERVER_ADDR_ITEMS entries) - LineEditServerAddr->setMaxCount ( MAX_NUM_SERVER_ADDR_ITEMS ); - LineEditServerAddr->setInsertPolicy ( QComboBox::NoInsert ); + cbxServerAddr->setMaxCount ( MAX_NUM_SERVER_ADDR_ITEMS ); + cbxServerAddr->setInsertPolicy ( QComboBox::NoInsert ); // set up list view for connected clients - ListViewServers->setColumnWidth ( 0, 170 ); - ListViewServers->setColumnWidth ( 1, 65 ); - ListViewServers->setColumnWidth ( 2, 55 ); - ListViewServers->setColumnWidth ( 3, 130 ); - ListViewServers->clear(); + lvwServers->setColumnWidth ( 0, 170 ); + lvwServers->setColumnWidth ( 1, 65 ); + lvwServers->setColumnWidth ( 2, 55 ); + lvwServers->setColumnWidth ( 3, 130 ); + lvwServers->clear(); // Connections ------------------------------------------------------------- // list view - QObject::connect ( ListViewServers, + QObject::connect ( lvwServers, SIGNAL ( itemSelectionChanged() ), this, SLOT ( OnServerListItemSelectionChanged() ) ); - QObject::connect ( ListViewServers, + QObject::connect ( lvwServers, SIGNAL ( itemDoubleClicked ( QTreeWidgetItem*, int ) ), this, SLOT ( OnServerListItemDoubleClicked ( QTreeWidgetItem*, int ) ) ); // combo boxes - QObject::connect ( LineEditServerAddr, - SIGNAL ( editTextChanged ( const QString& ) ), - this, SLOT ( OnLineEditServerAddrEditTextChanged ( const QString& ) ) ); + QObject::connect ( cbxServerAddr, SIGNAL ( editTextChanged ( const QString& ) ), + this, SLOT ( OnServerAddrEditTextChanged ( const QString& ) ) ); // buttons - QObject::connect ( CancelButton, SIGNAL ( clicked() ), + QObject::connect ( butCancel, SIGNAL ( clicked() ), this, SLOT ( close() ) ); - QObject::connect ( ConnectButton, SIGNAL ( clicked() ), - this, SLOT ( OnConnectButtonClicked() ) ); + QObject::connect ( butConnect, SIGNAL ( clicked() ), + this, SLOT ( OnConnectClicked() ) ); // timers QObject::connect ( &TimerPing, SIGNAL ( timeout() ), @@ -102,12 +101,12 @@ void CConnectDlg::Init ( const QString strNewCentralServerAddr, strCentralServerAddress = strNewCentralServerAddr; // load stored IP addresses in combo box - LineEditServerAddr->clear(); + cbxServerAddr->clear(); for ( int iLEIdx = 0; iLEIdx < MAX_NUM_SERVER_ADDR_ITEMS; iLEIdx++ ) { if ( !vstrIPAddresses[iLEIdx].isEmpty() ) { - LineEditServerAddr->addItem ( vstrIPAddresses[iLEIdx] ); + cbxServerAddr->addItem ( vstrIPAddresses[iLEIdx] ); } } } @@ -125,7 +124,7 @@ void CConnectDlg::showEvent ( QShowEvent* ) strSelectedServerName = ""; // clear server list view - ListViewServers->clear(); + lvwServers->clear(); // get the IP address of the central server (using the ParseNetworAddress // 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: // - 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 - QList CurSelListItemList = - ListViewServers->selectedItems(); + QList CurSelListItemList = lvwServers->selectedItems(); if ( CurSelListItemList.count() > 0 ) { @@ -164,7 +162,7 @@ void CConnectDlg::hideEvent ( QHideEvent* ) } else { - strSelectedAddress = LineEditServerAddr->currentText(); + strSelectedAddress = cbxServerAddr->currentText(); } // if window is closed, stop timers @@ -190,7 +188,7 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr, TimerReRequestServList.stop(); // first clear list - ListViewServers->clear(); + lvwServers->clear(); // add list item for each server in the server list const int iServerInfoLen = vecServerInfo.Size(); @@ -212,8 +210,7 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr, } // create new list view item - QTreeWidgetItem* pNewListViewItem = - new QTreeWidgetItem ( ListViewServers ); + QTreeWidgetItem* pNewListViewItem = new QTreeWidgetItem ( lvwServers ); // make the entry invisible (will be set to visible on successful ping // result) @@ -278,19 +275,17 @@ void CConnectDlg::OnServerListItemSelectionChanged() { // get current selected item (we are only interested in the first selcted // item) - QList CurSelListItemList = - ListViewServers->selectedItems(); + QList CurSelListItemList = lvwServers->selectedItems(); // if an item is clicked/selected, copy the server name to the combo box if ( CurSelListItemList.count() > 0 ) { // make sure no signals are send when we change the text - LineEditServerAddr->blockSignals ( true ); + cbxServerAddr->blockSignals ( true ); { - LineEditServerAddr->setEditText ( - CurSelListItemList[0]->text ( 0 ) ); + cbxServerAddr->setEditText ( CurSelListItemList[0]->text ( 0 ) ); } - LineEditServerAddr->blockSignals ( false ); + cbxServerAddr->blockSignals ( false ); } } @@ -301,18 +296,18 @@ void CConnectDlg::OnServerListItemDoubleClicked ( QTreeWidgetItem* Item, // connect button was clicked 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 list (if any) - ListViewServers->clearSelection(); + lvwServers->clearSelection(); } -void CConnectDlg::OnConnectButtonClicked() +void CConnectDlg::OnConnectClicked() { // set state OK flag bStateOK = true; @@ -324,7 +319,7 @@ void CConnectDlg::OnConnectButtonClicked() void CConnectDlg::OnTimerPing() { // 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++ ) { @@ -333,7 +328,7 @@ void CConnectDlg::OnTimerPing() // try to parse host address string which is stored as user data // in the server list item GUI control element if ( LlconNetwUtil().ParseNetworkAddress ( - ListViewServers->topLevelItem ( iIdx )-> + lvwServers->topLevelItem ( iIdx )-> data ( 0, Qt::UserRole ).toString(), CurServerAddress ) ) { @@ -349,13 +344,13 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress& InetAddr, const int iNumClients ) { // 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++ ) { // compare the received address with the user data string of the // host address by a string compare - if ( !ListViewServers->topLevelItem ( iIdx )-> + if ( !lvwServers->topLevelItem ( iIdx )-> data ( 0, Qt::UserRole ).toString(). compare ( InetAddr.toString() ) ) { @@ -363,31 +358,31 @@ void CConnectDlg::SetPingTimeAndNumClientsResult ( CHostAddress& InetAddr, switch ( iPingTimeLEDColor ) { case MUL_COL_LED_GREEN: - ListViewServers-> + lvwServers-> topLevelItem ( iIdx )->setTextColor ( 1, Qt::darkGreen ); break; case MUL_COL_LED_YELLOW: - ListViewServers-> + lvwServers-> topLevelItem ( iIdx )->setTextColor ( 1, Qt::darkYellow ); break; case MUL_COL_LED_RED: - ListViewServers-> + lvwServers-> topLevelItem ( iIdx )->setTextColor ( 1, Qt::red ); break; } // update ping text - ListViewServers->topLevelItem ( iIdx )-> + lvwServers->topLevelItem ( iIdx )-> setText ( 1, QString().setNum ( iPingTime ) + " ms" ); // update number of clients text - ListViewServers->topLevelItem ( iIdx )-> + lvwServers->topLevelItem ( iIdx )-> setText ( 2, QString().setNum ( iNumClients ) ); // a ping time was received, set item to visible - ListViewServers->topLevelItem ( iIdx )->setHidden ( false ); + lvwServers->topLevelItem ( iIdx )->setHidden ( false ); } } } diff --git a/src/connectdlg.h b/src/connectdlg.h index 87f4ce89..d82f1f23 100755 --- a/src/connectdlg.h +++ b/src/connectdlg.h @@ -90,8 +90,8 @@ protected: public slots: void OnServerListItemSelectionChanged(); void OnServerListItemDoubleClicked ( QTreeWidgetItem* Item, int ); - void OnLineEditServerAddrEditTextChanged ( const QString& ); - void OnConnectButtonClicked(); + void OnServerAddrEditTextChanged ( const QString& ); + void OnConnectClicked(); void OnTimerPing(); void OnTimerReRequestServList(); diff --git a/src/connectdlgbase.ui b/src/connectdlgbase.ui index 12c0a2e6..102c3207 100755 --- a/src/connectdlgbase.ui +++ b/src/connectdlgbase.ui @@ -23,7 +23,7 @@ - + QAbstractItemView::NoEditTriggers @@ -61,7 +61,7 @@ - + Server Name/Address @@ -71,7 +71,7 @@ - + true @@ -95,14 +95,14 @@ - + C&ancel - + &Connect diff --git a/src/global.h b/src/global.h index bad0eeb2..6f0de273 100755 --- a/src/global.h +++ b/src/global.h @@ -4,6 +4,23 @@ * Author(s): * 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 diff --git a/src/llconclientdlg.cpp b/src/llconclientdlg.cpp index 0200f6d7..d1561791 100755 --- a/src/llconclientdlg.cpp +++ b/src/llconclientdlg.cpp @@ -65,28 +65,28 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QString strInpLevHAccText = tr ( "Input level meter" ); QString strInpLevHAccDescr = tr ( "Simulates an analog LED level meter." ); - TextInputLEDMeter->setWhatsThis ( strInpLevH ); - TextLevelMeterLeft->setWhatsThis ( strInpLevH ); - TextLevelMeterRight->setWhatsThis ( strInpLevH ); - MultiColorLEDBarInputLevelL->setWhatsThis ( strInpLevH ); - MultiColorLEDBarInputLevelL->setAccessibleName ( strInpLevHAccText ); - MultiColorLEDBarInputLevelL->setAccessibleDescription ( strInpLevHAccDescr ); - MultiColorLEDBarInputLevelL->setToolTip ( strInpLevHTT ); - MultiColorLEDBarInputLevelR->setWhatsThis ( strInpLevH ); - MultiColorLEDBarInputLevelR->setAccessibleName ( strInpLevHAccText ); - MultiColorLEDBarInputLevelR->setAccessibleDescription ( strInpLevHAccDescr ); - MultiColorLEDBarInputLevelR->setToolTip ( strInpLevHTT ); + lblInputLEDMeter->setWhatsThis ( strInpLevH ); + lblLevelMeterLeft->setWhatsThis ( strInpLevH ); + lblLevelMeterRight->setWhatsThis ( strInpLevH ); + lbrInputLevelL->setWhatsThis ( strInpLevH ); + lbrInputLevelL->setAccessibleName ( strInpLevHAccText ); + lbrInputLevelL->setAccessibleDescription ( strInpLevHAccDescr ); + lbrInputLevelL->setToolTip ( strInpLevHTT ); + lbrInputLevelR->setWhatsThis ( strInpLevH ); + lbrInputLevelR->setAccessibleName ( strInpLevHAccText ); + lbrInputLevelR->setAccessibleDescription ( strInpLevHAccDescr ); + lbrInputLevelR->setToolTip ( strInpLevHTT ); // connect/disconnect button - PushButtonConnect->setWhatsThis ( tr ( "Connect / Disconnect Button:" + butConnect->setWhatsThis ( tr ( "Connect / Disconnect Button:" " Push this button to connect the server. A valid IP address has " "to be specified before. If the client is connected, pressing this " "button will disconnect the connection." ) ); - PushButtonConnect->setAccessibleName ( + butConnect->setAccessibleName ( 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 " "Disconnect, i.e., it implements a toggle functionality for connecting " "and disconnecting the llcon software." ) ); @@ -103,12 +103,12 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "pseoudonym here so that the other musicians can identify you." ) + TOOLTIP_COM_END_TEXT; - TextLabelServerTag->setWhatsThis ( strFaderTag ); - TextLabelServerTag->setToolTip ( strFaderTagTT ); - LineEditFaderTag->setWhatsThis ( strFaderTag ); - LineEditFaderTag->setToolTip ( strFaderTagTT ); + lblServerTag->setWhatsThis ( strFaderTag ); + lblServerTag->setToolTip ( strFaderTagTT ); + edtFaderTag->setWhatsThis ( strFaderTag ); + edtFaderTag->setToolTip ( strFaderTagTT ); - LineEditFaderTag->setAccessibleName ( tr ( "Fader tag edit box" ) ); + edtFaderTag->setAccessibleName ( tr ( "Fader tag edit box" ) ); // local audio input fader QString strAudFader = tr ( "Local Audio Input Fader: With the " @@ -120,10 +120,10 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "a direction where the label above the fader shows L -x, where " "x is the current attenuation indication. " ); - TextAudInFader->setWhatsThis ( strAudFader ); - SliderAudInFader->setWhatsThis ( strAudFader ); + lblAudioPan->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 QString strAudReverb = tr ( "Reverberation Level: A reverberation " @@ -138,10 +138,10 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "minimum (which is the default setting), the reverberation effect is " "switched off and does not cause any additional CPU usage." ); - TextLabelAudReverb->setWhatsThis ( strAudReverb ); - SliderAudReverb->setWhatsThis ( strAudReverb ); + lblAudioReverb->setWhatsThis ( strAudReverb ); + sldAudioReverb->setWhatsThis ( strAudReverb ); - SliderAudReverb->setAccessibleName ( tr ( "Reverberation effect level setting" ) ); + sldAudioReverb->setAccessibleName ( tr ( "Reverberation effect level setting" ) ); // reverberation channel selection QString strRevChanSel = tr ( "Reverberation Channel Selection: " @@ -149,10 +149,10 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "reverberation effect is applied can be chosen. Either the left " "or right input channel can be selected." ); - RadioButtonRevSelL->setWhatsThis ( strRevChanSel ); - RadioButtonRevSelL->setAccessibleName ( tr ( "Left channel selection for reverberation" ) ); - RadioButtonRevSelR->setWhatsThis ( strRevChanSel ); - RadioButtonRevSelR->setAccessibleName ( tr ( "Right channel selection for reverberation" ) ); + rbtReverbSelL->setWhatsThis ( strRevChanSel ); + rbtReverbSelL->setAccessibleName ( tr ( "Left channel selection for reverberation" ) ); + rbtReverbSelR->setWhatsThis ( strRevChanSel ); + rbtReverbSelR->setAccessibleName ( tr ( "Right channel selection for reverberation" ) ); // connection LED QString strLEDConnection = tr ( "Connection Status LED: " @@ -163,10 +163,10 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "If the light turns red and stays red, the connection to the " "server is lost." ); - TextLabelConnection->setWhatsThis ( strLEDConnection ); - LEDConnection->setWhatsThis ( strLEDConnection ); + lblConnection->setWhatsThis ( strLEDConnection ); + ledConnection->setWhatsThis ( strLEDConnection ); - LEDConnection->setAccessibleName ( tr ( "Connection status LED indicator" ) ); + ledConnection->setAccessibleName ( tr ( "Connection status LED indicator" ) ); // delay LED QString strLEDDelay = tr ( "Delay Status LED: " @@ -176,13 +176,13 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "it may be harder to play. If the light is red, the delay is too " "large for jamming." ); - TextLabelDelay->setWhatsThis ( strLEDDelay ); - LEDDelay->setWhatsThis ( strLEDDelay ); - LEDDelay->setToolTip ( tr ( "If this LED indicator turns red, " + lblDelay->setWhatsThis ( strLEDDelay ); + ledDelay->setWhatsThis ( strLEDDelay ); + ledDelay->setToolTip ( tr ( "If this LED indicator turns red, " "you will not have much fun using the llcon software." ) + TOOLTIP_COM_END_TEXT ); - LEDDelay->setAccessibleName ( tr ( "Delay status LED indicator" ) ); + ledDelay->setAccessibleName ( tr ( "Delay status LED indicator" ) ); // buffers LED QString strLEDBuffers = tr ( "Buffers Status LED: " @@ -200,20 +200,20 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "
  • The CPU of the client or server is at 100%.
  • " "" ); - TextLabelBuffers->setWhatsThis ( strLEDBuffers ); - LEDBuffers->setWhatsThis ( strLEDBuffers ); + lblBuffers->setWhatsThis ( strLEDBuffers ); + ledBuffers->setWhatsThis ( strLEDBuffers ); - LEDBuffers->setAccessibleName ( tr ( "Buffers status LED indicator" ) ); + ledBuffers->setAccessibleName ( tr ( "Buffers status LED indicator" ) ); // chat LED QString strLEDChat = tr ( "Chat Status LED: " "If the option Open Chat on New Message is not activated, this " "status LED will turn green on a new received chat message." ); - TextLabelChat->setWhatsThis ( strLEDChat ); - LEDChat->setWhatsThis ( strLEDChat ); + lblChat->setWhatsThis ( strLEDChat ); + ledChat->setWhatsThis ( strLEDChat ); - LEDBuffers->setAccessibleName ( tr ( "Chat status LED indicator" ) ); + ledBuffers->setAccessibleName ( tr ( "Chat status LED indicator" ) ); // init GUI design @@ -223,36 +223,36 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, MainMixerBoard->HideAll(); // init fader tag line edit - LineEditFaderTag->setText ( pClient->strName ); + edtFaderTag->setText ( pClient->strName ); // init status label OnTimerStatus(); // init connection button text - PushButtonConnect->setText ( CON_BUT_CONNECTTEXT ); + butConnect->setText ( CON_BUT_CONNECTTEXT ); // init input level meter bars - MultiColorLEDBarInputLevelL->setValue ( 0 ); - MultiColorLEDBarInputLevelR->setValue ( 0 ); + lbrInputLevelL->setValue ( 0 ); + lbrInputLevelR->setValue ( 0 ); // init status LEDs - LEDConnection->SetUpdateTime ( 2 * LED_BAR_UPDATE_TIME_MS ); - LEDChat->SetUpdateTime ( 2 * LED_BAR_UPDATE_TIME_MS ); - LEDDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME_MS ); - LEDDelay->Reset(); + ledConnection->SetUpdateTime ( 2 * LED_BAR_UPDATE_TIME_MS ); + ledChat->SetUpdateTime ( 2 * LED_BAR_UPDATE_TIME_MS ); + ledDelay->SetUpdateTime ( 2 * PING_UPDATE_TIME_MS ); + ledDelay->Reset(); // init slider controls --- // audio in fader - SliderAudInFader->setRange ( AUD_FADER_IN_MIN, AUD_FADER_IN_MAX ); - SliderAudInFader->setTickInterval ( AUD_FADER_IN_MAX / 5 ); + sldAudioPan->setRange ( AUD_FADER_IN_MIN, AUD_FADER_IN_MAX ); + sldAudioPan->setTickInterval ( AUD_FADER_IN_MAX / 5 ); UpdateAudioFaderSlider(); // audio reverberation - SliderAudReverb->setRange ( 0, AUD_REVERB_MAX ); + sldAudioReverb->setRange ( 0, AUD_REVERB_MAX ); const int iCurAudReverb = pClient->GetReverbLevel(); - SliderAudReverb->setValue ( iCurAudReverb ); - SliderAudReverb->setTickInterval ( AUD_REVERB_MAX / 5 ); + sldAudioReverb->setValue ( iCurAudReverb ); + sldAudioReverb->setTickInterval ( AUD_REVERB_MAX / 5 ); // init reverb channel UpdateRevSelection(); @@ -272,13 +272,13 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, // disable LEDs in main window if requested if ( bNewDisalbeLEDs ) { - MultiColorLEDBarInputLevelL->setEnabled ( false ); - MultiColorLEDBarInputLevelR->setEnabled ( false ); - LEDConnection->setEnabled ( false ); - LEDBuffers->setEnabled ( false ); - LEDDelay->setEnabled ( false ); - LEDChat->setEnabled ( false ); - PushButtonConnect->setFocus(); + lbrInputLevelL->setEnabled ( false ); + lbrInputLevelR->setEnabled ( false ); + ledConnection->setEnabled ( false ); + ledBuffers->setEnabled ( false ); + ledDelay->setEnabled ( false ); + ledChat->setEnabled ( false ); + butConnect->setFocus(); } @@ -289,7 +289,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, // Better solution: increase thread priority of worker thread (since the // user can always highlight the button manually, too) -> TODO #if defined ( __APPLE__ ) || defined ( __MACOSX ) - PushButtonConnect->setDefault ( false ); + butConnect->setDefault ( false ); #endif @@ -320,7 +320,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, // Connections ------------------------------------------------------------- // push-buttons - QObject::connect ( PushButtonConnect, SIGNAL ( clicked() ), + QObject::connect ( butConnect, SIGNAL ( clicked() ), this, SLOT ( OnConnectDisconBut() ) ); // timers @@ -334,21 +334,21 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, this, SLOT ( OnTimerPing() ) ); // sliders - QObject::connect ( SliderAudInFader, SIGNAL ( valueChanged ( int ) ), - this, SLOT ( OnSliderAudInFader ( int ) ) ); + QObject::connect ( sldAudioPan, SIGNAL ( valueChanged ( int ) ), + this, SLOT ( OnAudioPanValueChanged ( int ) ) ); - QObject::connect ( SliderAudReverb, SIGNAL ( valueChanged ( int ) ), - this, SLOT ( OnSliderAudReverb ( int ) ) ); + QObject::connect ( sldAudioReverb, SIGNAL ( valueChanged ( int ) ), + this, SLOT ( OnAudioReverbValueChanged ( int ) ) ); // radio buttons - QObject::connect ( RadioButtonRevSelL, SIGNAL ( clicked() ), - this, SLOT ( OnRevSelL() ) ); + QObject::connect ( rbtReverbSelL, SIGNAL ( clicked() ), + this, SLOT ( OnReverbSelLClicked() ) ); - QObject::connect ( RadioButtonRevSelR, SIGNAL ( clicked() ), - this, SLOT ( OnRevSelR() ) ); + QObject::connect ( rbtReverbSelR, SIGNAL ( clicked() ), + this, SLOT ( OnReverbSelRClicked() ) ); // line edits - QObject::connect ( LineEditFaderTag, SIGNAL ( textChanged ( const QString& ) ), + QObject::connect ( edtFaderTag, SIGNAL ( textChanged ( const QString& ) ), this, SLOT ( OnFaderTagTextChanged ( const QString& ) ) ); // other @@ -416,7 +416,7 @@ void CLlconClientDlg::closeEvent ( QCloseEvent* Event ) } // store fader tag - pClient->strName = LineEditFaderTag->text(); + pClient->strName = edtFaderTag->text(); // default implementation of this event handler routine Event->accept(); @@ -426,26 +426,26 @@ void CLlconClientDlg::UpdateAudioFaderSlider() { // update slider and label of audio fader const int iCurAudInFader = pClient->GetAudioInFader(); - SliderAudInFader->setValue ( iCurAudInFader ); + sldAudioPan->setValue ( iCurAudInFader ); // show in label the center position and what channel is // attenuated if ( iCurAudInFader == AUD_FADER_IN_MIDDLE ) { - TextLabelAudFader->setText ( "Center" ); + lblAudioPanValue->setText ( "Center" ); } else { if ( iCurAudInFader > AUD_FADER_IN_MIDDLE ) { // attenuation on right channel - TextLabelAudFader->setText ( "R -" + + lblAudioPanValue->setText ( "R -" + QString().setNum ( iCurAudInFader - AUD_FADER_IN_MIDDLE ) ); } else { // attenuation on left channel - TextLabelAudFader->setText ( "L -" + + lblAudioPanValue->setText ( "L -" + QString().setNum ( AUD_FADER_IN_MIDDLE - iCurAudInFader ) ); } } @@ -457,28 +457,28 @@ void CLlconClientDlg::UpdateRevSelection() { // for stereo make channel selection invisible since // reverberation effect is always applied to both channels - RadioButtonRevSelL->setVisible ( false ); - RadioButtonRevSelR->setVisible ( false ); + rbtReverbSelL->setVisible ( false ); + rbtReverbSelR->setVisible ( false ); } else { // make radio buttons visible - RadioButtonRevSelL->setVisible ( true ); - RadioButtonRevSelR->setVisible ( true ); + rbtReverbSelL->setVisible ( true ); + rbtReverbSelR->setVisible ( true ); // update value if ( pClient->IsReverbOnLeftChan() ) { - RadioButtonRevSelL->setChecked ( true ); + rbtReverbSelL->setChecked ( true ); } else { - RadioButtonRevSelR->setChecked ( true ); + rbtReverbSelR->setChecked ( true ); } } } -void CLlconClientDlg::OnSliderAudInFader ( int value ) +void CLlconClientDlg::OnAudioPanValueChanged ( int value ) { pClient->SetAudioInFader ( value ); UpdateAudioFaderSlider(); @@ -596,7 +596,7 @@ void CLlconClientDlg::OnFaderTagTextChanged ( const QString& strNewName ) else { // 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 - MultiColorLEDBarInputLevelL->setValue ( (int) ceil ( dCurSigLevelL ) ); - MultiColorLEDBarInputLevelR->setValue ( (int) ceil ( dCurSigLevelR ) ); + lbrInputLevelL->setValue ( (int) ceil ( dCurSigLevelL ) ); + lbrInputLevelR->setValue ( (int) ceil ( dCurSigLevelR ) ); } void CLlconClientDlg::OnTimerPing() @@ -673,7 +673,7 @@ void CLlconClientDlg::OnPingTimeResult ( int iPingTime ) } // update delay LED on the main window - LEDDelay->SetLight ( iOverallDelayLEDColor ); + ledDelay->SetLight ( iOverallDelayLEDColor ); } void CLlconClientDlg::OnCLPingTimeWithNumClientsReceived ( CHostAddress InetAddr, @@ -785,7 +785,7 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart ) if ( bStartOk ) { // 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 if ( ConnectDlg.GetServerListItemWasChosen() ) @@ -811,7 +811,7 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart ) else { // 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" - PushButtonConnect->setText ( CON_BUT_CONNECTTEXT ); + butConnect->setText ( CON_BUT_CONNECTTEXT ); // reset server name in audio mixer group box title MainMixerBoard->SetServerName ( "" ); // stop timer for level meter bars and reset them TimerSigMet.stop(); - MultiColorLEDBarInputLevelL->setValue ( 0 ); - MultiColorLEDBarInputLevelR->setValue ( 0 ); + lbrInputLevelL->setValue ( 0 ); + lbrInputLevelR->setValue ( 0 ); // stop ping time measurement timer TimerPing.stop(); @@ -848,10 +848,10 @@ OnTimerStatus(); // TODO this seems not to work, LEDs are still updated afterwards... // reset LEDs -LEDConnection->Reset(); -LEDBuffers->Reset(); -LEDDelay->Reset(); -LEDChat->Reset(); +ledConnection->Reset(); +ledBuffers->Reset(); +ledDelay->Reset(); +ledChat->Reset(); // clear mixer board (remove all faders) @@ -869,20 +869,20 @@ void CLlconClientDlg::UpdateDisplay() // chat LED if ( bUnreadChatMessage ) { - LEDChat->SetLight ( MUL_COL_LED_GREEN ); + ledChat->SetLight ( MUL_COL_LED_GREEN ); } else { - LEDChat->Reset(); + ledChat->Reset(); } // connection LED - LEDConnection->SetLight ( MUL_COL_LED_GREEN ); + ledConnection->SetLight ( MUL_COL_LED_GREEN ); } else { // 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 // 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... -RadioButtonRevSelL->setStyleSheet ( "color: rgb(148, 148, 148);" - "font: bold;" ); -RadioButtonRevSelR->setStyleSheet ( "color: rgb(148, 148, 148);" - "font: bold;" ); +rbtReverbSelL->setStyleSheet ( "color: rgb(148, 148, 148);" + "font: bold;" ); +rbtReverbSelR->setStyleSheet ( "color: rgb(148, 148, 148);" + "font: bold;" ); #endif break; @@ -926,8 +926,8 @@ RadioButtonRevSelR->setStyleSheet ( "color: rgb(148, 148, 148);" #ifdef _WIN32 // Workaround QT-Windows problem: See above description -RadioButtonRevSelL->setStyleSheet ( "" ); -RadioButtonRevSelR->setStyleSheet ( "" ); +rbtReverbSelL->setStyleSheet ( "" ); +rbtReverbSelR->setStyleSheet ( "" ); #endif break; @@ -951,14 +951,14 @@ void CLlconClientDlg::customEvent ( QEvent* Event ) case MS_JIT_BUF_PUT: case MS_JIT_BUF_GET: // buffer status -> if any buffer goes red, this LED will go red - LEDBuffers->SetLight ( iStatus ); + ledBuffers->SetLight ( iStatus ); break; case MS_RESET_ALL: - LEDConnection->Reset(); - LEDBuffers->Reset(); - LEDDelay->Reset(); - LEDChat->Reset(); + ledConnection->Reset(); + ledBuffers->Reset(); + ledDelay->Reset(); + ledChat->Reset(); break; case MS_SET_JIT_BUF_SIZE: diff --git a/src/llconclientdlg.h b/src/llconclientdlg.h index 0420afbe..7fbbd2d8 100755 --- a/src/llconclientdlg.h +++ b/src/llconclientdlg.h @@ -123,15 +123,15 @@ public slots: void OnOpenChatDialog() { ShowChatWindow(); } - void OnSliderAudInFader ( int value ); + void OnAudioPanValueChanged ( int value ); - void OnSliderAudReverb ( int value ) + void OnAudioReverbValueChanged ( int value ) { pClient->SetReverbLevel ( value ); } - void OnRevSelL() + void OnReverbSelLClicked() { pClient->SetReverbOnLeftChan ( true ); } - void OnRevSelR() + void OnReverbSelRClicked() { pClient->SetReverbOnLeftChan ( false ); } void OnConClientListMesReceived ( CVector vecChanInfo ); diff --git a/src/llconclientdlgbase.ui b/src/llconclientdlgbase.ui index f70b2f48..44829ef9 100755 --- a/src/llconclientdlgbase.ui +++ b/src/llconclientdlgbase.ui @@ -61,7 +61,7 @@ - + 0 @@ -113,7 +113,7 @@ - + Connection @@ -126,7 +126,7 @@ - + 0 @@ -165,7 +165,7 @@ - + Delay @@ -178,7 +178,7 @@ - + 0 @@ -217,7 +217,7 @@ - + Buffers @@ -230,7 +230,7 @@ - + 0 @@ -269,7 +269,7 @@ - + Chat @@ -282,7 +282,7 @@ - + 0 @@ -330,7 +330,7 @@ - + Input @@ -342,7 +342,7 @@ - + 0 @@ -358,7 +358,7 @@ - + 0 @@ -378,7 +378,7 @@ - + L @@ -388,7 +388,7 @@ - + R @@ -427,7 +427,7 @@ - + 0 @@ -443,7 +443,7 @@ - + 0 @@ -455,7 +455,7 @@ - + C&onnect @@ -499,7 +499,7 @@ 3 - + Pan @@ -509,7 +509,7 @@ - + 50 @@ -561,7 +561,7 @@ - + @@ -616,7 +616,7 @@ 0 - + Reverb @@ -659,7 +659,7 @@ - + 1 @@ -697,14 +697,14 @@ 3 - + Left - + Right @@ -750,12 +750,12 @@ - PushButtonConnect - LineEditFaderTag - SliderAudInFader - SliderAudReverb - RadioButtonRevSelL - RadioButtonRevSelR + butConnect + edtFaderTag + sldAudioPan + sldAudioReverb + rbtReverbSelL + rbtReverbSelR diff --git a/src/llconserverdlg.cpp b/src/llconserverdlg.cpp index 8e2bd5aa..5a17b54c 100755 --- a/src/llconserverdlg.cpp +++ b/src/llconserverdlg.cpp @@ -40,15 +40,15 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, // Add help text to controls ----------------------------------------------- // client list - ListViewClients->setWhatsThis ( tr ( "Client List: The client list " + lvwClients->setWhatsThis ( tr ( "Client List: The client list " "shows all clients which are currently connected to this server. Some " "informations about the clients like the IP address, name, buffer " "state are given for each connected client." ) ); - ListViewClients->setAccessibleName ( tr ( "Connected clients list view" ) ); + lvwClients->setAccessibleName ( tr ( "Connected clients list view" ) ); // register server flag - cbRegisterServer->setWhatsThis ( tr ( "Register Server Status: If " + chbRegisterServer->setWhatsThis ( tr ( "Register Server Status: If " "the register server check box is checked, this server registers " "itself at the central server so that all " ) + APP_NAME + 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 " "checked, the default central server address is shown read-only." ); - LabelCentralServerAddress->setWhatsThis ( strCentrServAddr ); - cbDefaultCentralServer->setWhatsThis ( strCentrServAddr ); - LineEditCentralServerAddress->setWhatsThis ( strCentrServAddr ); + lblCentralServerAddress->setWhatsThis ( strCentrServAddr ); + chbDefaultCentralServer->setWhatsThis ( strCentrServAddr ); + edtCentralServerAddress->setWhatsThis ( strCentrServAddr ); - cbDefaultCentralServer->setAccessibleName ( + chbDefaultCentralServer->setAccessibleName ( tr ( "Default central server check box" ) ); - LineEditCentralServerAddress->setAccessibleName ( + edtCentralServerAddress->setAccessibleName ( tr ( "Central server address line edit" ) ); // server name @@ -77,20 +77,20 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, "your server in the connect dialog server list at the clients. If no " "name is given, the IP address is shown instead." ); - LabelServerName->setWhatsThis ( strServName ); - LineEditServerName->setWhatsThis ( strServName ); + lblServerName->setWhatsThis ( strServName ); + edtServerName->setWhatsThis ( strServName ); - LineEditServerName->setAccessibleName ( tr ( "Server name line edit" ) ); + edtServerName->setAccessibleName ( tr ( "Server name line edit" ) ); // location city QString strLocCity = tr ( "Location City: The city in which this " "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." ); - LabelLocationCity->setWhatsThis ( strLocCity ); - LineEditLocationCity->setWhatsThis ( strLocCity ); + lblLocationCity->setWhatsThis ( strLocCity ); + edtLocationCity->setWhatsThis ( strLocCity ); - LineEditLocationCity->setAccessibleName ( tr ( + edtLocationCity->setAccessibleName ( tr ( "City where the server is located line edit" ) ); // location country @@ -99,10 +99,10 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, "entered, it will be shown in the connect dialog server list at the " "clients." ); - LabelLocationCountry->setWhatsThis ( strLocCountry ); - ComboBoxLocationCountry->setWhatsThis ( strLocCountry ); + lblLocationCountry->setWhatsThis ( strLocCountry ); + cbxLocationCountry->setWhatsThis ( strLocCountry ); - ComboBoxLocationCountry->setAccessibleName ( tr ( + cbxLocationCountry->setAccessibleName ( tr ( "Country where the server is located combo box" ) ); @@ -141,19 +141,19 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, } // set text for version and application name - TextLabelNameVersion->setText ( QString ( APP_NAME ) + + lblNameVersion->setText ( QString ( APP_NAME ) + tr ( " server " ) + QString ( VERSION ) ); // set up list view for connected clients - ListViewClients->setColumnWidth ( 0, 170 ); - ListViewClients->setColumnWidth ( 1, 130 ); - ListViewClients->setColumnWidth ( 2, 60 ); - ListViewClients->clear(); + lvwClients->setColumnWidth ( 0, 170 ); + lvwClients->setColumnWidth ( 1, 130 ); + lvwClients->setColumnWidth ( 2, 60 ); + lvwClients->clear(); // TEST workaround for resize problem of window after iconize in task bar -ListViewClients->setMinimumWidth ( 170 + 130 + 60 + 205 ); -ListViewClients->setMinimumHeight ( 140 ); +lvwClients->setMinimumWidth ( 170 + 130 + 60 + 205 ); +lvwClients->setMinimumHeight ( 140 ); // insert items in reverse order because in Windows all of them are @@ -161,29 +161,29 @@ ListViewClients->setMinimumHeight ( 140 ); vecpListViewItems.Init ( USED_NUM_CHANNELS ); for ( int i = USED_NUM_CHANNELS - 1; i >= 0; i-- ) { - vecpListViewItems[i] = new CServerListViewItem ( ListViewClients ); + vecpListViewItems[i] = new CServerListViewItem ( lvwClients ); vecpListViewItems[i]->setHidden ( true ); } // update default central server address check box if ( pServer->GetUseDefaultCentralServerAddress() ) { - cbDefaultCentralServer->setCheckState ( Qt::Checked ); + chbDefaultCentralServer->setCheckState ( Qt::Checked ); } else { - cbDefaultCentralServer->setCheckState ( Qt::Unchecked ); + chbDefaultCentralServer->setCheckState ( Qt::Unchecked ); } // update server name line edit - LineEditServerName->setText ( pServer->GetServerName() ); + edtServerName->setText ( pServer->GetServerName() ); // update server city line edit - LineEditLocationCity->setText ( pServer->GetServerCity() ); + edtLocationCity->setText ( pServer->GetServerCity() ); // load country combo box with all available countries - ComboBoxLocationCountry->setInsertPolicy ( QComboBox::NoInsert ); - ComboBoxLocationCountry->clear(); + cbxLocationCountry->setInsertPolicy ( QComboBox::NoInsert ); + cbxLocationCountry->clear(); for ( int iCurCntry = static_cast ( QLocale::AnyCountry ); iCurCntry < static_cast ( QLocale::LastCountry ); iCurCntry++ ) @@ -193,42 +193,42 @@ ListViewClients->setMinimumHeight ( 140 ); { // store the country enum index together with the string (this is // important since we sort the combo box items later on) - ComboBoxLocationCountry->addItem ( QLocale::countryToString ( + cbxLocationCountry->addItem ( QLocale::countryToString ( static_cast ( iCurCntry ) ), iCurCntry ); } } // sort country combo box items in alphabetical order - ComboBoxLocationCountry->model()->sort ( 0, Qt::AscendingOrder ); + cbxLocationCountry->model()->sort ( 0, Qt::AscendingOrder ); // select current country - ComboBoxLocationCountry->setCurrentIndex ( - ComboBoxLocationCountry->findData ( + cbxLocationCountry->setCurrentIndex ( + cbxLocationCountry->findData ( static_cast ( pServer->GetServerCountry() ) ) ); // update register server check box if ( pServer->GetServerListEnabled() ) { - cbRegisterServer->setCheckState ( Qt::Checked ); + chbRegisterServer->setCheckState ( Qt::Checked ); } else { - cbRegisterServer->setCheckState ( Qt::Unchecked ); + chbRegisterServer->setCheckState ( Qt::Unchecked ); } // update start minimized check box (only available for Windows) #ifndef _WIN32 - cbStartOnOSStart->setVisible ( false ); + chbStartOnOSStart->setVisible ( false ); #else const bool bCurAutoStartMinState = pServer->GetAutoRunMinimized(); if ( bCurAutoStartMinState ) { - cbStartOnOSStart->setCheckState ( Qt::Checked ); + chbStartOnOSStart->setCheckState ( Qt::Checked ); } else { - cbStartOnOSStart->setCheckState ( Qt::Unchecked ); + chbStartOnOSStart->setCheckState ( Qt::Unchecked ); } // modify registry according to setting (this is just required in case a @@ -259,29 +259,28 @@ ListViewClients->setMinimumHeight ( 140 ); // Connections ------------------------------------------------------------- // check boxes - QObject::connect ( cbRegisterServer, SIGNAL ( stateChanged ( int ) ), + QObject::connect ( chbRegisterServer, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnRegisterServerStateChanged ( int ) ) ); - QObject::connect ( cbDefaultCentralServer, SIGNAL ( stateChanged ( int ) ), + QObject::connect ( chbDefaultCentralServer, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnDefaultCentralServerStateChanged ( int ) ) ); - QObject::connect ( cbStartOnOSStart, SIGNAL ( stateChanged ( int ) ), + QObject::connect ( chbStartOnOSStart, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnStartOnOSStartStateChanged ( int ) ) ); // line edits - QObject::connect ( LineEditCentralServerAddress, - SIGNAL ( editingFinished() ), - this, SLOT ( OnLineEditCentralServerAddressEditingFinished() ) ); + QObject::connect ( edtCentralServerAddress, SIGNAL ( editingFinished() ), + this, SLOT ( OnCentralServerAddressEditingFinished() ) ); - QObject::connect ( LineEditServerName, SIGNAL ( textChanged ( const QString& ) ), - this, SLOT ( OnLineEditServerNameTextChanged ( const QString& ) ) ); + QObject::connect ( edtServerName, SIGNAL ( textChanged ( const QString& ) ), + this, SLOT ( OnServerNameTextChanged ( const QString& ) ) ); - QObject::connect ( LineEditLocationCity, SIGNAL ( textChanged ( const QString& ) ), - this, SLOT ( OnLineEditLocationCityTextChanged ( const QString& ) ) ); + QObject::connect ( edtLocationCity, SIGNAL ( textChanged ( const QString& ) ), + this, SLOT ( OnLocationCityTextChanged ( const QString& ) ) ); // combo boxes - QObject::connect ( ComboBoxLocationCountry, SIGNAL ( activated ( int ) ), - this, SLOT ( OnComboBoxLocationCountryActivated ( int ) ) ); + QObject::connect ( cbxLocationCountry, SIGNAL ( activated ( int ) ), + this, SLOT ( OnLocationCountryActivated ( int ) ) ); // timers QObject::connect ( &Timer, SIGNAL ( timeout() ), this, SLOT ( OnTimer() ) ); @@ -303,16 +302,16 @@ ListViewClients->setMinimumHeight ( 140 ); Timer.start ( GUI_CONTRL_UPDATE_TIME ); } -void CLlconServerDlg::closeEvent ( QCloseEvent* Event ) -{ - // if server was registered at the central server, unregister on shutdown +void CLlconServerDlg::closeEvent ( QCloseEvent* Event ) +{ + // if server was registered at the central server, unregister on shutdown if ( pServer->GetServerListEnabled() ) { pServer->UnregisterSlaveServer(); - } - - // default implementation of this event handler routine - Event->accept(); + } + + // default implementation of this event handler routine + Event->accept(); } void CLlconServerDlg::OnStartOnOSStartStateChanged ( int value ) @@ -356,16 +355,16 @@ void CLlconServerDlg::OnRegisterServerStateChanged ( int value ) UpdateGUIDependencies(); } -void CLlconServerDlg::OnLineEditCentralServerAddressEditingFinished() +void CLlconServerDlg::OnCentralServerAddressEditingFinished() { // apply new setting to the server and update it pServer->SetServerListCentralServerAddress ( - LineEditCentralServerAddress->text() ); + edtCentralServerAddress->text() ); pServer->UpdateServerList(); } -void CLlconServerDlg::OnLineEditServerNameTextChanged ( const QString& strNewName ) +void CLlconServerDlg::OnServerNameTextChanged ( const QString& strNewName ) { // check length if ( strNewName.length() <= MAX_LEN_SERVER_NAME ) @@ -377,11 +376,11 @@ void CLlconServerDlg::OnLineEditServerNameTextChanged ( const QString& strNewNam else { // 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 if ( strNewCity.length() <= MAX_LEN_SERVER_CITY ) @@ -393,15 +392,15 @@ void CLlconServerDlg::OnLineEditLocationCityTextChanged ( const QString& strNewC else { // 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 pServer->SetServerCountry ( static_cast ( - ComboBoxLocationCountry->itemData ( iCntryListItem ).toInt() ) ); + cbxLocationCountry->itemData ( iCntryListItem ).toInt() ) ); pServer->UpdateServerList(); } @@ -472,29 +471,29 @@ void CLlconServerDlg::UpdateGUIDependencies() // if register server is not enabled, we disable all the configuration // controls for the server list - cbDefaultCentralServer->setEnabled ( bCurSerListEnabled ); - GroupBoxServerInfo->setEnabled ( bCurSerListEnabled ); + chbDefaultCentralServer->setEnabled ( bCurSerListEnabled ); + grbServerInfo->setEnabled ( bCurSerListEnabled ); // 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 // fire signals when we update the text. - LineEditCentralServerAddress->blockSignals ( true ); + edtCentralServerAddress->blockSignals ( true ); { if ( bCurUseDefCentServAddr ) { - LineEditCentralServerAddress->setText ( DEFAULT_SERVER_ADDRESS ); + edtCentralServerAddress->setText ( DEFAULT_SERVER_ADDRESS ); } else { - LineEditCentralServerAddress->setText ( + edtCentralServerAddress->setText ( pServer->GetServerListCentralServerAddress() ); } } - LineEditCentralServerAddress->blockSignals ( false ); + edtCentralServerAddress->blockSignals ( false ); // the line edit of the central server address is only enabled, if the // server list is enabled and not the default address is used - LineEditCentralServerAddress->setEnabled ( + edtCentralServerAddress->setEnabled ( !bCurUseDefCentServAddr && bCurSerListEnabled ); } diff --git a/src/llconserverdlg.h b/src/llconserverdlg.h index a22dc0ae..29bf6c2a 100755 --- a/src/llconserverdlg.h +++ b/src/llconserverdlg.h @@ -90,10 +90,10 @@ public slots: void OnRegisterServerStateChanged ( int value ); void OnDefaultCentralServerStateChanged ( int value ); void OnStartOnOSStartStateChanged ( int value ); - void OnLineEditCentralServerAddressEditingFinished(); - void OnLineEditServerNameTextChanged ( const QString& strNewName ); - void OnLineEditLocationCityTextChanged ( const QString& strNewCity ); - void OnComboBoxLocationCountryActivated ( int iCntryListItem ); + void OnCentralServerAddressEditingFinished(); + void OnServerNameTextChanged ( const QString& strNewName ); + void OnLocationCityTextChanged ( const QString& strNewCity ); + void OnLocationCountryActivated ( int iCntryListItem ); void OnTimer(); void OnServerStarted() { UpdateSystemTrayIcon ( true ); } void OnServerStopped() { UpdateSystemTrayIcon ( false ); } diff --git a/src/llconserverdlgbase.ui b/src/llconserverdlgbase.ui index b34d803a..198fbada 100755 --- a/src/llconserverdlgbase.ui +++ b/src/llconserverdlgbase.ui @@ -20,7 +20,7 @@ - + false @@ -52,14 +52,14 @@ - + Start Minimized on Windows Start - + Register My Server in the Server List at the Central Server @@ -68,17 +68,17 @@ - + Central Server Address: - + - + Default @@ -87,7 +87,7 @@ - + My Server Info @@ -95,21 +95,21 @@ - + Name - + Location: City - + Location: Country @@ -120,13 +120,13 @@ - + - + - + @@ -151,7 +151,7 @@ 0 - + TextLabelNameVersion diff --git a/src/util.cpp b/src/util.cpp index 93d8c948..fba8034f 100755 --- a/src/util.cpp +++ b/src/util.cpp @@ -308,8 +308,8 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : QDialog ( parent ) setupUi ( this ); // set the text for the about dialog html text control - TextViewCredits->setOpenExternalLinks ( true ); - TextViewCredits->setText ( + txvCredits->setOpenExternalLinks ( true ); + txvCredits->setText ( "

    " // general description of llcon software "llcon " + tr("The llcon software enables musicians to " "perform real-time jam sessions over the internet. There is a llcon " @@ -350,7 +350,7 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : QDialog ( parent ) "
    "); // set version number in about dialog - TextLabelVersion->setText ( GetVersionAndNameStr() ); + lblVersion->setText ( GetVersionAndNameStr() ); } QString CAboutDlg::GetVersionAndNameStr ( const bool bWithHtml )