added two buttons on the main window

This commit is contained in:
Volker Fischer 2011-05-28 20:07:57 +00:00
parent 3f17145527
commit 037cdeaf83
6 changed files with 1036 additions and 995 deletions

View file

@ -122,37 +122,17 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
"QSlider::handle { image: url(:/png/fader/res/faderhandle.png); }" );
// mute button
pcbMute->setStyleSheet (
"QCheckBox::indicator { width: 38px;"
" height: 21px; }"
"QCheckBox::indicator:unchecked {"
" image: url(:/png/fader/res/ledbuttonnotpressed.png); }"
"QCheckBox::indicator:checked {"
" image: url(:/png/fader/res/ledbuttonpressed.png); }"
"QCheckBox { color: rgb(148, 148, 148);"
" font: bold; }" );
pcbMute->setText ( "MUTE" );
// solo button
pcbSolo->setStyleSheet (
"QCheckBox::indicator { width: 38px;"
" height: 21px; }"
"QCheckBox::indicator:unchecked {"
" image: url(:/png/fader/res/ledbuttonnotpressed.png); }"
"QCheckBox::indicator:checked {"
" image: url(:/png/fader/res/ledbuttonpressed.png); }"
"QCheckBox { color: rgb(148, 148, 148);"
" font: bold; }" );
pcbSolo->setText ( "SOLO" );
break;
default:
// reset style sheet and set original paramters
pFader->setStyleSheet ( "" );
pcbMute->setStyleSheet ( "" );
pcbSolo->setStyleSheet ( "" );
pcbMute->setText ( "Mute" );
pcbSolo->setText ( "Solo" );
pFader->setStyleSheet ( "" );
pcbMute->setText ( "Mute" );
pcbSolo->setText ( "Solo" );
break;
}
}

View file

@ -237,6 +237,9 @@
<property name="text" >
<string>Driver Setup</string>
</property>
<property name="autoDefault" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>

View file

@ -322,10 +322,17 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
// Connections -------------------------------------------------------------
// push-buttons
// push buttons
QObject::connect ( butConnect, SIGNAL ( clicked() ),
this, SLOT ( OnConnectDisconBut() ) );
// check boxes
QObject::connect ( chbSettings, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnSettingsStateChanged ( int ) ) );
QObject::connect ( chbChat, SIGNAL ( stateChanged ( int ) ),
this, SLOT ( OnChatStateChanged ( int ) ) );
// timers
QObject::connect ( &TimerSigMet, SIGNAL ( timeout() ),
this, SLOT ( OnTimerSigMet() ) );
@ -497,16 +504,6 @@ void CLlconClientDlg::OnConnectDisconBut()
ConnectDisconnect ( !pClient->IsRunning() );
}
void CLlconClientDlg::OnOpenGeneralSettings()
{
// open general settings dialog
ClientSettingsDlg.show();
// make sure dialog is upfront and has focus
ClientSettingsDlg.raise();
ClientSettingsDlg.activateWindow();
}
void CLlconClientDlg::OnChatTextReceived ( QString strChatText )
{
// init flag (will maybe overwritten later in this function)
@ -573,6 +570,16 @@ void CLlconClientDlg::SetMyWindowTitle ( const int iNumClients )
}
}
void CLlconClientDlg::ShowGeneralSettings()
{
// open general settings dialog
ClientSettingsDlg.show();
// make sure dialog is upfront and has focus
ClientSettingsDlg.raise();
ClientSettingsDlg.activateWindow();
}
void CLlconClientDlg::ShowChatWindow()
{
// open chat dialog
@ -588,6 +595,30 @@ void CLlconClientDlg::ShowChatWindow()
UpdateDisplay();
}
void CLlconClientDlg::OnSettingsStateChanged ( int value )
{
if ( value == Qt::Checked )
{
ShowGeneralSettings();
}
else
{
ClientSettingsDlg.hide();
}
}
void CLlconClientDlg::OnChatStateChanged ( int value )
{
if ( value == Qt::Checked )
{
ShowChatWindow();
}
else
{
ChatDlg.hide();
}
}
void CLlconClientDlg::OnFaderTagTextChanged ( const QString& strNewName )
{
// check length
@ -904,7 +935,15 @@ void CLlconClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
" font: bold; }"
"QRadioButton { color: rgb(148, 148, 148);"
" font: bold; }"
"QGroupBox::title { color: rgb(148, 148, 148); }" );
"QGroupBox::title { color: rgb(148, 148, 148); }"
"QCheckBox::indicator { width: 38px;"
" height: 21px; }"
"QCheckBox::indicator:unchecked {"
" image: url(:/png/fader/res/ledbuttonnotpressed.png); }"
"QCheckBox::indicator:checked {"
" image: url(:/png/fader/res/ledbuttonpressed.png); }"
"QCheckBox { color: rgb(148, 148, 148);"
" font: bold; }" );
#ifdef _WIN32
// Workaround QT-Windows problem: This should not be necessary since in the

View file

@ -85,6 +85,7 @@ public:
protected:
void SetGUIDesign ( const EGUIDesign eNewDesign );
void SetMyWindowTitle ( const int iNumClients );
void ShowGeneralSettings();
void ShowChatWindow();
void UpdateAudioFaderSlider();
void UpdateRevSelection();
@ -124,10 +125,12 @@ public slots:
void OnCLPingTimeWithNumClientsReceived ( CHostAddress InetAddr,
int iPingTime,
int iNumClients );
void OnOpenGeneralSettings();
void OnOpenChatDialog()
{ ShowChatWindow(); }
void OnOpenGeneralSettings() { ShowGeneralSettings(); }
void OnOpenChatDialog() { ShowChatWindow(); }
void OnSettingsStateChanged ( int value );
void OnChatStateChanged ( int value );
void OnAudioPanValueChanged ( int value );

View file

@ -6,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>345</width>
<height>338</height>
<height>382</height>
</rect>
</property>
<property name="windowTitle" >
@ -426,6 +426,20 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chbSettings" >
<property name="text" >
<string>Settings</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chbChat" >
<property name="text" >
<string>Chat</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblServerTag" >
<property name="sizePolicy" >
@ -752,6 +766,8 @@
<tabstops>
<tabstop>butConnect</tabstop>
<tabstop>edtFaderTag</tabstop>
<tabstop>chbChat</tabstop>
<tabstop>chbSettings</tabstop>
<tabstop>sldAudioPan</tabstop>
<tabstop>sldAudioReverb</tabstop>
<tabstop>rbtReverbSelL</tabstop>

View file

@ -727,7 +727,7 @@ public:
void Init ( const int iNewBlockLengthAtSystemSampleRate,
const int iNewSystemSampleRateHz,
const int iHistoryLengthTimeSec,
const int iNewNewValueBoundFactor = 4 )
const int iNewNewValueBoundFactor = 10 )
{
// store block size and new value bound factor
iBlockLengthAtSystemSampleRate = iNewBlockLengthAtSystemSampleRate;