EmlaLockSafe
views::SetTimerView Class Reference

View used to set a manual timer without EmlaLock in the background. More...

#include <SetTimerView.h>

Inheritance diagram for views::SetTimerView:

Public Member Functions

 SetTimerView (LiquidCrystal_PCF8574 *display, RotaryEncoder *encoder, const int &numberOfColumns, const int &numberOfRows)
 Construct the new set timer view. More...
 
 SetTimerView (const SetTimerView &other)=delete
 Copy constructor - not available. More...
 
 SetTimerView (SetTimerView &&other) noexcept=delete
 Move constructor - not available. More...
 
virtual void tick (const bool &forceRedraw)
 called during the loop function More...
 

Protected Member Functions

virtual void activate ()
 called as soon as the view becomes active More...
 
void handleEncoderRotation (bool &redraw)
 handles if the encoder was rotated More...
 
bool handleEncoderClick (bool &redraw)
 handles if the encoder was rotated More...
 

Protected Attributes

RotaryEncoder * encoder
 pointer to the encoder instance More...
 
const int numberOfColumns
 Number of display-columns. More...
 
const int numberOfRows
 Number of display-rows. More...
 
uint8_t numberOfDays
 current selection of the number of days More...
 
uint8_t numberOfHours
 current selection of the number of hours More...
 
uint8_t numberOfMinutes
 current selection of the number of minutes More...
 
uint8_t editIndex
 selection what field can be changed: More...
 

Detailed Description

View used to set a manual timer without EmlaLock in the background.

Constructor & Destructor Documentation

◆ SetTimerView() [1/3]

views::SetTimerView::SetTimerView ( LiquidCrystal_PCF8574 *  display,
RotaryEncoder *  encoder,
const int &  numberOfColumns,
const int &  numberOfRows 
)
inline

Construct the new set timer view.

Parameters
displaypointer to the LCD instance
encoderpointer to the encoder instance
numberOfColumnsnumber of display-columns
numberOfRowsnumber of display-rows

◆ SetTimerView() [2/3]

views::SetTimerView::SetTimerView ( const SetTimerView other)
delete

Copy constructor - not available.

◆ SetTimerView() [3/3]

views::SetTimerView::SetTimerView ( SetTimerView &&  other)
deletenoexcept

Move constructor - not available.

Member Function Documentation

◆ activate()

virtual void views::SetTimerView::activate ( )
inlineprotectedvirtual

called as soon as the view becomes active

◆ handleEncoderClick()

bool views::SetTimerView::handleEncoderClick ( bool &  redraw)
inlineprotected

handles if the encoder was rotated

Parameters
[in,out]redrawtrue if the content of the display must be redraw
Returns
false if the current tick should be immediately skipped

◆ handleEncoderRotation()

void views::SetTimerView::handleEncoderRotation ( bool &  redraw)
inlineprotected

handles if the encoder was rotated

Parameters
[in,out]redrawtrue if the content of the display must be redraw

◆ tick()

virtual void views::SetTimerView::tick ( const bool &  forceRedraw)
inlinevirtual

called during the loop function

Parameters
forceRedrawif true everything should be redrawn

Member Data Documentation

◆ editIndex

uint8_t views::SetTimerView::editIndex
protected

selection what field can be changed:

0: number of days 1: number of hours 2: number of minutes

◆ encoder

RotaryEncoder* views::SetTimerView::encoder
protected

pointer to the encoder instance

◆ numberOfColumns

const int views::SetTimerView::numberOfColumns
protected

Number of display-columns.

◆ numberOfDays

uint8_t views::SetTimerView::numberOfDays
protected

current selection of the number of days

◆ numberOfHours

uint8_t views::SetTimerView::numberOfHours
protected

current selection of the number of hours

◆ numberOfMinutes

uint8_t views::SetTimerView::numberOfMinutes
protected

current selection of the number of minutes

◆ numberOfRows

const int views::SetTimerView::numberOfRows
protected

Number of display-rows.


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