trikRuntime
trikGui::DigitSelector Class Reference

Widget that allows to select one digit by Up/Down keys and can switch states between editing and inactive (where Up and Down keys are ignored). More...

#include <digitSelector.h>

Inheritance diagram for trikGui::DigitSelector:
Collaboration diagram for trikGui::DigitSelector:

Signals

void valueChanged (int newValue)
 Digit is changed by user. More...
 
void upPressed ()
 Widget is not in editing mode and user pressed "up". More...
 
void downPressed ()
 Widget is not in editing mode and user pressed "down". More...
 

Public Member Functions

 DigitSelector (bool &editingMode, int height)
 Constructor. More...
 

Protected Member Functions

void keyPressEvent (QKeyEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 

Detailed Description

Widget that allows to select one digit by Up/Down keys and can switch states between editing and inactive (where Up and Down keys are ignored).

Constructor & Destructor Documentation

DigitSelector::DigitSelector ( bool &  editingMode,
int  height 
)

Constructor.

Parameters
editingMode- reference to mode flag. If this flag is true, number is currently edited and shall be increased/decreased by up/down buttons.
height- height of a digit.

Member Function Documentation

void trikGui::DigitSelector::downPressed ( )
signal

Widget is not in editing mode and user pressed "down".

Event propagation to parent widget does not work for some reason in this case.

void DigitSelector::keyPressEvent ( QKeyEvent *  event)
overrideprotected
void DigitSelector::paintEvent ( QPaintEvent *  event)
overrideprotected
void trikGui::DigitSelector::upPressed ( )
signal

Widget is not in editing mode and user pressed "up".

Event propagation to parent widget does not work for some reason in this case.

void trikGui::DigitSelector::valueChanged ( int  newValue)
signal

Digit is changed by user.


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