some renamings

This commit is contained in:
Volker Fischer 2020-06-21 22:39:15 +02:00
parent f6822d40cc
commit b27a88d6ba
4 changed files with 22 additions and 21 deletions

View file

@ -320,7 +320,7 @@ void CChannelFader::Reset()
pcbMute->setChecked ( false ); pcbMute->setChecked ( false );
pcbSolo->setChecked ( false ); pcbSolo->setChecked ( false );
pcbGroup->setChecked ( false ); pcbGroup->setChecked ( false );
plbrChannelLevel->setValue ( 0 ); plbrChannelLevel->SetValue ( 0 );
// clear instrument picture, country flag, tool tips and label text // clear instrument picture, country flag, tool tips and label text
plblLabel->setText ( "" ); plblLabel->setText ( "" );
@ -470,7 +470,7 @@ void CChannelFader::UpdateSoloState ( const bool bNewOtherSoloState )
void CChannelFader::SetChannelLevel ( const uint16_t iLevel ) void CChannelFader::SetChannelLevel ( const uint16_t iLevel )
{ {
plbrChannelLevel->setValue ( iLevel ); plbrChannelLevel->SetValue ( iLevel );
} }
void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo )

View file

@ -203,8 +203,8 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
butConnect->setText ( tr ( "C&onnect" ) ); butConnect->setText ( tr ( "C&onnect" ) );
// init input level meter bars // init input level meter bars
lbrInputLevelL->setValue ( 0 ); lbrInputLevelL->SetValue ( 0 );
lbrInputLevelR->setValue ( 0 ); lbrInputLevelR->SetValue ( 0 );
// init status LEDs // init status LEDs
ledBuffers->Reset(); ledBuffers->Reset();
@ -986,8 +986,8 @@ void CClientDlg::OnTimerSigMet()
} }
// show current level // show current level
lbrInputLevelL->setValue ( dCurSigLeveldB_L ); lbrInputLevelL->SetValue ( dCurSigLeveldB_L );
lbrInputLevelR->setValue ( dCurSigLeveldB_R ); lbrInputLevelR->SetValue ( dCurSigLeveldB_R );
} }
void CClientDlg::OnTimerBuffersLED() void CClientDlg::OnTimerBuffersLED()
@ -1118,8 +1118,8 @@ void CClientDlg::Disconnect()
// stop timer for level meter bars and reset them // stop timer for level meter bars and reset them
TimerSigMet.stop(); TimerSigMet.stop();
lbrInputLevelL->setValue ( 0 ); lbrInputLevelL->SetValue ( 0 );
lbrInputLevelR->setValue ( 0 ); lbrInputLevelR->SetValue ( 0 );
// stop other timers // stop other timers
TimerBuffersLED.stop(); TimerBuffersLED.stop();

View file

@ -58,21 +58,21 @@ CLevelMeter::CLevelMeter ( QWidget* parent, Qt::WindowFlags f ) :
} }
// initialize bar meter // initialize bar meter
pProgressBar = new QProgressBar(); pBarMeter = new QProgressBar();
pProgressBar->setOrientation ( Qt::Vertical ); pBarMeter->setOrientation ( Qt::Vertical );
pProgressBar->setRange ( 0, 100 * NUM_STEPS_LED_BAR ); pBarMeter->setRange ( 0, 100 * NUM_STEPS_LED_BAR );
pProgressBar->setFormat ( "" ); // suppress percent numbers pBarMeter->setFormat ( "" ); // suppress percent numbers
// setup stacked layout for meter type switching mechanism // setup stacked layout for meter type switching mechanism
pStackedLayout = new QStackedLayout ( this ); pStackedLayout = new QStackedLayout ( this );
pStackedLayout->addWidget ( pLEDMeter ); pStackedLayout->addWidget ( pLEDMeter );
pStackedLayout->addWidget ( pProgressBar ); pStackedLayout->addWidget ( pBarMeter );
// according to QScrollArea description: "When using a scroll area to display the // according to QScrollArea description: "When using a scroll area to display the
// contents of a custom widget, it is important to ensure that the size hint of // contents of a custom widget, it is important to ensure that the size hint of
// the child widget is set to a suitable value." // the child widget is set to a suitable value."
pProgressBar->setMinimumSize ( QSize ( 1, 1 ) ); pBarMeter->setMinimumSize ( QSize ( 1, 1 ) );
pLEDMeter->setMinimumSize ( QSize ( 1, 1 ) ); pLEDMeter->setMinimumSize ( QSize ( 1, 1 ) );
// update the meter type (using the default value of the meter type) // update the meter type (using the default value of the meter type)
SetLevelMeterType ( eLevelMeterType ); SetLevelMeterType ( eLevelMeterType );
@ -126,7 +126,7 @@ void CLevelMeter::SetLevelMeterType ( const ELevelMeterType eNType )
case MT_BAR: case MT_BAR:
pStackedLayout->setCurrentIndex ( 1 ); pStackedLayout->setCurrentIndex ( 1 );
pProgressBar->setStyleSheet ( pBarMeter->setStyleSheet (
"QProgressBar { margin: 1px;" "QProgressBar { margin: 1px;"
" padding: 1px; " " padding: 1px; "
" width: 15px; }" " width: 15px; }"
@ -141,7 +141,7 @@ void CLevelMeter::SetLevelMeterType ( const ELevelMeterType eNType )
} }
pStackedLayout->setCurrentIndex ( 1 ); pStackedLayout->setCurrentIndex ( 1 );
pProgressBar->setStyleSheet ( pBarMeter->setStyleSheet (
"QProgressBar { border: 0px;" "QProgressBar { border: 0px;"
" margin: 0px;" " margin: 0px;"
" padding: 0px; " " padding: 0px; "
@ -151,7 +151,7 @@ void CLevelMeter::SetLevelMeterType ( const ELevelMeterType eNType )
} }
} }
void CLevelMeter::setValue ( const double dValue ) void CLevelMeter::SetValue ( const double dValue )
{ {
if ( this->isEnabled() ) if ( this->isEnabled() )
{ {
@ -194,7 +194,7 @@ void CLevelMeter::setValue ( const double dValue )
case MT_BAR: case MT_BAR:
case MT_SLIM_BAR: case MT_SLIM_BAR:
pProgressBar->setValue ( 100 * dValue ); pBarMeter->setValue ( 100 * dValue );
break; break;
} }
} }
@ -222,6 +222,7 @@ void CLevelMeter::cLED::setColor ( const ELightColor eNewColor )
switch ( eNewColor ) switch ( eNewColor )
{ {
case RL_DISABLED: case RL_DISABLED:
// note that this is required for the compact channel mode
pLEDLabel->setPixmap ( QPixmap() ); pLEDLabel->setPixmap ( QPixmap() );
break; break;

View file

@ -50,7 +50,7 @@ public:
CLevelMeter ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr ); CLevelMeter ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr );
virtual ~CLevelMeter(); virtual ~CLevelMeter();
void setValue ( const double dValue ); void SetValue ( const double dValue );
void SetLevelMeterType ( const ELevelMeterType eNType ); void SetLevelMeterType ( const ELevelMeterType eNType );
protected: protected:
@ -86,5 +86,5 @@ protected:
QStackedLayout* pStackedLayout; QStackedLayout* pStackedLayout;
ELevelMeterType eLevelMeterType; ELevelMeterType eLevelMeterType;
CVector<cLED*> vecpLEDs; CVector<cLED*> vecpLEDs;
QProgressBar* pProgressBar; QProgressBar* pBarMeter;
}; };