From 7392762f6c8b77674f23a768066ce6fbd3a69331 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 23 Apr 2011 19:03:51 +0000 Subject: [PATCH] first working version of the connect dialog --- src/connectdlg.cpp | 74 ++++------ src/connectdlg.h | 19 ++- src/llconclientdlg.cpp | 152 ++++++++----------- src/llconclientdlg.h | 328 ++++++++++++++++++++--------------------- 4 files changed, 261 insertions(+), 312 deletions(-) diff --git a/src/connectdlg.cpp b/src/connectdlg.cpp index 81180f9e..371e16b1 100755 --- a/src/connectdlg.cpp +++ b/src/connectdlg.cpp @@ -28,7 +28,9 @@ /* Implementation *************************************************************/ CConnectDlg::CConnectDlg ( QWidget* parent, Qt::WindowFlags f ) : QDialog ( parent, f ), - bServerListReceived ( false ) + strSelectedAddress ( "" ), + bServerListReceived ( false ), + bCancelPressed ( false ) { setupUi ( this ); @@ -38,8 +40,7 @@ CConnectDlg::CConnectDlg ( QWidget* parent, Qt::WindowFlags f ) QString strServAddrH = tr ( "Server Address: The IP address or URL " "of the server running the llcon server software must be set here. " "A list of the most recent used server URLs is available for " - "selection. If an invalid address was chosen, an error message is " - "shown in the status bar." ); + "selection." ); TextLabelServerAddr->setWhatsThis ( strServAddrH ); LineEditServerAddr->setWhatsThis ( strServAddrH ); @@ -51,7 +52,7 @@ CConnectDlg::CConnectDlg ( QWidget* parent, Qt::WindowFlags f ) // init server address combo box (max MAX_NUM_SERVER_ADDR_ITEMS entries) LineEditServerAddr->setMaxCount ( MAX_NUM_SERVER_ADDR_ITEMS ); - LineEditServerAddr->setInsertPolicy ( QComboBox::InsertAtTop ); + LineEditServerAddr->setInsertPolicy ( QComboBox::NoInsert ); // set up list view for connected clients ListViewServers->setColumnWidth ( 0, 170 ); @@ -67,13 +68,8 @@ CConnectDlg::CConnectDlg ( QWidget* parent, Qt::WindowFlags f ) QObject::connect ( CancelButton, SIGNAL ( clicked() ), this, SLOT ( OnCancelButtonClicked() ) ); - // line edits - QObject::connect ( LineEditServerAddr, SIGNAL ( editTextChanged ( const QString ) ), - this, SLOT ( OnLineEditServerAddrTextChanged ( const QString ) ) ); - - QObject::connect ( LineEditServerAddr, SIGNAL ( activated ( int ) ), - this, SLOT ( OnLineEditServerAddrActivated ( int ) ) ); - + QObject::connect ( ConnectButton, SIGNAL ( clicked() ), + this, SLOT ( close() ) ); // timers QObject::connect ( &TimerPing, SIGNAL ( timeout() ), @@ -83,14 +79,14 @@ CConnectDlg::CConnectDlg ( QWidget* parent, Qt::WindowFlags f ) this, SLOT ( OnTimerReRequestServList() ) ); } -void CConnectDlg::LoadStoredServers ( const CVector& vstrIPAddress ) +void CConnectDlg::LoadStoredServers ( const CVector& vstrIPAddresses ) { // load stored IP addresses in combo box for ( int iLEIdx = 0; iLEIdx < MAX_NUM_SERVER_ADDR_ITEMS; iLEIdx++ ) { - if ( !vstrIPAddress[iLEIdx].isEmpty() ) + if ( !vstrIPAddresses[iLEIdx].isEmpty() ) { - LineEditServerAddr->addItem ( vstrIPAddress[iLEIdx] ); + LineEditServerAddr->addItem ( vstrIPAddresses[iLEIdx] ); } } } @@ -102,6 +98,9 @@ void CConnectDlg::showEvent ( QShowEvent* ) bServerListReceived = false; bCancelPressed = false; + // clear current address + strSelectedAddress = ""; + // TEST QString strNAddr = "llcon.dyndns.org:22122"; @@ -124,20 +123,25 @@ QString strNAddr = "llcon.dyndns.org:22122"; 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(); + + if ( CurSelListItemList.count() > 0 ) + { + strSelectedAddress = + CurSelListItemList[0]->data ( 0, Qt::UserRole ).toString(); + } + else + { + strSelectedAddress = LineEditServerAddr->currentText(); + } + // if window is closed, stop timers TimerPing.stop(); TimerReRequestServList.stop(); - -// TODO -/* -// store IP addresses -for ( int iLEIdx = 0; iLEIdx < LineEditServerAddr->count(); iLEIdx++ ) -{ - pClient->vstrIPAddress[iLEIdx] = - LineEditServerAddr->itemText ( iLEIdx ); -} -*/ - } void CConnectDlg::OnTimerReRequestServList() @@ -228,17 +232,6 @@ void CConnectDlg::SetServerList ( const CHostAddress& InetAddr, TimerPing.start ( PING_UPDATE_TIME_SERVER_LIST_MS ); } -void CConnectDlg::OnLineEditServerAddrTextChanged ( const QString ) -{ - // if the maximum number of items in the combo box is reached, - // delete the last item so that the new item can be added (first - // in - first out) - if ( LineEditServerAddr->count() == MAX_NUM_SERVER_ADDR_ITEMS ) - { - LineEditServerAddr->removeItem ( MAX_NUM_SERVER_ADDR_ITEMS - 1 ); - } -} - void CConnectDlg::OnCancelButtonClicked() { // set cancel flag @@ -248,15 +241,6 @@ void CConnectDlg::OnCancelButtonClicked() close(); } -void CConnectDlg::OnLineEditServerAddrActivated ( int index ) -{ - // move activated list item to the top - const QString strCurIPAddress = LineEditServerAddr->itemText ( index ); - LineEditServerAddr->removeItem ( index ); - LineEditServerAddr->insertItem ( 0, strCurIPAddress ); - LineEditServerAddr->setCurrentIndex ( 0 ); -} - void CConnectDlg::OnTimerPing() { // send ping messages to the servers in the list diff --git a/src/connectdlg.h b/src/connectdlg.h index 7467259c..d16b272e 100755 --- a/src/connectdlg.h +++ b/src/connectdlg.h @@ -59,26 +59,29 @@ public: void SetServerList ( const CHostAddress& InetAddr, const CVector& vecServerInfo ); - void LoadStoredServers ( const CVector& vstrIPAddress ); + void LoadStoredServers ( const CVector& vstrNewIPAddresses ); void SetPingTimeResult ( CHostAddress& InetAddr, const int iPingTime, const int iPingTimeLEDColor ); + bool GetCancelPressed() const { return bCancelPressed; } + QString GetSelectedAddress() const { return strSelectedAddress; } + protected: virtual void showEvent ( QShowEvent* ); virtual void hideEvent ( QHideEvent* ); - QTimer TimerPing; - QTimer TimerReRequestServList; - CHostAddress CentralServerAddress; - bool bServerListReceived; - bool bCancelPressed; + QTimer TimerPing; + QTimer TimerReRequestServList; + CHostAddress CentralServerAddress; + CVector vstrIPAddresses; + QString strSelectedAddress; + bool bServerListReceived; + bool bCancelPressed; public slots: void OnCancelButtonClicked(); - void OnLineEditServerAddrTextChanged ( const QString ); - void OnLineEditServerAddrActivated ( int index ); void OnTimerPing(); void OnTimerReRequestServList(); diff --git a/src/llconclientdlg.cpp b/src/llconclientdlg.cpp index c6e54be9..fc1c56df 100755 --- a/src/llconclientdlg.cpp +++ b/src/llconclientdlg.cpp @@ -105,20 +105,6 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, "Disconnect, i.e., it implements a toggle functionality for connecting " "and disconnecting the llcon software." ) ); - // server address - QString strServAddrH = tr ( "Server Address: The IP address or URL " - "of the server running the llcon server software must be set here. " - "A list of the most recent used server URLs is available for " - "selection. If an invalid address was chosen, an error message is " - "shown in the status bar." ); - - TextLabelServerAddr->setWhatsThis ( strServAddrH ); - LineEditServerAddr->setWhatsThis ( strServAddrH ); - - LineEditServerAddr->setAccessibleName ( tr ( "Server address edit box" ) ); - LineEditServerAddr->setAccessibleDescription ( tr ( "Holds the current server " - "URL. It also stores old URLs in the combo box list." ) ); - // fader tag QString strFaderTag = tr ( "Fader Tag: The fader tag of the local " "client is set in the fader tag edit box. This tag will appear " @@ -253,22 +239,6 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, // init fader tag line edit LineEditFaderTag->setText ( pClient->strName ); - // init server address combo box (max MAX_NUM_SERVER_ADDR_ITEMS entries) - LineEditServerAddr->setMaxCount ( MAX_NUM_SERVER_ADDR_ITEMS ); - LineEditServerAddr->setInsertPolicy ( QComboBox::InsertAtTop ); - - // load data from ini file - for ( int iLEIdx = 0; iLEIdx < MAX_NUM_SERVER_ADDR_ITEMS; iLEIdx++ ) - { - if ( !pClient->vstrIPAddress[iLEIdx].isEmpty() ) - { - LineEditServerAddr->addItem ( pClient->vstrIPAddress[iLEIdx] ); - } - } - - // we want the cursor to be at IP address line edit at startup - LineEditServerAddr->setFocus(); - // init status label OnTimerStatus(); @@ -395,12 +365,6 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QObject::connect ( LineEditFaderTag, SIGNAL ( textChanged ( const QString& ) ), this, SLOT ( OnFaderTagTextChanged ( const QString& ) ) ); - QObject::connect ( LineEditServerAddr, SIGNAL ( editTextChanged ( const QString ) ), - this, SLOT ( OnLineEditServerAddrTextChanged ( const QString ) ) ); - - QObject::connect ( LineEditServerAddr, SIGNAL ( activated ( int ) ), - this, SLOT ( OnLineEditServerAddrActivated ( int ) ) ); - // other QObject::connect ( pClient, SIGNAL ( ConClientListMesReceived ( CVector ) ), @@ -453,13 +417,6 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, // Timers ------------------------------------------------------------------ // start timer for status bar TimerStatus.start ( LED_BAR_UPDATE_TIME_MS ); - - -// TEST -ConnectDlg.LoadStoredServers ( pClient->vstrIPAddress ); -ConnectDlg.setModal ( true ); -ConnectDlg.show(); - } void CLlconClientDlg::closeEvent ( QCloseEvent* Event ) @@ -475,13 +432,6 @@ void CLlconClientDlg::closeEvent ( QCloseEvent* Event ) pClient->Stop(); } - // store IP addresses - for ( int iLEIdx = 0; iLEIdx < LineEditServerAddr->count(); iLEIdx++ ) - { - pClient->vstrIPAddress[iLEIdx] = - LineEditServerAddr->itemText ( iLEIdx ); - } - // store fader tag pClient->strName = LineEditFaderTag->text(); @@ -551,26 +501,6 @@ void CLlconClientDlg::OnSliderAudInFader ( int value ) UpdateAudioFaderSlider(); } -void CLlconClientDlg::OnLineEditServerAddrTextChanged ( const QString ) -{ - // if the maximum number of items in the combo box is reached, - // delete the last item so that the new item can be added (first - // in - first out) - if ( LineEditServerAddr->count() == MAX_NUM_SERVER_ADDR_ITEMS ) - { - LineEditServerAddr->removeItem ( MAX_NUM_SERVER_ADDR_ITEMS - 1 ); - } -} - -void CLlconClientDlg::OnLineEditServerAddrActivated ( int index ) -{ - // move activated list item to the top - const QString strCurIPAddress = LineEditServerAddr->itemText ( index ); - LineEditServerAddr->removeItem ( index ); - LineEditServerAddr->insertItem ( 0, strCurIPAddress ); - LineEditServerAddr->setCurrentIndex ( 0 ); -} - void CLlconClientDlg::OnConnectDisconBut() { // the connect/disconnect button implements a toggle functionality @@ -800,39 +730,73 @@ void CLlconClientDlg::ConnectDisconnect ( const bool bDoStart ) // start/stop client, set button text if ( bDoStart ) { - // set address and check if address is valid - if ( pClient->SetServerAddr ( LineEditServerAddr->currentText() ) ) + // init the connect dialog and execute it (modal dialog) + ConnectDlg.LoadStoredServers ( pClient->vstrIPAddress ); + ConnectDlg.exec(); + + // check if cancel was pressed + if ( !ConnectDlg.GetCancelPressed() ) { - bool bStartOk = true; + const QString strSelectedAddress = ConnectDlg.GetSelectedAddress(); - // try to start client, if error occurred, do not go in - // running state but show error message - try + if ( !strSelectedAddress.isEmpty() ) { - pClient->Start(); + CVector vstrTempList ( 0 ); + + // store the new address in the current server storage list at + // the top, make sure we do not have more than allowed stored + // servers + vstrTempList.Add ( strSelectedAddress ); + for ( int iIdx = 0; ( iIdx < pClient->vstrIPAddress.Size() ) && + ( iIdx < ( MAX_NUM_SERVER_ADDR_ITEMS - 1 ) ); iIdx++ ) + { + // only add old server address if it is not the same as the + // selected one + if ( pClient->vstrIPAddress[iIdx].compare ( strSelectedAddress ) ) + { + vstrTempList.Add ( pClient->vstrIPAddress[iIdx] ); + } + } + + // copy new generated list to client + pClient->vstrIPAddress = vstrTempList; } - catch ( CGenErr generr ) + // set address and check if address is valid + if ( pClient->SetServerAddr ( strSelectedAddress ) ) { - QMessageBox::critical ( - this, APP_NAME, generr.GetErrorText(), "Close", 0 ); + bool bStartOk = true; - bStartOk = false; + // try to start client, if error occurred, do not go in + // running state but show error message + try + { + pClient->Start(); + } + + catch ( CGenErr generr ) + { + QMessageBox::critical ( + this, APP_NAME, generr.GetErrorText(), "Close", 0 ); + + bStartOk = false; + } + + if ( bStartOk ) + { + PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT ); + + // start timer for level meter bar and ping time measurement + TimerSigMet.start ( LEVELMETER_UPDATE_TIME_MS ); + TimerPing.start ( PING_UPDATE_TIME_MS ); + } + } + else + { + // show the error as red light + LEDConnection->SetLight ( MUL_COL_LED_RED ); } - if ( bStartOk ) - { - PushButtonConnect->setText ( CON_BUT_DISCONNECTTEXT ); - - // start timer for level meter bar and ping time measurement - TimerSigMet.start ( LEVELMETER_UPDATE_TIME_MS ); - TimerPing.start ( PING_UPDATE_TIME_MS ); - } - } - else - { - // show the error as red light - LEDConnection->SetLight ( MUL_COL_LED_RED ); } } else diff --git a/src/llconclientdlg.h b/src/llconclientdlg.h index ee8d3c7b..ec63110f 100755 --- a/src/llconclientdlg.h +++ b/src/llconclientdlg.h @@ -1,165 +1,163 @@ -/******************************************************************************\ - * Copyright (c) 2004-2011 - * - * Author(s): - * Volker Fischer - * - ****************************************************************************** - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * -\******************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "global.h" -#include "client.h" -#include "multicolorled.h" -#include "audiomixerboard.h" -#include "clientsettingsdlg.h" -#include "chatdlg.h" -#include "connectdlg.h" -#ifdef _WIN32 -# include "../windows/moc/llconclientdlgbase.h" -#else -# ifdef _IS_QMAKE_CONFIG -# include "ui_llconclientdlgbase.h" -# else -# include "moc/llconclientdlgbase.h" -# endif -#endif - - -/* Definitions ****************************************************************/ -// text strings for connection button for connect and disconnect -#define CON_BUT_CONNECTTEXT "C&onnect" -#define CON_BUT_DISCONNECTTEXT "D&isconnect" - -// update time for GUI controls -#define LEVELMETER_UPDATE_TIME_MS 100 // ms -#define LED_BAR_UPDATE_TIME_MS 1000 // ms - -// range for signal level meter -#define LOW_BOUND_SIG_METER ( -50.0 ) // dB -#define UPPER_BOUND_SIG_METER ( 0.0 ) // dB - -// number of ping times > upper bound until error message is shown -#define NUM_HIGH_PINGS_UNTIL_ERROR 5 - - -/* Classes ********************************************************************/ -class CLlconClientDlg : public QDialog, private Ui_CLlconClientDlgBase -{ - Q_OBJECT - -public: - CLlconClientDlg ( CClient* pNCliP, - const bool bNewConnectOnStartup, - const bool bNewDisalbeLEDs, - QWidget* parent = 0, - Qt::WindowFlags f = 0 ); - -protected: - void SetGUIDesign ( const EGUIDesign eNewDesign ); - void SetMyWindowTitle ( const int iNumClients ); - void ShowChatWindow(); - void UpdateAudioFaderSlider(); - void UpdateRevSelection(); - void ConnectDisconnect ( const bool bDoStart ); - - CClient* pClient; - bool bConnected; - bool bUnreadChatMessage; - QTimer TimerSigMet; - QTimer TimerStatus; - QTimer TimerPing; - - virtual void customEvent ( QEvent* Event ); - virtual void closeEvent ( QCloseEvent* Event ); - void UpdateDisplay(); - - QMenu* pViewMenu; - QMenuBar* pMenu; - - CClientSettingsDlg ClientSettingsDlg; - CChatDlg ChatDlg; - CConnectDlg ConnectDlg; - -public slots: - void OnConnectDisconBut(); - void OnTimerSigMet(); - - void OnTimerStatus() - { UpdateDisplay(); } - - void OnTimerPing(); - void OnPingTimeResult ( int iPingTime ); - void OnCLPingTimeResult ( CHostAddress InetAddr, int iPingTime ); - void OnOpenGeneralSettings(); - - void OnOpenChatDialog() - { ShowChatWindow(); } - - void OnSliderAudInFader ( int value ); - - void OnSliderAudReverb ( int value ) - { pClient->SetReverbLevel ( value ); } - - void OnRevSelL() - { pClient->SetReverbOnLeftChan ( true ); } - - void OnRevSelR() - { pClient->SetReverbOnLeftChan ( false ); } - - void OnConClientListMesReceived ( CVector vecChanInfo ); - void OnFaderTagTextChanged ( const QString& strNewName ); - void OnChatTextReceived ( QString strChatText ); - - void OnChangeChanGain ( int iId, double dGain ) - { pClient->SetRemoteChanGain ( iId, dGain ); } - - void OnNewLocalInputText ( QString strChatText ) - { pClient->CreateChatTextMes ( strChatText ); } - - void OnReqServerListQuery ( CHostAddress InetAddr ) - { pClient->CreateCLReqServerListMes ( InetAddr ); } - - void OnCreateCLPingMes ( CHostAddress InetAddr ) - { pClient->CreateCLPingMes ( InetAddr ); } - - void OnCLServerListReceived ( CHostAddress InetAddr, - CVector vecServerInfo ) - { ConnectDlg.SetServerList ( InetAddr, vecServerInfo ); } - - void OnLineEditServerAddrTextChanged ( const QString ); - void OnLineEditServerAddrActivated ( int index ); - void OnDisconnected(); - void OnStopped(); - - void OnGUIDesignChanged() - { SetGUIDesign ( pClient->GetGUIDesign() ); } - - void OnStereoCheckBoxChanged() { UpdateRevSelection(); } - void OnNumClientsChanged ( int iNewNumClients ); -}; +/******************************************************************************\ + * Copyright (c) 2004-2011 + * + * Author(s): + * Volker Fischer + * + ****************************************************************************** + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * +\******************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "global.h" +#include "client.h" +#include "multicolorled.h" +#include "audiomixerboard.h" +#include "clientsettingsdlg.h" +#include "chatdlg.h" +#include "connectdlg.h" +#ifdef _WIN32 +# include "../windows/moc/llconclientdlgbase.h" +#else +# ifdef _IS_QMAKE_CONFIG +# include "ui_llconclientdlgbase.h" +# else +# include "moc/llconclientdlgbase.h" +# endif +#endif + + +/* Definitions ****************************************************************/ +// text strings for connection button for connect and disconnect +#define CON_BUT_CONNECTTEXT "C&onnect" +#define CON_BUT_DISCONNECTTEXT "D&isconnect" + +// update time for GUI controls +#define LEVELMETER_UPDATE_TIME_MS 100 // ms +#define LED_BAR_UPDATE_TIME_MS 1000 // ms + +// range for signal level meter +#define LOW_BOUND_SIG_METER ( -50.0 ) // dB +#define UPPER_BOUND_SIG_METER ( 0.0 ) // dB + +// number of ping times > upper bound until error message is shown +#define NUM_HIGH_PINGS_UNTIL_ERROR 5 + + +/* Classes ********************************************************************/ +class CLlconClientDlg : public QDialog, private Ui_CLlconClientDlgBase +{ + Q_OBJECT + +public: + CLlconClientDlg ( CClient* pNCliP, + const bool bNewConnectOnStartup, + const bool bNewDisalbeLEDs, + QWidget* parent = 0, + Qt::WindowFlags f = 0 ); + +protected: + void SetGUIDesign ( const EGUIDesign eNewDesign ); + void SetMyWindowTitle ( const int iNumClients ); + void ShowChatWindow(); + void UpdateAudioFaderSlider(); + void UpdateRevSelection(); + void ConnectDisconnect ( const bool bDoStart ); + + CClient* pClient; + bool bConnected; + bool bUnreadChatMessage; + QTimer TimerSigMet; + QTimer TimerStatus; + QTimer TimerPing; + + virtual void customEvent ( QEvent* Event ); + virtual void closeEvent ( QCloseEvent* Event ); + void UpdateDisplay(); + + QMenu* pViewMenu; + QMenuBar* pMenu; + + CClientSettingsDlg ClientSettingsDlg; + CChatDlg ChatDlg; + CConnectDlg ConnectDlg; + +public slots: + void OnConnectDisconBut(); + void OnTimerSigMet(); + + void OnTimerStatus() + { UpdateDisplay(); } + + void OnTimerPing(); + void OnPingTimeResult ( int iPingTime ); + void OnCLPingTimeResult ( CHostAddress InetAddr, int iPingTime ); + void OnOpenGeneralSettings(); + + void OnOpenChatDialog() + { ShowChatWindow(); } + + void OnSliderAudInFader ( int value ); + + void OnSliderAudReverb ( int value ) + { pClient->SetReverbLevel ( value ); } + + void OnRevSelL() + { pClient->SetReverbOnLeftChan ( true ); } + + void OnRevSelR() + { pClient->SetReverbOnLeftChan ( false ); } + + void OnConClientListMesReceived ( CVector vecChanInfo ); + void OnFaderTagTextChanged ( const QString& strNewName ); + void OnChatTextReceived ( QString strChatText ); + + void OnChangeChanGain ( int iId, double dGain ) + { pClient->SetRemoteChanGain ( iId, dGain ); } + + void OnNewLocalInputText ( QString strChatText ) + { pClient->CreateChatTextMes ( strChatText ); } + + void OnReqServerListQuery ( CHostAddress InetAddr ) + { pClient->CreateCLReqServerListMes ( InetAddr ); } + + void OnCreateCLPingMes ( CHostAddress InetAddr ) + { pClient->CreateCLPingMes ( InetAddr ); } + + void OnCLServerListReceived ( CHostAddress InetAddr, + CVector vecServerInfo ) + { ConnectDlg.SetServerList ( InetAddr, vecServerInfo ); } + + void OnDisconnected(); + void OnStopped(); + + void OnGUIDesignChanged() + { SetGUIDesign ( pClient->GetGUIDesign() ); } + + void OnStereoCheckBoxChanged() { UpdateRevSelection(); } + void OnNumClientsChanged ( int iNewNumClients ); +};