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

View File

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

View File

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

View File

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