6#include "../LockState.h"
28 const int& numberOfColumns,
29 const int& numberOfRows)
30 : lcd::MenuView(
display,
"SelectDisplayTimeLeft",
encoder,
"Display time left?", numberOfColumns, numberOfRows) {}
50 if (menuItems.empty()) {
52 createMenuItem(
"Yes", [
this](MenuItem*) {
60 createMenuItem(
"No", [
this](MenuItem*) {
68 createMenuItem(
"Temperature", [
this](MenuItem*) {
76 createMenuItem(
"Cancel", [
this](MenuItem*) {
81 lcd::MenuView::activate();
static void setStartDate(const time_t &startDate)
Set the Start Date.
Definition: LockState.h:311
static void setEndDate(const time_t &endDate)
Set the End Date.
Definition: LockState.h:334
static void setTemperatureString(const String &temperatureString)
Set the temperature string.
Definition: LockState.h:380
static const time_t & getCachedEndDate()
Get the Cached End Date.
Definition: LockState.h:394
static void setMode(const Mode &mode)
Set the mode.
Definition: LockState.h:242
static void setDisplayTimeLeft(const DisplayTimeLeft &displayTimeLeft)
Set how the time left should be displayed.
Definition: LockState.h:288
selection menu if the time passed should be displayed or not
Definition: SelectDisplayTimeLeft.h:16
SelectDisplayTimeLeft(SelectDisplayTimeLeft &&other) noexcept=delete
Move constructor - not available otherwise we get problems with the callbacks.
SelectDisplayTimeLeft(const SelectDisplayTimeLeft &other)=delete
Copy constructor - not available.
SelectDisplayTimeLeft(LiquidCrystal_PCF8574 *display, RotaryEncoder *encoder, const int &numberOfColumns, const int &numberOfRows)
Construct a new menu object.
Definition: SelectDisplayTimeLeft.h:26
virtual void activate()
called as soon as the view becomes active
Definition: SelectDisplayTimeLeft.h:48
static bool activateView(const ViewId &id)
activates the view described by the id
Definition: ViewStore.h:98
@ UnlockedMainMenu
Definition: ViewStore.h:37
views::ConfigurationServerView configurationServerView & display
Definition: main.cpp:57
RotaryEncoder encoder(ENCODER_PIN_CLK, ENCODER_PIN_DT, ENCODER_SWITCH)
Definition: ConfigurationServerView.h:10