Scope
scope::gui::CScopeLEDCtrl Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Member Data Documentation

ScopeNumber<bool>* const scope::gui::CScopeLEDCtrl::scopebool
protected

pointer to underlying ScopeNumber

Definition at line 17 of file ScopeLEDCtrl.h.

boost::signals2::connection scope::gui::CScopeLEDCtrl::valueconnection
protected

The connection object for the control state (connection to the scopenum value change)

Definition at line 20 of file ScopeLEDCtrl.h.

const uint32_t scope::gui::CScopeLEDCtrl::style
protected

the LED style

  • SCOPELED_OKONTRUE: led is green/ok on true and red on false
  • SCOPELED_WARNINGONTRUE: led shows warning sign on true and green/ok on false

Definition at line 25 of file ScopeLEDCtrl.h.

CImageList scope::gui::CScopeLEDCtrl::imagegreen
staticprotected

image for green LED

Definition at line 28 of file ScopeLEDCtrl.h.

CImageList scope::gui::CScopeLEDCtrl::imagered
staticprotected

image for red LED

Definition at line 31 of file ScopeLEDCtrl.h.

CImageList scope::gui::CScopeLEDCtrl::imagewarning
staticprotected

image for warning LED

Definition at line 34 of file ScopeLEDCtrl.h.


The documentation for this class was generated from the following files: