From c9c1f78c3f2b47686c3b005b35f188b627fb02d2 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 31 Jan 2015 10:04:15 +0000 Subject: [PATCH] removed fader tag edit, country and instrument buttons (since this is done in the profile dialog now) --- src/clientdlg.cpp | 134 +++++++------------------------------------ src/clientdlg.h | 7 +-- src/clientdlgbase.ui | 66 +-------------------- 3 files changed, 24 insertions(+), 183 deletions(-) diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 8e3d8275..199469b0 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -96,32 +96,6 @@ CClientDlg::CClientDlg ( CClient* pNCliP, "Disconnect, i.e., it implements a toggle functionality for connecting " "and disconnecting the " ) + APP_NAME + tr ( " software." ) ); - // fader tag - QString strFaderTag = tr ( "Your Alias/Instrument/Country: Set your name " - "or an alias here so that the other musicians you want to play with " - "know who you are. Additionally you may set an instrument picture of " - "the instrument you play and a flag of the country you are living. " - "What you set here will appear at your fader on the mixer board when " - "you are connected to a " ) + APP_NAME + tr ( " server. This tag will " - "also show up at each client which is connected to the same server as " - "you. If the fader tag is empty, the IP address is shown instead." ); - - QString strFaderTagTT = tr ( "Set your name and/or instrument and/or " - "country here so that the other musicians can identify you." ) + - TOOLTIP_COM_END_TEXT; - - lblServerTag->setWhatsThis ( strFaderTag ); - lblServerTag->setToolTip ( strFaderTagTT ); - edtFaderTag->setWhatsThis ( strFaderTag ); - edtFaderTag->setToolTip ( strFaderTagTT ); - edtFaderTag->setAccessibleName ( tr ( "Fader tag edit box" ) ); - butInstPicture->setWhatsThis ( strFaderTag ); - butInstPicture->setToolTip ( strFaderTagTT ); - butInstPicture->setAccessibleName ( tr ( "Instrument picture button" ) ); - butCountryFlag->setWhatsThis ( strFaderTag ); - butCountryFlag->setToolTip ( strFaderTagTT ); - butCountryFlag->setAccessibleName ( tr ( "Country flag button" ) ); - // local audio input fader QString strAudFader = tr ( "Local Audio Input Fader: With the " "audio fader, the relative levels of the left and right local audio " @@ -216,15 +190,6 @@ CClientDlg::CClientDlg ( CClient* pNCliP, MainMixerBoard->vecStoredFaderLevels = pClient->vecStoredFaderLevels; MainMixerBoard->vecStoredFaderIsSolo = pClient->vecStoredFaderIsSolo; - // init fader tag line edit, instrument picture and country flag - edtFaderTag->setText ( pClient->ChannelInfo.strName ); - - butInstPicture->setIcon ( QIcon ( - CInstPictures::GetResourceReference ( pClient->ChannelInfo.iInstrument ) ) ); - - butCountryFlag->setIcon ( QIcon ( - CCountyFlagIcons::GetResourceReference ( pClient->ChannelInfo.eCountry ) ) ); - // init status label OnTimerStatus(); @@ -446,12 +411,6 @@ CClientDlg::CClientDlg ( CClient* pNCliP, QObject::connect ( butConnect, SIGNAL ( clicked() ), this, SLOT ( OnConnectDisconBut() ) ); - QObject::connect ( butInstPicture, SIGNAL ( clicked() ), - this, SLOT ( OnInstPictureBut() ) ); - - QObject::connect ( butCountryFlag, SIGNAL ( clicked() ), - this, SLOT ( OnCountryFlagBut() ) ); - // check boxes QObject::connect ( chbSettings, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnSettingsStateChanged ( int ) ) ); @@ -459,6 +418,9 @@ CClientDlg::CClientDlg ( CClient* pNCliP, QObject::connect ( chbChat, SIGNAL ( stateChanged ( int ) ), this, SLOT ( OnChatStateChanged ( int ) ) ); + QObject::connect ( chbProfile, SIGNAL ( stateChanged ( int ) ), + this, SLOT ( OnProfileStateChanged ( int ) ) ); + // timers QObject::connect ( &TimerSigMet, SIGNAL ( timeout() ), this, SLOT ( OnTimerSigMet() ) ); @@ -486,17 +448,6 @@ CClientDlg::CClientDlg ( CClient* pNCliP, QObject::connect ( rbtReverbSelR, SIGNAL ( clicked() ), this, SLOT ( OnReverbSelRClicked() ) ); - // line edits - QObject::connect ( edtFaderTag, SIGNAL ( textChanged ( const QString& ) ), - this, SLOT ( OnFaderTagTextChanged ( const QString& ) ) ); - - // menus - QObject::connect ( pInstrPictPopupMenu, SIGNAL ( triggered ( QAction* ) ), - this, SLOT ( OnInstPicturesMenuTriggered ( QAction* ) ) ); - - QObject::connect ( pCountryFlagPopupMenu, SIGNAL ( triggered ( QAction* ) ), - this, SLOT ( OnCountryFlagMenuTriggered ( QAction* ) ) ); - // other QObject::connect ( pClient, SIGNAL ( ConClientListNameMesReceived ( CVector ) ), @@ -609,9 +560,6 @@ void CClientDlg::closeEvent ( QCloseEvent* Event ) pClient->Stop(); } - // store fader tag - pClient->ChannelInfo.strName = edtFaderTag->text(); - // store mixer fader settings (we have to hide all mixer faders first to // initiate a storage of the current mixer fader levels in case we are // just in a connected state) @@ -753,55 +701,6 @@ void CClientDlg::OnDisconnected() UpdateDisplay(); } -void CClientDlg::OnInstPictureBut() -{ - // open a menu which shows all available instrument pictures which - // always appears at the same position relative to the instrument - // picture button - pInstrPictPopupMenu->exec ( this->mapToGlobal ( butInstPicture->pos() ) ); -} - -void CClientDlg::OnCountryFlagBut() -{ - // open a menu which shows all available country flags which - // always appears at the same position relative to the country - // flags button - pCountryFlagPopupMenu->exec ( this->mapToGlobal ( butCountryFlag->pos() ) ); -} - -void CClientDlg::OnInstPicturesMenuTriggered ( QAction* SelAction ) -{ - // get selected instrument - const int iSelInstrument = SelAction->data().toInt(); - - // set the new value in the data base - pClient->ChannelInfo.iInstrument = iSelInstrument; - - // update channel info at the server - pClient->SetRemoteInfo(); - - // update icon on the instrument selection button - butInstPicture->setIcon ( QIcon ( - CInstPictures::GetResourceReference ( iSelInstrument ) ) ); -} - -void CClientDlg::OnCountryFlagMenuTriggered ( QAction* SelAction ) -{ - // get selected country - const QLocale::Country eSelCountry = - static_cast ( SelAction->data().toInt() ); - - // set the new value in the data base - pClient->ChannelInfo.eCountry = eSelCountry; - - // update channel info at the server - pClient->SetRemoteInfo(); - - // update icon on the instrument selection button - butCountryFlag->setIcon ( QIcon ( - CCountyFlagIcons::GetResourceReference ( eSelCountry ) ) ); -} - void CClientDlg::OnChatTextReceived ( QString strChatText ) { ChatDlg.AddChatText ( strChatText ); @@ -954,21 +853,15 @@ void CClientDlg::OnChatStateChanged ( int value ) } } -void CClientDlg::OnFaderTagTextChanged ( const QString& strNewName ) +void CClientDlg::OnProfileStateChanged ( int value ) { - // check length - if ( strNewName.length() <= MAX_LEN_FADER_TAG ) + if ( value == Qt::Checked ) { - // refresh internal name parameter - pClient->ChannelInfo.strName = strNewName; - - // update channel info at the server - pClient->SetRemoteInfo(); + ShowMusicianProfileDialog(); } else { - // text is too long, update control with shortend text - edtFaderTag->setText ( strNewName.left ( MAX_LEN_FADER_TAG ) ); + MusicianProfileDlg.hide(); } } @@ -1202,6 +1095,19 @@ void CClientDlg::UpdateDisplay() chbChat->setChecked ( true ); chbChat->blockSignals ( false ); } + + if ( chbProfile->isChecked() && !MusicianProfileDlg.isVisible() ) + { + chbProfile->blockSignals ( true ); + chbProfile->setChecked ( false ); + chbProfile->blockSignals ( false ); + } + if ( !chbProfile->isChecked() && MusicianProfileDlg.isVisible() ) + { + chbProfile->blockSignals ( true ); + chbProfile->setChecked ( true ); + chbProfile->blockSignals ( false ); + } } void CClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign ) diff --git a/src/clientdlg.h b/src/clientdlg.h index 43d0c901..bfa643ee 100755 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -118,8 +118,6 @@ public slots: void OnAboutToQuit() { pSettings->Save(); } void OnConnectDisconBut(); - void OnInstPictureBut(); - void OnCountryFlagBut(); void OnTimerSigMet(); void OnTimerBuffersLED(); @@ -144,11 +142,9 @@ public slots: void OnOpenChatDialog() { ShowChatWindow(); } void OnOpenAnalyzerConsole() { ShowAnalyzerConsole(); } - void OnInstPicturesMenuTriggered ( QAction* SelAction ); - void OnCountryFlagMenuTriggered ( QAction* SelAction ); - void OnSettingsStateChanged ( int value ); void OnChatStateChanged ( int value ); + void OnProfileStateChanged ( int value ); void OnAudioPanValueChanged ( int value ); @@ -162,7 +158,6 @@ public slots: { pClient->SetReverbOnLeftChan ( false ); } void OnConClientListMesReceived ( CVector vecChanInfo ); - void OnFaderTagTextChanged ( const QString& strNewName ); void OnChatTextReceived ( QString strChatText ); void OnLicenceRequired ( ELicenceType eLicenceType ); diff --git a/src/clientdlgbase.ui b/src/clientdlgbase.ui index bef99f7b..1341b114 100755 --- a/src/clientdlgbase.ui +++ b/src/clientdlgbase.ui @@ -7,7 +7,7 @@ 0 0 345 - 382 + 363 @@ -339,69 +339,12 @@ - + - Alias/Instrument/Country - - - false + My Profile - - - - 3 - - - - - - 0 - 0 - - - - - 90 - 0 - - - - - - - - - 0 - 0 - - - - - :/png/instr/res/instrnone.png:/png/instr/res/instrnone.png - - - - - - - - 0 - 0 - - - - - - - - :/png/flags/res/flags/flagnone.png:/png/flags/res/flags/flagnone.png - - - - - @@ -659,9 +602,6 @@ butConnect - edtFaderTag - butInstPicture - butCountryFlag chbChat chbSettings sldAudioPan