enable pan if supported by the server (check server version)
This commit is contained in:
parent
5b7ccfcdc2
commit
546e3f96e0
4 changed files with 46 additions and 20 deletions
|
@ -39,7 +39,8 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
||||||
pLevelsBox = new QWidget ( pFrame );
|
pLevelsBox = new QWidget ( pFrame );
|
||||||
plbrChannelLevel = new CMultiColorLEDBar ( pLevelsBox );
|
plbrChannelLevel = new CMultiColorLEDBar ( pLevelsBox );
|
||||||
pFader = new QSlider ( Qt::Vertical, pLevelsBox );
|
pFader = new QSlider ( Qt::Vertical, pLevelsBox );
|
||||||
pPan = new QSlider ( Qt::Horizontal, pLevelsBox );
|
pPan = new QDial ( pLevelsBox );
|
||||||
|
pPanLabel = new QLabel ( tr ( "Pan" ) , pLevelsBox );
|
||||||
|
|
||||||
pMuteSoloBox = new QWidget ( pFrame );
|
pMuteSoloBox = new QWidget ( pFrame );
|
||||||
pcbMute = new QCheckBox ( tr ( "Mute" ), pMuteSoloBox );
|
pcbMute = new QCheckBox ( tr ( "Mute" ), pMuteSoloBox );
|
||||||
|
@ -64,10 +65,13 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
||||||
pFader->setTickPosition ( QSlider::TicksBothSides );
|
pFader->setTickPosition ( QSlider::TicksBothSides );
|
||||||
pFader->setRange ( 0, AUD_MIX_FADER_MAX );
|
pFader->setRange ( 0, AUD_MIX_FADER_MAX );
|
||||||
pFader->setTickInterval ( AUD_MIX_FADER_MAX / 9 );
|
pFader->setTickInterval ( AUD_MIX_FADER_MAX / 9 );
|
||||||
|
pFader->setMinimumHeight ( 90 );
|
||||||
|
|
||||||
// setup panning slider
|
// setup panning control
|
||||||
pPan->setRange ( 0, AUD_MIX_PAN_MAX );
|
pPan->setRange ( 0, AUD_MIX_PAN_MAX );
|
||||||
pPan->setValue ( AUD_MIX_PAN_MAX / 2 );
|
pPan->setValue ( AUD_MIX_PAN_MAX / 2 );
|
||||||
|
pPan->setFixedSize ( 55, 55 );
|
||||||
|
pPan->setNotchesVisible ( true );
|
||||||
|
|
||||||
// setup fader tag label (black bold text which is centered)
|
// setup fader tag label (black bold text which is centered)
|
||||||
plblLabel->setTextFormat ( Qt::PlainText );
|
plblLabel->setTextFormat ( Qt::PlainText );
|
||||||
|
@ -101,7 +105,8 @@ CChannelFader::CChannelFader ( QWidget* pNW,
|
||||||
pMuteSoloGrid->addWidget ( pcbMute, 0, Qt::AlignLeft );
|
pMuteSoloGrid->addWidget ( pcbMute, 0, Qt::AlignLeft );
|
||||||
pMuteSoloGrid->addWidget ( pcbSolo, 0, Qt::AlignLeft );
|
pMuteSoloGrid->addWidget ( pcbSolo, 0, Qt::AlignLeft );
|
||||||
|
|
||||||
pMainGrid->addWidget ( pPan, 0, Qt::AlignCenter );
|
pMainGrid->addWidget ( pPanLabel, 0, Qt::AlignLeft );
|
||||||
|
pMainGrid->addWidget ( pPan, 0, Qt::AlignHCenter );
|
||||||
pMainGrid->addWidget ( pLevelsBox, 0, Qt::AlignHCenter );
|
pMainGrid->addWidget ( pLevelsBox, 0, Qt::AlignHCenter );
|
||||||
pMainGrid->addWidget ( pMuteSoloBox, 0, Qt::AlignHCenter );
|
pMainGrid->addWidget ( pMuteSoloBox, 0, Qt::AlignHCenter );
|
||||||
pMainGrid->addWidget ( pLabelInstBox );
|
pMainGrid->addWidget ( pLabelInstBox );
|
||||||
|
@ -186,6 +191,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
|
||||||
" padding-bottom: -15px; }"
|
" padding-bottom: -15px; }"
|
||||||
"QSlider::handle { image: url(:/png/fader/res/faderhandle.png); }" );
|
"QSlider::handle { image: url(:/png/fader/res/faderhandle.png); }" );
|
||||||
|
|
||||||
|
pPanLabel->setText ( tr ( "PAN" ) );
|
||||||
pcbMute->setText ( tr ( "MUTE" ) );
|
pcbMute->setText ( tr ( "MUTE" ) );
|
||||||
pcbSolo->setText ( tr ( "SOLO" ) );
|
pcbSolo->setText ( tr ( "SOLO" ) );
|
||||||
plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_LED );
|
plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_LED );
|
||||||
|
@ -194,6 +200,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
|
||||||
default:
|
default:
|
||||||
// reset style sheet and set original paramters
|
// reset style sheet and set original paramters
|
||||||
pFader->setStyleSheet ( "" );
|
pFader->setStyleSheet ( "" );
|
||||||
|
pPanLabel->setText ( tr ( "Pan" ) );
|
||||||
pcbMute->setText ( tr ( "Mute" ) );
|
pcbMute->setText ( tr ( "Mute" ) );
|
||||||
pcbSolo->setText ( tr ( "Solo" ) );
|
pcbSolo->setText ( tr ( "Solo" ) );
|
||||||
plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_BAR );
|
plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_BAR );
|
||||||
|
@ -211,6 +218,12 @@ bool CChannelFader::GetDisplayChannelLevel()
|
||||||
return !plbrChannelLevel->isHidden();
|
return !plbrChannelLevel->isHidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CChannelFader::SetDisplayPans ( const bool eNDP )
|
||||||
|
{
|
||||||
|
pPanLabel->setHidden ( !eNDP );
|
||||||
|
pPan->setHidden ( !eNDP );
|
||||||
|
}
|
||||||
|
|
||||||
void CChannelFader::SetupFaderTag ( const ESkillLevel eSkillLevel )
|
void CChannelFader::SetupFaderTag ( const ESkillLevel eSkillLevel )
|
||||||
{
|
{
|
||||||
// setup group box for label/instrument picture: set a thick black border
|
// setup group box for label/instrument picture: set a thick black border
|
||||||
|
@ -587,8 +600,6 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
|
||||||
setMinimumWidth ( 200 ); // at least two faders shall be visible
|
setMinimumWidth ( 200 ); // at least two faders shall be visible
|
||||||
setWidget ( pGroupBox );
|
setWidget ( pGroupBox );
|
||||||
setWidgetResizable ( true ); // make sure it fills the entire scroll area
|
setWidgetResizable ( true ); // make sure it fills the entire scroll area
|
||||||
setVerticalScrollBarPolicy ( Qt::ScrollBarAlwaysOff );
|
|
||||||
setHorizontalScrollBarPolicy ( Qt::ScrollBarAsNeeded );
|
|
||||||
setFrameShape ( QFrame::NoFrame );
|
setFrameShape ( QFrame::NoFrame );
|
||||||
|
|
||||||
|
|
||||||
|
@ -668,6 +679,14 @@ void CAudioMixerBoard::SetDisplayChannelLevels ( const bool eNDCL )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAudioMixerBoard::SetPanIsSupported()
|
||||||
|
{
|
||||||
|
for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
|
||||||
|
{
|
||||||
|
vecpChanFader[i]->SetDisplayPans ( true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CAudioMixerBoard::HideAll()
|
void CAudioMixerBoard::HideAll()
|
||||||
{
|
{
|
||||||
// make all controls invisible
|
// make all controls invisible
|
||||||
|
@ -678,6 +697,7 @@ void CAudioMixerBoard::HideAll()
|
||||||
|
|
||||||
vecpChanFader[i]->SetChannelLevel ( 0 );
|
vecpChanFader[i]->SetChannelLevel ( 0 );
|
||||||
vecpChanFader[i]->SetDisplayChannelLevel ( false );
|
vecpChanFader[i]->SetDisplayChannelLevel ( false );
|
||||||
|
vecpChanFader[i]->SetDisplayPans ( false );
|
||||||
vecpChanFader[i]->Hide();
|
vecpChanFader[i]->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QSlider>
|
#include <QSlider>
|
||||||
|
#include <QDial>
|
||||||
#include <QSizePolicy>
|
#include <QSizePolicy>
|
||||||
#include <QHostAddress>
|
#include <QHostAddress>
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
@ -58,6 +59,7 @@ public:
|
||||||
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||||
void SetDisplayChannelLevel ( const bool eNDCL );
|
void SetDisplayChannelLevel ( const bool eNDCL );
|
||||||
bool GetDisplayChannelLevel();
|
bool GetDisplayChannelLevel();
|
||||||
|
void SetDisplayPans ( const bool eNDP );
|
||||||
|
|
||||||
void UpdateSoloState ( const bool bNewOtherSoloState );
|
void UpdateSoloState ( const bool bNewOtherSoloState );
|
||||||
void SetFaderLevel ( const int iLevel );
|
void SetFaderLevel ( const int iLevel );
|
||||||
|
@ -82,7 +84,8 @@ protected:
|
||||||
QWidget* pMuteSoloBox;
|
QWidget* pMuteSoloBox;
|
||||||
CMultiColorLEDBar* plbrChannelLevel;
|
CMultiColorLEDBar* plbrChannelLevel;
|
||||||
QSlider* pFader;
|
QSlider* pFader;
|
||||||
QSlider* pPan;
|
QDial* pPan;
|
||||||
|
QLabel* pPanLabel;
|
||||||
|
|
||||||
QCheckBox* pcbMute;
|
QCheckBox* pcbMute;
|
||||||
QCheckBox* pcbSolo;
|
QCheckBox* pcbSolo;
|
||||||
|
@ -139,6 +142,7 @@ public:
|
||||||
void SetServerName ( const QString& strNewServerName );
|
void SetServerName ( const QString& strNewServerName );
|
||||||
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||||
void SetDisplayChannelLevels ( const bool eNDCL );
|
void SetDisplayChannelLevels ( const bool eNDCL );
|
||||||
|
void SetPanIsSupported();
|
||||||
|
|
||||||
void SetFaderLevel ( const int iChannelIdx,
|
void SetFaderLevel ( const int iChannelIdx,
|
||||||
const int iValue );
|
const int iValue );
|
||||||
|
|
|
@ -753,17 +753,16 @@ void CClientDlg::OnCentralServerAddressTypeChanged()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CClientDlg::OnVersionAndOSReceived ( COSUtil::EOpSystemType eOSType,
|
void CClientDlg::OnVersionAndOSReceived ( COSUtil::EOpSystemType ,
|
||||||
QString strVersion )
|
QString strVersion )
|
||||||
{
|
{
|
||||||
|
// check if Pan is supported by the server (minimum version is 3.5.4)
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||||
// TODO the implementation of: check for version number if Pan is supported -> enable Pan controls in mixer board if version is sufficient
|
if ( QVersionNumber::compare ( QVersionNumber::fromString ( strVersion ), QVersionNumber ( 3, 5, 4 ) ) >= 0 )
|
||||||
// TEST
|
{
|
||||||
qDebug() << strVersion;
|
MainMixerBoard->SetPanIsSupported();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CClientDlg::OnChatTextReceived ( QString strChatText )
|
void CClientDlg::OnChatTextReceived ( QString strChatText )
|
||||||
|
|
|
@ -33,6 +33,9 @@
|
||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||||
|
# include <QVersionNumber>
|
||||||
|
#endif
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
@ -131,7 +134,7 @@ public slots:
|
||||||
const int iValue ) { MainMixerBoard->SetFaderLevel ( iChannelIdx,
|
const int iValue ) { MainMixerBoard->SetFaderLevel ( iChannelIdx,
|
||||||
iValue ); }
|
iValue ); }
|
||||||
|
|
||||||
void OnVersionAndOSReceived ( COSUtil::EOpSystemType eOSType,
|
void OnVersionAndOSReceived ( COSUtil::EOpSystemType ,
|
||||||
QString strVersion );
|
QString strVersion );
|
||||||
|
|
||||||
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
||||||
|
|
Loading…
Reference in a new issue