removed fader tag edit, country and instrument buttons (since this is done in the profile dialog now)

This commit is contained in:
Volker Fischer 2015-01-31 10:04:15 +00:00
parent e02947ba97
commit c9c1f78c3f
3 changed files with 24 additions and 183 deletions

View file

@ -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 ( "<b>Your Alias/Instrument/Country:</b> 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 ( "<b>Local Audio Input Fader:</b> 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<CChannelInfo> ) ),
@ -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<QLocale::Country> ( 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 )

View file

@ -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<CChannelInfo> vecChanInfo );
void OnFaderTagTextChanged ( const QString& strNewName );
void OnChatTextReceived ( QString strChatText );
void OnLicenceRequired ( ELicenceType eLicenceType );

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>345</width>
<height>382</height>
<height>363</height>
</rect>
</property>
<property name="windowTitle">
@ -339,69 +339,12 @@
</widget>
</item>
<item>
<widget class="QLabel" name="lblServerTag">
<widget class="QCheckBox" name="chbProfile">
<property name="text">
<string>Alias/Instrument/Country</string>
</property>
<property name="wordWrap">
<bool>false</bool>
<string>My Profile</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>3</number>
</property>
<item>
<widget class="QLineEdit" name="edtFaderTag">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butInstPicture">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/png/instr/res/instrnone.png</normaloff>:/png/instr/res/instrnone.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butCountryFlag">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/png/flags/res/flags/flagnone.png</normaloff>:/png/flags/res/flags/flagnone.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout">
<item>
@ -659,9 +602,6 @@
</customwidgets>
<tabstops>
<tabstop>butConnect</tabstop>
<tabstop>edtFaderTag</tabstop>
<tabstop>butInstPicture</tabstop>
<tabstop>butCountryFlag</tabstop>
<tabstop>chbChat</tabstop>
<tabstop>chbSettings</tabstop>
<tabstop>sldAudioPan</tabstop>