added fancy GUI design
This commit is contained in:
parent
c22d5a95f6
commit
1474ca5ced
18 changed files with 262 additions and 37 deletions
|
@ -97,6 +97,12 @@ llcon_SOURCES = ../src/buffer.cpp \
|
||||||
../libs/celt/stack_alloc.h \
|
../libs/celt/stack_alloc.h \
|
||||||
../libs/celt/vq.h \
|
../libs/celt/vq.h \
|
||||||
../src/resources.qrc \
|
../src/resources.qrc \
|
||||||
|
../src/res/faderbackground.png \
|
||||||
|
../src/res/faderhandle.png \
|
||||||
|
../src/res/faderhandlesmall.png \
|
||||||
|
../src/res/ledbuttonnotpressed.png \
|
||||||
|
../src/res/ledbuttonpressed.png \
|
||||||
|
../src/res/mixerboardbackground.png \
|
||||||
../src/res/gig.png \
|
../src/res/gig.png \
|
||||||
../src/res/mainicon.png \
|
../src/res/mainicon.png \
|
||||||
../src/res/CLEDBlack.png \
|
../src/res/CLEDBlack.png \
|
||||||
|
|
|
@ -38,15 +38,6 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
||||||
pcbSolo = new QCheckBox ( "Solo", pNW );
|
pcbSolo = new QCheckBox ( "Solo", pNW );
|
||||||
pLabel = new QLabel ( "", pNW );
|
pLabel = new QLabel ( "", pNW );
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
// TEST custom slider made of custom bitmaps
|
|
||||||
pFader->setStyleSheet (
|
|
||||||
"QSlider::groove { image: url(:/png/LEDs/res/CLEDYellowSmall.png) }"
|
|
||||||
"QSlider::handle { image: url(:/png/fader/res/faderhandle.png) }" );
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// setup layout
|
// setup layout
|
||||||
pMainGrid->setSpacing ( 2 );
|
pMainGrid->setSpacing ( 2 );
|
||||||
|
|
||||||
|
@ -57,27 +48,12 @@ pFader->setStyleSheet (
|
||||||
pFader->setTickInterval ( AUD_MIX_FADER_MAX / 9 );
|
pFader->setTickInterval ( AUD_MIX_FADER_MAX / 9 );
|
||||||
|
|
||||||
// setup fader tag label (use white background of label)
|
// setup fader tag label (use white background of label)
|
||||||
QPalette newPalette = pLabel->palette();
|
pLabel->setStyleSheet (
|
||||||
newPalette.setColor ( QPalette::Active, QPalette::Window,
|
"QLabel { border: 2px solid black;"
|
||||||
newPalette.color ( QPalette::Active, QPalette::Base ) );
|
" border-radius: 4px;"
|
||||||
newPalette.setColor ( QPalette::Disabled, QPalette::Window,
|
" padding: 1px;"
|
||||||
newPalette.color ( QPalette::Disabled, QPalette::Base ) );
|
" background-color: white;"
|
||||||
newPalette.setColor ( QPalette::Inactive, QPalette::Window,
|
" font: bold; }" );
|
||||||
newPalette.color ( QPalette::Inactive, QPalette::Base ) );
|
|
||||||
|
|
||||||
pLabel->setPalette ( newPalette );
|
|
||||||
pLabel->setAutoFillBackground ( true );
|
|
||||||
pLabel->setFrameShape ( QFrame::Box );
|
|
||||||
|
|
||||||
// do not allow HTML tags, align center and use some margin
|
|
||||||
pLabel->setTextFormat ( Qt::PlainText );
|
|
||||||
pLabel->setAlignment ( Qt::AlignHCenter );
|
|
||||||
pLabel->setMargin ( 3 );
|
|
||||||
|
|
||||||
// set bold text
|
|
||||||
QFont curFont = pLabel->font();
|
|
||||||
curFont.setBold ( true );
|
|
||||||
pLabel->setFont ( curFont );
|
|
||||||
|
|
||||||
// add user controls to grid
|
// add user controls to grid
|
||||||
pMainGrid->addWidget( pFader, 0, Qt::AlignHCenter );
|
pMainGrid->addWidget( pFader, 0, Qt::AlignHCenter );
|
||||||
|
@ -120,6 +96,54 @@ pFader->setStyleSheet (
|
||||||
this, SIGNAL ( soloStateChanged ( int ) ) );
|
this, SIGNAL ( soloStateChanged ( int ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
|
||||||
|
{
|
||||||
|
switch ( eNewDesign )
|
||||||
|
{
|
||||||
|
case GD_ORIGINAL:
|
||||||
|
// fader
|
||||||
|
pFader->setStyleSheet (
|
||||||
|
"QSlider { background-image: url(:/png/fader/res/faderbackground.png);"
|
||||||
|
" width: 45px; }"
|
||||||
|
"QSlider::groove { image: url(); }"
|
||||||
|
"QSlider::handle { image: url(:/png/fader/res/faderhandle.png); }" );
|
||||||
|
|
||||||
|
// mute button
|
||||||
|
pcbMute->setStyleSheet (
|
||||||
|
"QCheckBox::indicator { width: 43px;"
|
||||||
|
" height: 24px; }"
|
||||||
|
"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: 43px;"
|
||||||
|
" height: 24px; }"
|
||||||
|
"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" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CChannelFader::Reset()
|
void CChannelFader::Reset()
|
||||||
{
|
{
|
||||||
// init gain value -> maximum value as definition according to server
|
// init gain value -> maximum value as definition according to server
|
||||||
|
@ -276,6 +300,42 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags f ) :
|
||||||
QObject::connect ( vecpChanFader[9], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChangedCh9 ( int ) ) );
|
QObject::connect ( vecpChanFader[9], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChangedCh9 ( int ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAudioMixerBoard::SetGUIDesign ( const EGUIDesign eNewDesign )
|
||||||
|
{
|
||||||
|
// apply GUI design to current window
|
||||||
|
switch ( eNewDesign )
|
||||||
|
{
|
||||||
|
case GD_ORIGINAL:
|
||||||
|
// group box
|
||||||
|
setStyleSheet (
|
||||||
|
"QGroupBox { border-image: url(:/png/fader/res/mixerboardbackground.png) 34px 30px 40px 40px;"
|
||||||
|
" border-top: 34px transparent;"
|
||||||
|
" border-bottom: 40px transparent;"
|
||||||
|
" border-left: 30px transparent;"
|
||||||
|
" border-right: 40px transparent;"
|
||||||
|
" padding: -5px;"
|
||||||
|
" margin: -5px, -5px, 0px, 0px; }"
|
||||||
|
"QGroupBox::title { margin-top: 13px;"
|
||||||
|
" margin-left: 35px;"
|
||||||
|
" background-color: transparent;"
|
||||||
|
" color: rgb(148, 148, 148); }" );
|
||||||
|
layout()->setMargin ( 3 );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// reset style sheet and set original paramters
|
||||||
|
setStyleSheet ( "" );
|
||||||
|
layout()->setMargin ( 9 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// also apply GUI design to child GUI controls
|
||||||
|
for ( int i = 0; i < USED_NUM_CHANNELS; i++ )
|
||||||
|
{
|
||||||
|
vecpChanFader[i]->SetGUIDesign ( eNewDesign );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CAudioMixerBoard::HideAll()
|
void CAudioMixerBoard::HideAll()
|
||||||
{
|
{
|
||||||
// make old controls invisible
|
// make old controls invisible
|
||||||
|
|
|
@ -63,6 +63,7 @@ public:
|
||||||
void Show() { pLabel->show(); pcbMute->show(); pcbSolo->show(); pFader->show(); }
|
void Show() { pLabel->show(); pcbMute->show(); pcbSolo->show(); pFader->show(); }
|
||||||
void Hide() { pLabel->hide(); pcbMute->hide(); pcbSolo->hide(); pFader->hide(); }
|
void Hide() { pLabel->hide(); pcbMute->hide(); pcbSolo->hide(); pFader->hide(); }
|
||||||
bool IsVisible() { return pLabel->isVisible(); }
|
bool IsVisible() { return pLabel->isVisible(); }
|
||||||
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||||
|
|
||||||
void ResetSoloState();
|
void ResetSoloState();
|
||||||
void SetOtherSoloState ( const bool bState );
|
void SetOtherSoloState ( const bool bState );
|
||||||
|
@ -100,6 +101,7 @@ public:
|
||||||
|
|
||||||
void HideAll();
|
void HideAll();
|
||||||
void ApplyNewConClientList ( CVector<CChannelShortInfo>& vecChanInfo );
|
void ApplyNewConClientList ( CVector<CChannelShortInfo>& vecChanInfo );
|
||||||
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString GenFaderText ( CChannelShortInfo& ChanInfo );
|
QString GenFaderText ( CChannelShortInfo& ChanInfo );
|
||||||
|
|
|
@ -35,6 +35,7 @@ CClient::CClient ( const quint16 iPortNumber ) :
|
||||||
bReverbOnLeftChan ( false ),
|
bReverbOnLeftChan ( false ),
|
||||||
vstrIPAddress ( MAX_NUM_SERVER_ADDR_ITEMS, "" ), strName ( "" ),
|
vstrIPAddress ( MAX_NUM_SERVER_ADDR_ITEMS, "" ), strName ( "" ),
|
||||||
bOpenChatOnNewMessage ( true ),
|
bOpenChatOnNewMessage ( true ),
|
||||||
|
eGUIDesign ( GD_STANDARD ),
|
||||||
bDoAutoSockBufSize ( true ),
|
bDoAutoSockBufSize ( true ),
|
||||||
iSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT ),
|
iSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT ),
|
||||||
iSndCrdFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT ),
|
iSndCrdFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT ),
|
||||||
|
|
16
src/client.h
16
src/client.h
|
@ -81,19 +81,22 @@ public:
|
||||||
|
|
||||||
double GetTimingStdDev() { return CycleTimeVariance.GetStdDev(); }
|
double GetTimingStdDev() { return CycleTimeVariance.GetStdDev(); }
|
||||||
|
|
||||||
bool GetOpenChatOnNewMessage() { return bOpenChatOnNewMessage; }
|
bool GetOpenChatOnNewMessage() const { return bOpenChatOnNewMessage; }
|
||||||
void SetOpenChatOnNewMessage ( const bool bNV ) { bOpenChatOnNewMessage = bNV; }
|
void SetOpenChatOnNewMessage ( const bool bNV ) { bOpenChatOnNewMessage = bNV; }
|
||||||
|
|
||||||
bool GetCELTHighQuality() { return bCeltDoHighQuality; }
|
EGUIDesign GetGUIDesign() const { return eGUIDesign; }
|
||||||
|
void SetGUIDesign ( const EGUIDesign bNGD ) { eGUIDesign = bNGD; }
|
||||||
|
|
||||||
|
bool GetCELTHighQuality() const { return bCeltDoHighQuality; }
|
||||||
void SetCELTHighQuality ( const bool bNCeltHighQualityFlag );
|
void SetCELTHighQuality ( const bool bNCeltHighQualityFlag );
|
||||||
|
|
||||||
int GetAudioInFader() { return iAudioInFader; }
|
int GetAudioInFader() const { return iAudioInFader; }
|
||||||
void SetAudioInFader ( const int iNV ) { iAudioInFader = iNV; }
|
void SetAudioInFader ( const int iNV ) { iAudioInFader = iNV; }
|
||||||
|
|
||||||
int GetReverbLevel() { return iReverbLevel; }
|
int GetReverbLevel() const { return iReverbLevel; }
|
||||||
void SetReverbLevel ( const int iNL ) { iReverbLevel = iNL; }
|
void SetReverbLevel ( const int iNL ) { iReverbLevel = iNL; }
|
||||||
|
|
||||||
bool IsReverbOnLeftChan() { return bReverbOnLeftChan; }
|
bool IsReverbOnLeftChan() const { return bReverbOnLeftChan; }
|
||||||
void SetReverbOnLeftChan ( const bool bIL )
|
void SetReverbOnLeftChan ( const bool bIL )
|
||||||
{
|
{
|
||||||
bReverbOnLeftChan = bIL;
|
bReverbOnLeftChan = bIL;
|
||||||
|
@ -101,7 +104,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDoAutoSockBufSize ( const bool bValue ) { bDoAutoSockBufSize = bValue; }
|
void SetDoAutoSockBufSize ( const bool bValue ) { bDoAutoSockBufSize = bValue; }
|
||||||
bool GetDoAutoSockBufSize() { return bDoAutoSockBufSize; }
|
bool GetDoAutoSockBufSize() const { return bDoAutoSockBufSize; }
|
||||||
void SetSockBufNumFrames ( const int iNumBlocks )
|
void SetSockBufNumFrames ( const int iNumBlocks )
|
||||||
{
|
{
|
||||||
// only change parameter if new parameter is different from current one
|
// only change parameter if new parameter is different from current one
|
||||||
|
@ -189,6 +192,7 @@ protected:
|
||||||
int iStereoBlockSizeSam;
|
int iStereoBlockSizeSam;
|
||||||
|
|
||||||
bool bOpenChatOnNewMessage;
|
bool bOpenChatOnNewMessage;
|
||||||
|
EGUIDesign eGUIDesign;
|
||||||
|
|
||||||
CVector<int16_t> vecsAudioSndCrdMono;
|
CVector<int16_t> vecsAudioSndCrdMono;
|
||||||
CVector<int16_t> vecsAudioSndCrdStereo;
|
CVector<int16_t> vecsAudioSndCrdStereo;
|
||||||
|
|
|
@ -83,6 +83,16 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
cbOpenChatOnNewMessage->setCheckState ( Qt::Unchecked );
|
cbOpenChatOnNewMessage->setCheckState ( Qt::Unchecked );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fancy GUI design check box
|
||||||
|
if ( pClient->GetGUIDesign() == GD_STANDARD )
|
||||||
|
{
|
||||||
|
cbGUIDesignFancy->setCheckState ( Qt::Unchecked );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cbGUIDesignFancy->setCheckState ( Qt::Checked );
|
||||||
|
}
|
||||||
|
|
||||||
// "High Quality Audio" check box
|
// "High Quality Audio" check box
|
||||||
if ( pClient->GetCELTHighQuality() )
|
if ( pClient->GetCELTHighQuality() )
|
||||||
{
|
{
|
||||||
|
@ -117,6 +127,7 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
// timers
|
// timers
|
||||||
QObject::connect ( &TimerStatus, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerStatus, SIGNAL ( timeout() ),
|
||||||
this, SLOT ( OnTimerStatus() ) );
|
this, SLOT ( OnTimerStatus() ) );
|
||||||
|
|
||||||
QObject::connect ( &TimerPing, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerPing, SIGNAL ( timeout() ),
|
||||||
this, SLOT ( OnTimerPing() ) );
|
this, SLOT ( OnTimerPing() ) );
|
||||||
|
|
||||||
|
@ -127,8 +138,13 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
// check boxes
|
// check boxes
|
||||||
QObject::connect ( cbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( cbOpenChatOnNewMessage, SIGNAL ( stateChanged ( int ) ),
|
||||||
this, SLOT ( OnOpenChatOnNewMessageStateChanged ( int ) ) );
|
this, SLOT ( OnOpenChatOnNewMessageStateChanged ( int ) ) );
|
||||||
|
|
||||||
|
QObject::connect ( cbGUIDesignFancy, SIGNAL ( stateChanged ( int ) ),
|
||||||
|
this, SLOT ( OnGUIDesignFancyStateChanged ( int ) ) );
|
||||||
|
|
||||||
QObject::connect ( cbUseHighQualityAudio, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( cbUseHighQualityAudio, SIGNAL ( stateChanged ( int ) ),
|
||||||
this, SLOT ( OnUseHighQualityAudioStateChanged ( int ) ) );
|
this, SLOT ( OnUseHighQualityAudioStateChanged ( int ) ) );
|
||||||
|
|
||||||
QObject::connect ( cbAutoJitBuf, SIGNAL ( stateChanged ( int ) ),
|
QObject::connect ( cbAutoJitBuf, SIGNAL ( stateChanged ( int ) ),
|
||||||
this, SLOT ( OnAutoJitBuf ( int ) ) );
|
this, SLOT ( OnAutoJitBuf ( int ) ) );
|
||||||
|
|
||||||
|
@ -294,6 +310,20 @@ void CClientSettingsDlg::OnOpenChatOnNewMessageStateChanged ( int value )
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CClientSettingsDlg::OnGUIDesignFancyStateChanged ( int value )
|
||||||
|
{
|
||||||
|
if ( value == Qt::Unchecked )
|
||||||
|
{
|
||||||
|
pClient->SetGUIDesign ( GD_STANDARD );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pClient->SetGUIDesign ( GD_ORIGINAL );
|
||||||
|
}
|
||||||
|
emit GUIDesignChanged();
|
||||||
|
UpdateDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
void CClientSettingsDlg::OnUseHighQualityAudioStateChanged ( int value )
|
void CClientSettingsDlg::OnUseHighQualityAudioStateChanged ( int value )
|
||||||
{
|
{
|
||||||
pClient->SetCELTHighQuality ( value == Qt::Checked );
|
pClient->SetCELTHighQuality ( value == Qt::Checked );
|
||||||
|
|
|
@ -83,9 +83,13 @@ protected:
|
||||||
void OnSliderSndCrdBufferDelay ( int value );
|
void OnSliderSndCrdBufferDelay ( int value );
|
||||||
void OnAutoJitBuf ( int value );
|
void OnAutoJitBuf ( int value );
|
||||||
void OnOpenChatOnNewMessageStateChanged ( int value );
|
void OnOpenChatOnNewMessageStateChanged ( int value );
|
||||||
|
void OnGUIDesignFancyStateChanged ( int value );
|
||||||
void OnUseHighQualityAudioStateChanged ( int value );
|
void OnUseHighQualityAudioStateChanged ( int value );
|
||||||
void OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button );
|
void OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button );
|
||||||
void OnPingTimeResult ( int iPingTime );
|
void OnPingTimeResult ( int iPingTime );
|
||||||
void OnSoundCrdSelection ( int iSndDevIdx );
|
void OnSoundCrdSelection ( int iSndDevIdx );
|
||||||
void OnDriverSetupBut();
|
void OnDriverSetupBut();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void GUIDesignChanged();
|
||||||
};
|
};
|
||||||
|
|
|
@ -301,6 +301,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cbGUIDesignFancy" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Fancy GUI Design</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="cbUseHighQualityAudio" >
|
<widget class="QCheckBox" name="cbUseHighQualityAudio" >
|
||||||
<property name="windowModality" >
|
<property name="windowModality" >
|
||||||
|
@ -319,7 +326,7 @@
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>201</width>
|
<width>201</width>
|
||||||
<height>41</height>
|
<height>71</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
|
|
|
@ -135,6 +135,9 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
|
||||||
"<li> The CPU of the client or server is at 100%.</li>"
|
"<li> The CPU of the client or server is at 100%.</li>"
|
||||||
"</ul>" ) );
|
"</ul>" ) );
|
||||||
|
|
||||||
|
// init GUI design
|
||||||
|
SetGUIDesign ( pClient->GetGUIDesign() );
|
||||||
|
|
||||||
// init fader tag line edit
|
// init fader tag line edit
|
||||||
LineEditFaderTag->setText ( pClient->strName );
|
LineEditFaderTag->setText ( pClient->strName );
|
||||||
|
|
||||||
|
@ -240,26 +243,31 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
|
||||||
// timers
|
// timers
|
||||||
QObject::connect ( &TimerSigMet, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerSigMet, SIGNAL ( timeout() ),
|
||||||
this, SLOT ( OnTimerSigMet() ) );
|
this, SLOT ( OnTimerSigMet() ) );
|
||||||
|
|
||||||
QObject::connect ( &TimerStatus, SIGNAL ( timeout() ),
|
QObject::connect ( &TimerStatus, SIGNAL ( timeout() ),
|
||||||
this, SLOT ( OnTimerStatus() ) );
|
this, SLOT ( OnTimerStatus() ) );
|
||||||
|
|
||||||
// sliders
|
// sliders
|
||||||
QObject::connect ( SliderAudInFader, SIGNAL ( valueChanged ( int ) ),
|
QObject::connect ( SliderAudInFader, SIGNAL ( valueChanged ( int ) ),
|
||||||
this, SLOT ( OnSliderAudInFader ( int ) ) );
|
this, SLOT ( OnSliderAudInFader ( int ) ) );
|
||||||
|
|
||||||
QObject::connect ( SliderAudReverb, SIGNAL ( valueChanged ( int ) ),
|
QObject::connect ( SliderAudReverb, SIGNAL ( valueChanged ( int ) ),
|
||||||
this, SLOT ( OnSliderAudReverb ( int ) ) );
|
this, SLOT ( OnSliderAudReverb ( int ) ) );
|
||||||
|
|
||||||
// radio buttons
|
// radio buttons
|
||||||
QObject::connect ( RadioButtonRevSelL, SIGNAL ( clicked() ),
|
QObject::connect ( RadioButtonRevSelL, SIGNAL ( clicked() ),
|
||||||
this, SLOT ( OnRevSelL() ) );
|
this, SLOT ( OnRevSelL() ) );
|
||||||
|
|
||||||
QObject::connect ( RadioButtonRevSelR, SIGNAL ( clicked() ),
|
QObject::connect ( RadioButtonRevSelR, SIGNAL ( clicked() ),
|
||||||
this, SLOT ( OnRevSelR() ) );
|
this, SLOT ( OnRevSelR() ) );
|
||||||
|
|
||||||
// line edits
|
// line edits
|
||||||
QObject::connect ( LineEditFaderTag, SIGNAL ( textChanged ( const QString& ) ),
|
QObject::connect ( LineEditFaderTag, SIGNAL ( textChanged ( const QString& ) ),
|
||||||
this, SLOT ( OnFaderTagTextChanged ( const QString& ) ) );
|
this, SLOT ( OnFaderTagTextChanged ( const QString& ) ) );
|
||||||
|
|
||||||
QObject::connect ( LineEditServerAddr, SIGNAL ( editTextChanged ( const QString ) ),
|
QObject::connect ( LineEditServerAddr, SIGNAL ( editTextChanged ( const QString ) ),
|
||||||
this, SLOT ( OnLineEditServerAddrTextChanged ( const QString ) ) );
|
this, SLOT ( OnLineEditServerAddrTextChanged ( const QString ) ) );
|
||||||
|
|
||||||
QObject::connect ( LineEditServerAddr, SIGNAL ( activated ( int ) ),
|
QObject::connect ( LineEditServerAddr, SIGNAL ( activated ( int ) ),
|
||||||
this, SLOT ( OnLineEditServerAddrActivated ( int ) ) );
|
this, SLOT ( OnLineEditServerAddrActivated ( int ) ) );
|
||||||
|
|
||||||
|
@ -267,17 +275,25 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP,
|
||||||
QObject::connect ( pClient,
|
QObject::connect ( pClient,
|
||||||
SIGNAL ( ConClientListMesReceived ( CVector<CChannelShortInfo> ) ),
|
SIGNAL ( ConClientListMesReceived ( CVector<CChannelShortInfo> ) ),
|
||||||
this, SLOT ( OnConClientListMesReceived ( CVector<CChannelShortInfo> ) ) );
|
this, SLOT ( OnConClientListMesReceived ( CVector<CChannelShortInfo> ) ) );
|
||||||
|
|
||||||
QObject::connect ( pClient,
|
QObject::connect ( pClient,
|
||||||
SIGNAL ( Disconnected() ),
|
SIGNAL ( Disconnected() ),
|
||||||
this, SLOT ( OnDisconnected() ) );
|
this, SLOT ( OnDisconnected() ) );
|
||||||
|
|
||||||
QObject::connect ( pClient,
|
QObject::connect ( pClient,
|
||||||
SIGNAL ( Stopped() ),
|
SIGNAL ( Stopped() ),
|
||||||
this, SLOT ( OnStopped() ) );
|
this, SLOT ( OnStopped() ) );
|
||||||
|
|
||||||
QObject::connect ( pClient,
|
QObject::connect ( pClient,
|
||||||
SIGNAL ( ChatTextReceived ( QString ) ),
|
SIGNAL ( ChatTextReceived ( QString ) ),
|
||||||
this, SLOT ( OnChatTextReceived ( QString ) ) );
|
this, SLOT ( OnChatTextReceived ( QString ) ) );
|
||||||
|
|
||||||
|
QObject::connect ( &ClientSettingsDlg, SIGNAL ( GUIDesignChanged() ),
|
||||||
|
this, SLOT ( OnGUIDesignChanged() ) );
|
||||||
|
|
||||||
QObject::connect ( MainMixerBoard, SIGNAL ( ChangeChanGain ( int, double ) ),
|
QObject::connect ( MainMixerBoard, SIGNAL ( ChangeChanGain ( int, double ) ),
|
||||||
this, SLOT ( OnChangeChanGain ( int, double ) ) );
|
this, SLOT ( OnChangeChanGain ( int, double ) ) );
|
||||||
|
|
||||||
QObject::connect ( &ChatDlg, SIGNAL ( NewLocalInputText ( QString ) ),
|
QObject::connect ( &ChatDlg, SIGNAL ( NewLocalInputText ( QString ) ),
|
||||||
this, SLOT ( OnNewLocalInputText ( QString ) ) );
|
this, SLOT ( OnNewLocalInputText ( QString ) ) );
|
||||||
|
|
||||||
|
@ -569,6 +585,77 @@ void CLlconClientDlg::UpdateDisplay()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CLlconClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
|
||||||
|
{
|
||||||
|
// apply GUI design to current window
|
||||||
|
switch ( eNewDesign )
|
||||||
|
{
|
||||||
|
case GD_ORIGINAL:
|
||||||
|
// group box
|
||||||
|
groupBoxLocal->setStyleSheet (
|
||||||
|
"QGroupBox { border-image: url(:/png/fader/res/mixerboardbackground.png) 34px 30px 40px 40px;"
|
||||||
|
" border-top: 34px transparent;"
|
||||||
|
" border-bottom: 40px transparent;"
|
||||||
|
" border-left: 30px transparent;"
|
||||||
|
" border-right: 40px transparent;"
|
||||||
|
" padding: -5px;"
|
||||||
|
" margin: -5px, -5px, 0px, 0px; }"
|
||||||
|
"QGroupBox::title { margin-top: 13px;"
|
||||||
|
" margin-left: 35px;"
|
||||||
|
" background-color: transparent;"
|
||||||
|
" color: rgb(148, 148, 148); }" );
|
||||||
|
groupBoxLocal->layout()->setMargin ( 3 );
|
||||||
|
|
||||||
|
// audio fader
|
||||||
|
SliderAudInFader->setStyleSheet (
|
||||||
|
"QSlider { background-image: url(:/png/fader/res/faderbackground.png);"
|
||||||
|
" width: 45px; }"
|
||||||
|
"QSlider::groove { image: url(); }"
|
||||||
|
"QSlider::handle { image: url(:/png/fader/res/faderhandlesmall.png); }" );
|
||||||
|
TextLabelAudFader->setStyleSheet (
|
||||||
|
"QLabel { color: rgb(148, 148, 148);"
|
||||||
|
" font: bold; }" );
|
||||||
|
TextAudInFader->setStyleSheet (
|
||||||
|
"QLabel { color: rgb(148, 148, 148);"
|
||||||
|
" font: bold; }" );
|
||||||
|
|
||||||
|
// Reverberation
|
||||||
|
SliderAudReverb->setStyleSheet (
|
||||||
|
"QSlider { background-image: url(:/png/fader/res/faderbackground.png);"
|
||||||
|
" width: 45px; }"
|
||||||
|
"QSlider::groove { image: url(); }"
|
||||||
|
"QSlider::handle { image: url(:/png/fader/res/faderhandlesmall.png); }" );
|
||||||
|
|
||||||
|
RadioButtonRevSelL->setStyleSheet (
|
||||||
|
"QRadioButton { color: rgb(148, 148, 148);"
|
||||||
|
" font: bold; }" );
|
||||||
|
RadioButtonRevSelR->setStyleSheet (
|
||||||
|
"QRadioButton { color: rgb(148, 148, 148);"
|
||||||
|
" font: bold; }" );
|
||||||
|
|
||||||
|
TextLabelAudReverb->setStyleSheet (
|
||||||
|
"QLabel { color: rgb(148, 148, 148);"
|
||||||
|
" font: bold; }" );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// reset style sheet and set original paramters
|
||||||
|
groupBoxLocal->setStyleSheet ( "" );
|
||||||
|
groupBoxLocal->layout()->setMargin ( 9 );
|
||||||
|
SliderAudInFader->setStyleSheet ( "" );
|
||||||
|
SliderAudReverb->setStyleSheet ( "" );
|
||||||
|
RadioButtonRevSelL->setStyleSheet ( "" );
|
||||||
|
RadioButtonRevSelR->setStyleSheet ( "" );
|
||||||
|
TextLabelAudReverb->setStyleSheet ( "" );
|
||||||
|
TextLabelAudFader->setStyleSheet ( "" );
|
||||||
|
TextAudInFader->setStyleSheet ( "" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// also apply GUI design to child GUI controls
|
||||||
|
MainMixerBoard->SetGUIDesign ( eNewDesign );
|
||||||
|
}
|
||||||
|
|
||||||
void CLlconClientDlg::customEvent ( QEvent* Event )
|
void CLlconClientDlg::customEvent ( QEvent* Event )
|
||||||
{
|
{
|
||||||
if ( Event->type() == QEvent::User + 11 )
|
if ( Event->type() == QEvent::User + 11 )
|
||||||
|
|
|
@ -71,6 +71,7 @@ public:
|
||||||
QWidget* parent = 0, Qt::WindowFlags f = 0 );
|
QWidget* parent = 0, Qt::WindowFlags f = 0 );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||||
void ShowChatWindow();
|
void ShowChatWindow();
|
||||||
void UpdateAudioFaderSlider();
|
void UpdateAudioFaderSlider();
|
||||||
void ConnectDisconnect ( const bool bDoStart );
|
void ConnectDisconnect ( const bool bDoStart );
|
||||||
|
@ -113,4 +114,5 @@ public slots:
|
||||||
void OnLineEditServerAddrActivated ( int index );
|
void OnLineEditServerAddrActivated ( int index );
|
||||||
void OnDisconnected();
|
void OnDisconnected();
|
||||||
void OnStopped();
|
void OnStopped();
|
||||||
|
void OnGUIDesignChanged() { SetGUIDesign ( pClient->GetGUIDesign() ); }
|
||||||
};
|
};
|
||||||
|
|
BIN
src/res/faderbackground.png
Executable file
BIN
src/res/faderbackground.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
src/res/faderhandlesmall.png
Executable file
BIN
src/res/faderhandlesmall.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Binary file not shown.
BIN
src/res/mixerboardbackground.png
Executable file
BIN
src/res/mixerboardbackground.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
|
@ -34,7 +34,12 @@
|
||||||
<file>res/VRLEDYellowSmall.png</file>
|
<file>res/VRLEDYellowSmall.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/png/fader" >
|
<qresource prefix="/png/fader" >
|
||||||
|
<file>res/faderbackground.png</file>
|
||||||
<file>res/faderhandle.png</file>
|
<file>res/faderhandle.png</file>
|
||||||
|
<file>res/faderhandlesmall.png</file>
|
||||||
|
<file>res/ledbuttonnotpressed.png</file>
|
||||||
|
<file>res/ledbuttonpressed.png</file>
|
||||||
|
<file>res/mixerboardbackground.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/png/main" >
|
<qresource prefix="/png/main" >
|
||||||
<file>res/gig.png</file>
|
<file>res/gig.png</file>
|
||||||
|
|
|
@ -141,6 +141,13 @@ void CSettings::ReadIniFile ( const QString& sFileName )
|
||||||
pClient->SetOpenChatOnNewMessage ( bValue );
|
pClient->SetOpenChatOnNewMessage ( bValue );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GUI design
|
||||||
|
if ( GetNumericIniSet ( IniXMLDocument, "client", "guidesign",
|
||||||
|
0, 1 /* GD_ORIGINAL */, iValue ) )
|
||||||
|
{
|
||||||
|
pClient->SetGUIDesign ( static_cast<EGUIDesign> ( iValue ) );
|
||||||
|
}
|
||||||
|
|
||||||
// flag whether using high quality audio or not
|
// flag whether using high quality audio or not
|
||||||
if ( GetFlagIniSet ( IniXMLDocument, "client", "highqualityaudio", bValue ) )
|
if ( GetFlagIniSet ( IniXMLDocument, "client", "highqualityaudio", bValue ) )
|
||||||
{
|
{
|
||||||
|
@ -199,6 +206,10 @@ void CSettings::WriteIniFile ( const QString& sFileName )
|
||||||
SetFlagIniSet ( IniXMLDocument, "client", "openchatonnewmessage",
|
SetFlagIniSet ( IniXMLDocument, "client", "openchatonnewmessage",
|
||||||
pClient->GetOpenChatOnNewMessage() );
|
pClient->GetOpenChatOnNewMessage() );
|
||||||
|
|
||||||
|
// GUI design
|
||||||
|
SetNumericIniSet ( IniXMLDocument, "client", "guidesign",
|
||||||
|
static_cast<int> ( pClient->GetGUIDesign() ) );
|
||||||
|
|
||||||
// flag whether using high quality audio or not
|
// flag whether using high quality audio or not
|
||||||
SetFlagIniSet ( IniXMLDocument, "client", "highqualityaudio",
|
SetFlagIniSet ( IniXMLDocument, "client", "highqualityaudio",
|
||||||
pClient->GetCELTHighQuality() );
|
pClient->GetCELTHighQuality() );
|
||||||
|
|
|
@ -443,6 +443,12 @@ enum EGetDataStat
|
||||||
GS_CHAN_NOT_CONNECTED
|
GS_CHAN_NOT_CONNECTED
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum EGUIDesign
|
||||||
|
{
|
||||||
|
GD_STANDARD = 0,
|
||||||
|
GD_ORIGINAL = 1
|
||||||
|
};
|
||||||
|
|
||||||
class CNetworkTransportProps
|
class CNetworkTransportProps
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue