CMultiColorLEDBar -> CLevelMeter

This commit is contained in:
Volker Fischer 2020-06-21 20:09:13 +02:00
parent b082fde2e7
commit 50ce30f236
8 changed files with 66 additions and 66 deletions

View File

@ -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;
}
}

View File

@ -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 ); }

View File

@ -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;
}

View File

@ -240,7 +240,7 @@
<item>
<layout class="QHBoxLayout">
<item>
<widget class="CMultiColorLEDBar" name="lbrInputLevelL" native="true">
<widget class="CLevelMeter" name="lbrInputLevelL" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -256,7 +256,7 @@
</widget>
</item>
<item>
<widget class="CMultiColorLEDBar" name="lbrInputLevelR" native="true">
<widget class="CLevelMeter" name="lbrInputLevelR" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -574,7 +574,7 @@
<header>audiomixerboard.h</header>
</customwidget>
<customwidget>
<class>CMultiColorLEDBar</class>
<class>CLevelMeter</class>
<extends>QWidget</extends>
<header>levelmeter.h</header>
<container>1</container>

View File

@ -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

View File

@ -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 )

View File

@ -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 );

View File

@ -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