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); }" ); "QSlider::handle { image: url(:/png/fader/res/faderhandle.png); }" );
// mute button // 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" ); pcbMute->setText ( "MUTE" );
// solo button // 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" ); pcbSolo->setText ( "SOLO" );
break; break;
default: default:
// reset style sheet and set original paramters // reset style sheet and set original paramters
pFader->setStyleSheet ( "" ); pFader->setStyleSheet ( "" );
pcbMute->setStyleSheet ( "" ); pcbMute->setText ( "Mute" );
pcbSolo->setStyleSheet ( "" ); pcbSolo->setText ( "Solo" );
pcbMute->setText ( "Mute" );
pcbSolo->setText ( "Solo" );
break; break;
} }
} }

View file

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

View file

@ -322,10 +322,17 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
// Connections ------------------------------------------------------------- // Connections -------------------------------------------------------------
// push-buttons // push buttons
QObject::connect ( butConnect, SIGNAL ( clicked() ), QObject::connect ( butConnect, SIGNAL ( clicked() ),
this, SLOT ( OnConnectDisconBut() ) ); 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 // timers
QObject::connect ( &TimerSigMet, SIGNAL ( timeout() ), QObject::connect ( &TimerSigMet, SIGNAL ( timeout() ),
this, SLOT ( OnTimerSigMet() ) ); this, SLOT ( OnTimerSigMet() ) );
@ -497,16 +504,6 @@ void CLlconClientDlg::OnConnectDisconBut()
ConnectDisconnect ( !pClient->IsRunning() ); 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 ) void CLlconClientDlg::OnChatTextReceived ( QString strChatText )
{ {
// init flag (will maybe overwritten later in this function) // 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() void CLlconClientDlg::ShowChatWindow()
{ {
// open chat dialog // open chat dialog
@ -588,6 +595,30 @@ void CLlconClientDlg::ShowChatWindow()
UpdateDisplay(); 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 ) void CLlconClientDlg::OnFaderTagTextChanged ( const QString& strNewName )
{ {
// check length // check length
@ -904,7 +935,15 @@ void CLlconClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
" font: bold; }" " font: bold; }"
"QRadioButton { color: rgb(148, 148, 148);" "QRadioButton { color: rgb(148, 148, 148);"
" font: bold; }" " 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 #ifdef _WIN32
// Workaround QT-Windows problem: This should not be necessary since in the // Workaround QT-Windows problem: This should not be necessary since in the

View file

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

View file

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

View file

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