Scope
|
#include <ScopeLEDCtrl.h>
Inherits CBitmapButtonImpl< CScopeLEDCtrl >.
Public Member Functions | |
CScopeLEDCtrl (ScopeNumber< bool > *_scopebool, const uint32_t &_style=SCOPELED_WARNINGONTRUE) | |
~CScopeLEDCtrl () | |
void | UpdateControl () |
void | SetTrue () |
void | SetFalse () |
void | DoPaint (CDCHandle dc) |
bool | AttachToDlgItem (HWND hWnd) |
Protected Attributes | |
ScopeNumber< bool > *const | scopebool |
boost::signals2::connection | valueconnection |
const uint32_t | style |
Static Protected Attributes | |
static CImageList | imagegreen |
static CImageList | imagered |
static CImageList | imagewarning |
An adapted CBitmapButton control around a ScopeNumber<bool> to show true or false as green or red LED.
Definition at line 12 of file ScopeLEDCtrl.h.
scope::gui::CScopeLEDCtrl::CScopeLEDCtrl | ( | ScopeNumber< bool > * | _scopebool, |
const uint32_t & | _style = SCOPELED_WARNINGONTRUE |
||
) |
Gets a pointer to the ScopeNumber<bool> and connects.
Definition at line 14 of file ScopeLEDCtrl.cpp.
scope::gui::CScopeLEDCtrl::~CScopeLEDCtrl | ( | ) |
Disconnects.
Definition at line 39 of file ScopeLEDCtrl.cpp.
void scope::gui::CScopeLEDCtrl::UpdateControl | ( | ) |
Sets LED according to value of scopebool.
Definition at line 43 of file ScopeLEDCtrl.cpp.
void scope::gui::CScopeLEDCtrl::SetTrue | ( | ) |
Sets LED to true.
Definition at line 66 of file ScopeLEDCtrl.cpp.
void scope::gui::CScopeLEDCtrl::SetFalse | ( | ) |
Sets LED to false.
Definition at line 77 of file ScopeLEDCtrl.cpp.
void scope::gui::CScopeLEDCtrl::DoPaint | ( | CDCHandle | dc | ) |
override of CBitmapButtonImpl DoPaint() in CBmpBtn class to erase background (otherwise weird overlay of icons)
Definition at line 58 of file ScopeLEDCtrl.cpp.
bool scope::gui::CScopeLEDCtrl::AttachToDlgItem | ( | HWND | hWnd | ) |
Attach the control to a dialog item.
Definition at line 50 of file ScopeLEDCtrl.cpp.
|
protected |
pointer to underlying ScopeNumber
Definition at line 17 of file ScopeLEDCtrl.h.
|
protected |
The connection object for the control state (connection to the scopenum value change)
Definition at line 20 of file ScopeLEDCtrl.h.
|
protected |
the LED style
Definition at line 25 of file ScopeLEDCtrl.h.
|
staticprotected |
image for green LED
Definition at line 28 of file ScopeLEDCtrl.h.
|
staticprotected |
image for red LED
Definition at line 31 of file ScopeLEDCtrl.h.
|
staticprotected |
image for warning LED
Definition at line 34 of file ScopeLEDCtrl.h.