DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
Loading...
Searching...
No Matches
/home/runner/work/DCCEXSimpleThrottle/DCCEXSimpleThrottle/ProgressScreen.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 * © 2023 Peter Cole
4 *
5 * This is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * It is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this code. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#ifndef PROGRESSSCREEN_H
20#define PROGRESSSCREEN_H
21
22#include "ScreenInterface.h"
23
25public:
28
32
38 void handleUserSelectionAction(UserSelectionAction action, bool throttleInverted = false) override;
39
42 void drawScreen(DisplayInterface *display) override;
43
46 void setActivity(const char *activity);
47
50 void setCounter(uint8_t counter);
51
52private:
53 const char *_activity;
54 uint8_t _counter;
55};
56
57#endif // PROGRESSSCREEN_H
UserConfirmationAction
User confirmation action data types available.
Definition UserConfirmationInterface.h:23
UserSelectionAction
User selection action data types available.
Definition UserSelectionInterface.h:23
Interface class to abstract construction of what is displayed on screen from the physical implementat...
Definition DisplayInterface.h:29
Definition ProgressScreen.h:24
const char * _activity
Definition ProgressScreen.h:53
ProgressScreen()
Constructor for the progress screen.
Definition ProgressScreen.cpp:21
void setCounter(uint8_t counter)
Set the current attempt in progress.
Definition ProgressScreen.cpp:34
uint8_t _counter
Definition ProgressScreen.h:54
void drawScreen(DisplayInterface *display) override
Implement this method to draw the associated screen object on the specified display.
Definition ProgressScreen.cpp:30
void setActivity(const char *activity)
Set the current activity in progress.
Definition ProgressScreen.cpp:32
void handleUserConfirmationAction(UserConfirmationAction action) override
Implement this method to define what to do when user confirmation actions are performed.
Definition ProgressScreen.cpp:26
void handleUserSelectionAction(UserSelectionAction action, bool throttleInverted=false) override
Implement this method to define what to do when user selection actions are performed throttleInverted...
Definition ProgressScreen.cpp:28
Definition ScreenInterface.h:27