Merge pull request #318 from fleutot/off_led_black
Make level meter LED black when off
This commit is contained in:
commit
ca94e9f878
6 changed files with 13 additions and 13 deletions
|
@ -629,8 +629,8 @@ DISTFILES += ChangeLog \
|
||||||
src/res/faderhandlesmall.png \
|
src/res/faderhandlesmall.png \
|
||||||
src/res/HLEDGreen.png \
|
src/res/HLEDGreen.png \
|
||||||
src/res/HLEDGreenSmall.png \
|
src/res/HLEDGreenSmall.png \
|
||||||
src/res/HLEDGrey.png \
|
src/res/HLEDBlack.png \
|
||||||
src/res/HLEDGreySmall.png \
|
src/res/HLEDBlackSmall.png \
|
||||||
src/res/HLEDRed.png \
|
src/res/HLEDRed.png \
|
||||||
src/res/HLEDRedSmall.png \
|
src/res/HLEDRedSmall.png \
|
||||||
src/res/HLEDYellow.png \
|
src/res/HLEDYellow.png \
|
||||||
|
|
|
@ -110,7 +110,7 @@ void CMultiColorLEDBar::Reset ( const bool bEnabled )
|
||||||
// different reset behavoiur for enabled and disabled control
|
// different reset behavoiur for enabled and disabled control
|
||||||
if ( bEnabled )
|
if ( bEnabled )
|
||||||
{
|
{
|
||||||
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_GREY );
|
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_BLACK );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -171,7 +171,7 @@ void CMultiColorLEDBar::setValue ( const double dValue )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// we use grey LED for inactive state
|
// we use grey LED for inactive state
|
||||||
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_GREY );
|
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_BLACK );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -185,7 +185,7 @@ void CMultiColorLEDBar::setValue ( const double dValue )
|
||||||
|
|
||||||
CMultiColorLEDBar::cLED::cLED ( QWidget* parent ) :
|
CMultiColorLEDBar::cLED::cLED ( QWidget* parent ) :
|
||||||
BitmCubeRoundDisabled ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDDisabledSmall.png" ) ),
|
BitmCubeRoundDisabled ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDDisabledSmall.png" ) ),
|
||||||
BitmCubeRoundGrey ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDGreySmall.png" ) ),
|
BitmCubeRoundBlack ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDBlackSmall.png" ) ),
|
||||||
BitmCubeRoundGreen ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDGreenSmall.png" ) ),
|
BitmCubeRoundGreen ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDGreenSmall.png" ) ),
|
||||||
BitmCubeRoundYellow ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDYellowSmall.png" ) ),
|
BitmCubeRoundYellow ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDYellowSmall.png" ) ),
|
||||||
BitmCubeRoundRed ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDRedSmall.png" ) )
|
BitmCubeRoundRed ( QString::fromUtf8 ( ":/png/LEDs/res/HLEDRedSmall.png" ) )
|
||||||
|
@ -194,11 +194,11 @@ CMultiColorLEDBar::cLED::cLED ( QWidget* parent ) :
|
||||||
pLEDLabel = new QLabel ( "", parent );
|
pLEDLabel = new QLabel ( "", parent );
|
||||||
|
|
||||||
// bitmap defines minimum size of the label
|
// bitmap defines minimum size of the label
|
||||||
pLEDLabel->setMinimumSize ( BitmCubeRoundGrey.width(), BitmCubeRoundGrey.height() );
|
pLEDLabel->setMinimumSize ( BitmCubeRoundBlack.width(), BitmCubeRoundBlack.height() );
|
||||||
|
|
||||||
// set initial bitmap
|
// set initial bitmap
|
||||||
pLEDLabel->setPixmap ( BitmCubeRoundGrey );
|
pLEDLabel->setPixmap ( BitmCubeRoundBlack );
|
||||||
eCurLightColor = RL_GREY;
|
eCurLightColor = RL_BLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMultiColorLEDBar::cLED::setColor ( const ELightColor eNewColor )
|
void CMultiColorLEDBar::cLED::setColor ( const ELightColor eNewColor )
|
||||||
|
@ -212,8 +212,8 @@ void CMultiColorLEDBar::cLED::setColor ( const ELightColor eNewColor )
|
||||||
pLEDLabel->setPixmap ( BitmCubeRoundDisabled );
|
pLEDLabel->setPixmap ( BitmCubeRoundDisabled );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RL_GREY:
|
case RL_BLACK:
|
||||||
pLEDLabel->setPixmap ( BitmCubeRoundGrey );
|
pLEDLabel->setPixmap ( BitmCubeRoundBlack );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RL_GREEN:
|
case RL_GREEN:
|
||||||
|
|
|
@ -66,7 +66,7 @@ protected:
|
||||||
enum ELightColor
|
enum ELightColor
|
||||||
{
|
{
|
||||||
RL_DISABLED,
|
RL_DISABLED,
|
||||||
RL_GREY,
|
RL_BLACK,
|
||||||
RL_GREEN,
|
RL_GREEN,
|
||||||
RL_YELLOW,
|
RL_YELLOW,
|
||||||
RL_RED
|
RL_RED
|
||||||
|
@ -78,7 +78,7 @@ protected:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QPixmap BitmCubeRoundDisabled;
|
QPixmap BitmCubeRoundDisabled;
|
||||||
QPixmap BitmCubeRoundGrey;
|
QPixmap BitmCubeRoundBlack;
|
||||||
QPixmap BitmCubeRoundGreen;
|
QPixmap BitmCubeRoundGreen;
|
||||||
QPixmap BitmCubeRoundYellow;
|
QPixmap BitmCubeRoundYellow;
|
||||||
QPixmap BitmCubeRoundRed;
|
QPixmap BitmCubeRoundRed;
|
||||||
|
|
BIN
src/res/HLEDBlack.png
Normal file
BIN
src/res/HLEDBlack.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
src/res/HLEDBlackSmall.png
Normal file
BIN
src/res/HLEDBlackSmall.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 405 B |
|
@ -26,7 +26,7 @@
|
||||||
<file>res/CLEDRedSmall.png</file>
|
<file>res/CLEDRedSmall.png</file>
|
||||||
<file>res/CLEDYellowSmall.png</file>
|
<file>res/CLEDYellowSmall.png</file>
|
||||||
<file>res/HLEDGreenSmall.png</file>
|
<file>res/HLEDGreenSmall.png</file>
|
||||||
<file>res/HLEDGreySmall.png</file>
|
<file>res/HLEDBlackSmall.png</file>
|
||||||
<file>res/HLEDRedSmall.png</file>
|
<file>res/HLEDRedSmall.png</file>
|
||||||
<file>res/HLEDYellowSmall.png</file>
|
<file>res/HLEDYellowSmall.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
|
Loading…
Reference in a new issue