diff --git a/src/llconclientdlgbase.ui b/src/llconclientdlgbase.ui index c566c240..6ba8d552 100755 --- a/src/llconclientdlgbase.ui +++ b/src/llconclientdlgbase.ui @@ -286,6 +286,14 @@ + + + 0 + 0 + 0 + 0 + + 13 diff --git a/src/multicolorled.cpp b/src/multicolorled.cpp index 9e4b4edd..9f177c46 100755 --- a/src/multicolorled.cpp +++ b/src/multicolorled.cpp @@ -1,5 +1,5 @@ /******************************************************************************\ - * Copyright (c) 2004-2006 + * Copyright (c) 2004-2008 * * Author(s): * Volker Fischer @@ -37,23 +37,23 @@ CMultiColorLEDbase::CMultiColorLEDbase ( QWidget* parent, Qt::WindowFlags f ) BitmCubeGrey ( LED_WIDTH_HEIGHT_SIZE_PIXEL, LED_WIDTH_HEIGHT_SIZE_PIXEL ), BitmCubeYellow ( LED_WIDTH_HEIGHT_SIZE_PIXEL, LED_WIDTH_HEIGHT_SIZE_PIXEL ) { - /* Create bitmaps */ - BitmCubeGreen.fill ( QColor ( 0, 255, 0 ) ); - BitmCubeRed.fill ( QColor ( 255, 0, 0 ) ); - BitmCubeGrey.fill ( QColor ( 192, 192, 192 ) ); + // create bitmaps + BitmCubeGreen.fill ( QColor ( 0, 255, 0 ) ); + BitmCubeRed.fill ( QColor ( 255, 0, 0 ) ); + BitmCubeGrey.fill ( QColor ( 192, 192, 192 ) ); BitmCubeYellow.fill ( QColor ( 255, 255, 0 ) ); - /* Init color flags */ + // init color flags Reset(); - /* Set init-bitmap */ + // set init bitmap SetPixmap ( BitmCubeGrey ); eColorFlag = RL_GREY; - /* Init update time */ + // init update time iUpdateTime = DEFAULT_UPDATE_TIME; - /* Connect timer events to the desired slots */ + // connect timer events to the desired slots connect ( &TimerRedLight, SIGNAL ( timeout() ), this, SLOT ( OnTimerRedLight() ) ); connect ( &TimerGreenLight, SIGNAL ( timeout() ), @@ -64,9 +64,9 @@ CMultiColorLEDbase::CMultiColorLEDbase ( QWidget* parent, Qt::WindowFlags f ) void CMultiColorLEDbase::Reset() { - /* Reset color flags */ - bFlagRedLi = false; - bFlagGreenLi = false; + // reset color flags + bFlagRedLi = false; + bFlagGreenLi = false; bFlagYellowLi = false; UpdateColor(); @@ -125,7 +125,7 @@ void CMultiColorLEDbase::UpdateColor() return; } - /* If no color is active, set control to grey light */ + // if no color is active, set control to grey light if ( eColorFlag != RL_GREY ) { SetPixmap ( BitmCubeGrey ); @@ -133,24 +133,24 @@ void CMultiColorLEDbase::UpdateColor() } } -void CMultiColorLEDbase::SetLight ( int iNewStatus ) +void CMultiColorLEDbase::SetLight ( const int iNewStatus ) { switch ( iNewStatus ) { case MUL_COL_LED_GREEN: - // Green light + // green light bFlagGreenLi = true; TimerGreenLight.setInterval ( iUpdateTime ); break; case MUL_COL_LED_YELLOW: - // Yellow light + // yellow light bFlagYellowLi = true; TimerYellowLight.setInterval ( iUpdateTime ); break; case MUL_COL_LED_RED: - // Red light + // red light bFlagRedLi = true; TimerRedLight.setInterval ( iUpdateTime ); break; @@ -159,9 +159,9 @@ void CMultiColorLEDbase::SetLight ( int iNewStatus ) UpdateColor(); } -void CMultiColorLEDbase::SetUpdateTime ( int iNUTi ) +void CMultiColorLEDbase::SetUpdateTime ( const int iNUTi ) { - /* Avoid too short intervals */ + // avoid too short intervals if ( iNUTi < MIN_TIME_FOR_RED_LIGHT ) { iUpdateTime = MIN_TIME_FOR_RED_LIGHT; @@ -177,7 +177,7 @@ CMultiColorLED::CMultiColorLED ( QWidget* parent, Qt::WindowFlags f ) : CMultiColorLEDbase ( parent, f ) { // set modified style - setFrameShape ( QFrame::Panel ); + setFrameShape ( QFrame::Panel ); setFrameShadow ( QFrame::Sunken ); - setIndent ( 0 ); + setIndent ( 0 ); } diff --git a/src/multicolorled.h b/src/multicolorled.h index 4efb02a6..e927c28a 100755 --- a/src/multicolorled.h +++ b/src/multicolorled.h @@ -57,14 +57,14 @@ public: CMultiColorLEDbase ( QWidget* parent = 0, Qt::WindowFlags f = 0 ); void Reset(); - void SetUpdateTime ( int iNUTi ); - void SetLight ( int iNewStatus ); + void SetUpdateTime ( const int iNUTi ); + void SetLight ( const int iNewStatus ); protected: enum ELightColor { RL_GREY, RL_RED, RL_GREEN, RL_YELLOW }; ELightColor eColorFlag; - virtual void SetPixmap ( QPixmap& NewBitmap ) {} // must be implemented in derived class! + virtual void SetPixmap ( QPixmap& NewBitmap ) {} // must be implemented in derived class void UpdateColor(); QPixmap BitmCubeGreen;