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

@ -36,7 +36,7 @@ CChannelFader::CChannelFader ( QWidget* pNW )
pFrame = new QFrame ( pNW );
pLevelsBox = new QWidget ( pFrame );
plbrChannelLevel = new CMultiColorLEDBar ( pLevelsBox );
plbrChannelLevel = new CLevelMeter ( pLevelsBox );
pFader = new QSlider ( Qt::Vertical, pLevelsBox );
pPan = new QDial ( pLevelsBox );
pPanLabel = new QLabel ( tr ( "Pan" ), pLevelsBox );
@ -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

@ -91,7 +91,7 @@ protected:
QWidget* pLevelsBox;
QWidget* pMuteSoloBox;
CMultiColorLEDBar* plbrChannelLevel;
CLevelMeter* plbrChannelLevel;
QSlider* pFader;
QDial* pPan;
QLabel* pPanLabel;

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