diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 2e92884b..47e04c79 100755 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -33,32 +33,32 @@ CChannelFader::CChannelFader ( QWidget* pNW ) // create new GUI control objects and store pointers to them (note that // QWidget takes the ownership of the pMainGrid so that this only has // to be created locally in this constructor) - pFrame = new QFrame ( pNW ); + pFrame = new QFrame ( pNW ); - pLevelsBox = new QWidget ( pFrame ); - plbrChannelLevel = new CMultiColorLEDBar ( pLevelsBox ); - pFader = new QSlider ( Qt::Vertical, pLevelsBox ); - pPan = new QDial ( pLevelsBox ); - pPanLabel = new QLabel ( tr ( "Pan" ), pLevelsBox ); - pInfoLabel = new QLabel ( "", pLevelsBox ); + pLevelsBox = new QWidget ( pFrame ); + plbrChannelLevel = new CLevelMeter ( pLevelsBox ); + pFader = new QSlider ( Qt::Vertical, pLevelsBox ); + pPan = new QDial ( pLevelsBox ); + pPanLabel = new QLabel ( tr ( "Pan" ), pLevelsBox ); + pInfoLabel = new QLabel ( "", pLevelsBox ); - pMuteSoloBox = new QWidget ( pFrame ); - pcbMute = new QCheckBox ( tr ( "Mute" ), pMuteSoloBox ); - pcbSolo = new QCheckBox ( tr ( "Solo" ), pMuteSoloBox ); - pcbGroup = new QCheckBox ( tr ( "Grp" ), pMuteSoloBox ); + pMuteSoloBox = new QWidget ( pFrame ); + pcbMute = new QCheckBox ( tr ( "Mute" ), pMuteSoloBox ); + pcbSolo = new QCheckBox ( tr ( "Solo" ), pMuteSoloBox ); + pcbGroup = new QCheckBox ( tr ( "Grp" ), pMuteSoloBox ); - pLabelInstBox = new QGroupBox ( pFrame ); - plblLabel = new QLabel ( "", pFrame ); - plblInstrument = new QLabel ( pFrame ); - plblCountryFlag = new QLabel ( pFrame ); + pLabelInstBox = new QGroupBox ( pFrame ); + plblLabel = new QLabel ( "", pFrame ); + plblInstrument = new QLabel ( pFrame ); + plblCountryFlag = new QLabel ( pFrame ); - QVBoxLayout* pMainGrid = new QVBoxLayout ( pFrame ); - QHBoxLayout* pLevelsGrid = new QHBoxLayout ( pLevelsBox ); - QVBoxLayout* pMuteSoloGrid = new QVBoxLayout ( pMuteSoloBox ); - pLabelGrid = new QHBoxLayout ( pLabelInstBox ); - pLabelPictGrid = new QVBoxLayout ( ); - QVBoxLayout* pPanGrid = new QVBoxLayout ( ); - QHBoxLayout* pPanInfoGrid = new QHBoxLayout ( ); + QVBoxLayout* pMainGrid = new QVBoxLayout ( pFrame ); + QHBoxLayout* pLevelsGrid = new QHBoxLayout ( pLevelsBox ); + QVBoxLayout* pMuteSoloGrid = new QVBoxLayout ( pMuteSoloBox ); + pLabelGrid = new QHBoxLayout ( pLabelInstBox ); + pLabelPictGrid = new QVBoxLayout ( ); + QVBoxLayout* pPanGrid = new QVBoxLayout ( ); + QHBoxLayout* pPanInfoGrid = new QHBoxLayout ( ); // setup channel level plbrChannelLevel->setContentsMargins ( 0, 3, 2, 3 ); @@ -211,7 +211,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign ) pcbMute->setText ( tr ( "MUTE" ) ); pcbSolo->setText ( tr ( "SOLO" ) ); pcbGroup->setText ( tr ( "GRP" ) ); - plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_LED ); + plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_LED ); break; case GD_SLIMFADER: @@ -225,7 +225,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign ) pcbMute->setText ( tr ( "M" ) ); pcbSolo->setText ( tr ( "S" ) ); pcbGroup->setText ( tr ( "G" ) ); - plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_SLIM_BAR ); + plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_SLIM_BAR ); break; default: @@ -240,7 +240,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign ) pcbMute->setText ( tr ( "Mute" ) ); pcbSolo->setText ( tr ( "Solo" ) ); pcbGroup->setText ( tr ( "Grp" ) ); - plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_BAR ); + plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_BAR ); break; } } diff --git a/src/audiomixerboard.h b/src/audiomixerboard.h index ae28db57..266de18c 100755 --- a/src/audiomixerboard.h +++ b/src/audiomixerboard.h @@ -87,32 +87,32 @@ protected: void SendFaderLevelToServer ( const int iLevel, const bool bIsGroupUpdate ); - QFrame* pFrame; + QFrame* pFrame; - QWidget* pLevelsBox; - QWidget* pMuteSoloBox; - CMultiColorLEDBar* plbrChannelLevel; - QSlider* pFader; - QDial* pPan; - QLabel* pPanLabel; - QLabel* pInfoLabel; - QHBoxLayout* pLabelGrid; - QVBoxLayout* pLabelPictGrid; + QWidget* pLevelsBox; + QWidget* pMuteSoloBox; + CLevelMeter* plbrChannelLevel; + QSlider* pFader; + QDial* pPan; + QLabel* pPanLabel; + QLabel* pInfoLabel; + QHBoxLayout* pLabelGrid; + QVBoxLayout* pLabelPictGrid; - QCheckBox* pcbMute; - QCheckBox* pcbSolo; - QCheckBox* pcbGroup; + QCheckBox* pcbMute; + QCheckBox* pcbSolo; + QCheckBox* pcbGroup; - QGroupBox* pLabelInstBox; - QLabel* plblLabel; - QLabel* plblInstrument; - QLabel* plblCountryFlag; + QGroupBox* pLabelInstBox; + QLabel* plblLabel; + QLabel* plblInstrument; + QLabel* plblCountryFlag; - CChannelInfo cReceivedChanInfo; + CChannelInfo cReceivedChanInfo; - bool bOtherChannelIsSolo; - bool bIsMyOwnFader; - int iPreviousFaderLevel; + bool bOtherChannelIsSolo; + bool bIsMyOwnFader; + int iPreviousFaderLevel; public slots: void OnLevelValueChanged ( int value ) { SendFaderLevelToServer ( value, false ); } diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 9c73e8e5..0a2d3a97 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -1212,8 +1212,8 @@ rbtReverbSelR->setStyleSheet ( "color: rgb(220, 220, 220);" "font: bold;" ); #endif - lbrInputLevelL->SetLevelMeterType ( CMultiColorLEDBar::MT_LED ); - lbrInputLevelR->SetLevelMeterType ( CMultiColorLEDBar::MT_LED ); + lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_LED ); + lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_LED ); break; default: @@ -1226,8 +1226,8 @@ rbtReverbSelL->setStyleSheet ( "" ); rbtReverbSelR->setStyleSheet ( "" ); #endif - lbrInputLevelL->SetLevelMeterType ( CMultiColorLEDBar::MT_BAR ); - lbrInputLevelR->SetLevelMeterType ( CMultiColorLEDBar::MT_BAR ); + lbrInputLevelL->SetLevelMeterType ( CLevelMeter::MT_BAR ); + lbrInputLevelR->SetLevelMeterType ( CLevelMeter::MT_BAR ); break; } diff --git a/src/clientdlgbase.ui b/src/clientdlgbase.ui index 25a79fcd..0bb9c8e8 100755 --- a/src/clientdlgbase.ui +++ b/src/clientdlgbase.ui @@ -240,7 +240,7 @@ - + 0 @@ -256,7 +256,7 @@ - + 0 @@ -574,7 +574,7 @@
audiomixerboard.h
- CMultiColorLEDBar + CLevelMeter QWidget
levelmeter.h
1 diff --git a/src/global.h b/src/global.h index 22b9bb90..4a09bc95 100755 --- a/src/global.h +++ b/src/global.h @@ -171,7 +171,7 @@ LED bar: lbr #define LOW_BOUND_SIG_METER ( -50.0 ) // dB #define UPPER_BOUND_SIG_METER ( 0.0 ) // dB -// defines for LED level meter CMultiColorLEDBar +// defines for LED level meter CLevelMeter #define NUM_STEPS_LED_BAR 8 #define RED_BOUND_LED_BAR 7 #define YELLOW_BOUND_LED_BAR 5 diff --git a/src/levelmeter.cpp b/src/levelmeter.cpp index b399d93c..36a1e08b 100755 --- a/src/levelmeter.cpp +++ b/src/levelmeter.cpp @@ -29,7 +29,7 @@ /* Implementation *************************************************************/ -CMultiColorLEDBar::CMultiColorLEDBar ( QWidget* parent, Qt::WindowFlags f ) : +CLevelMeter::CLevelMeter ( QWidget* parent, Qt::WindowFlags f ) : QWidget ( parent, f ), eLevelMeterType ( MT_BAR ) { @@ -78,7 +78,7 @@ CMultiColorLEDBar::CMultiColorLEDBar ( QWidget* parent, Qt::WindowFlags f ) : SetLevelMeterType ( eLevelMeterType ); } -CMultiColorLEDBar::~CMultiColorLEDBar() +CLevelMeter::~CLevelMeter() { // clean up the LED objects for ( int iLEDIdx = 0; iLEDIdx < NUM_STEPS_LED_BAR; iLEDIdx++ ) @@ -87,7 +87,7 @@ CMultiColorLEDBar::~CMultiColorLEDBar() } } -void CMultiColorLEDBar::changeEvent ( QEvent* curEvent ) +void CLevelMeter::changeEvent ( QEvent* curEvent ) { // act on enabled changed state if ( curEvent->type() == QEvent::EnabledChange ) @@ -97,7 +97,7 @@ void CMultiColorLEDBar::changeEvent ( QEvent* curEvent ) } } -void CMultiColorLEDBar::Reset ( const bool bEnabled ) +void CLevelMeter::Reset ( const bool bEnabled ) { // update state of all LEDs for ( int iLEDIdx = 0; iLEDIdx < NUM_STEPS_LED_BAR; iLEDIdx++ ) @@ -114,7 +114,7 @@ void CMultiColorLEDBar::Reset ( const bool bEnabled ) } } -void CMultiColorLEDBar::SetLevelMeterType ( const ELevelMeterType eNType ) +void CLevelMeter::SetLevelMeterType ( const ELevelMeterType eNType ) { eLevelMeterType = eNType; @@ -151,7 +151,7 @@ void CMultiColorLEDBar::SetLevelMeterType ( const ELevelMeterType eNType ) } } -void CMultiColorLEDBar::setValue ( const double dValue ) +void CLevelMeter::setValue ( const double dValue ) { if ( this->isEnabled() ) { @@ -200,7 +200,7 @@ void CMultiColorLEDBar::setValue ( const double dValue ) } } -CMultiColorLEDBar::cLED::cLED ( QWidget* parent ) : +CLevelMeter::cLED::cLED ( QWidget* parent ) : BitmCubeRoundBlack ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDBlackSmall.png" ) ), BitmCubeRoundGreen ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDGreenSmall.png" ) ), BitmCubeRoundYellow ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDYellowSmall.png" ) ), @@ -214,7 +214,7 @@ CMultiColorLEDBar::cLED::cLED ( QWidget* parent ) : eCurLightColor = RL_BLACK; } -void CMultiColorLEDBar::cLED::setColor ( const ELightColor eNewColor ) +void CLevelMeter::cLED::setColor ( const ELightColor eNewColor ) { // only update LED if color has changed if ( eNewColor != eCurLightColor ) diff --git a/src/levelmeter.h b/src/levelmeter.h index d22d0f09..bcb4810f 100755 --- a/src/levelmeter.h +++ b/src/levelmeter.h @@ -35,7 +35,7 @@ /* Classes ********************************************************************/ -class CMultiColorLEDBar : public QWidget +class CLevelMeter : public QWidget { Q_OBJECT @@ -47,8 +47,8 @@ public: MT_SLIM_BAR }; - CMultiColorLEDBar ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr ); - virtual ~CMultiColorLEDBar(); + CLevelMeter ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr ); + virtual ~CLevelMeter(); void setValue ( const double dValue ); void SetLevelMeterType ( const ELevelMeterType eNType ); diff --git a/src/protocol.cpp b/src/protocol.cpp index 61be0026..145d5afc 100755 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -358,7 +358,7 @@ CONNECTION LESS MESSAGES n is number of connected clients the values are the maximum channel levels for a client frame converted - to the range of CMultiColorLEDBar in 4 bits, two entries per byte + to the range of CLevelMeter in 4 bits, two entries per byte with the earlier channel in the lower half of the byte where an odd number of clients is connected, there will be four unused