12 #ifndef SETTINGS_SCENE_H
13 #define SETTINGS_SCENE_H
136 int m_flashcard_limit;
138 int m_study_duration_mins;
140 std::chrono::steady_clock::time_point m_session_start = std::chrono::steady_clock::now();
142 boolean m_session_underway{
false};
144 std::filesystem::path m_deck_dir = getAppPath().append(
"Decks/");
176 void render(std::shared_ptr<ConsoleUI::ConsoleWindow> window)
override;
226 m_staticDrawn = staticDrawn;
232 std::function<void()> m_goBack;
233 bool m_staticDrawn =
false;
Defines a UI scene.
Definition: menu.h:629
Defines the UI manager.
Definition: menu.h:675
Class for a scene to show the program instructions.
Definition: settings_scene.h:154
void incrementCards()
Increment flashcard card limit by 1.
Definition: settings_scene.cpp:174
SettingsScene(ConsoleUI::UIManager &uiManager, std::function< void()> goBack, StudySettings &studySettings)
Construct a new HowTo Scene object.
Definition: settings_scene.cpp:118
void handleInput() override
Handle user input for the scene.
Definition: settings_scene.cpp:168
void decrementStudyMins()
Decrement study duration by 1 minute.
Definition: settings_scene.cpp:192
void update() override
function for continuous updates to the program state seperate from rendering and input handling
Definition: settings_scene.cpp:138
void decrementCards()
Decrement flashcard card limit by 1.
Definition: settings_scene.cpp:180
void resetDefault()
Reset to default settings.
Definition: settings_scene.cpp:197
void render(std::shared_ptr< ConsoleUI::ConsoleWindow > window) override
renders the scene on the console window
Definition: settings_scene.cpp:144
void setStaticDrawn(bool staticDrawn) override
Sets the static drawn state of the scene.
Definition: settings_scene.h:224
void init()
Initialise the scene.
Definition: settings_scene.cpp:133
void incrementStudyMins()
Increment study duration by 1 miunute.
Definition: settings_scene.cpp:186
Object for the settings relating to the study sessions component.
Definition: settings_scene.h:27
void endSession()
sets the end of the session
std::chrono::steady_clock::time_point getSessionStart()
Get the Session Start time point.
Definition: settings_scene.cpp:112
void setStudyDurationMin(const int &mins)
Set the Study Duration.
Definition: settings_scene.cpp:88
std::filesystem::path getDeckDir()
Get the directory the Deck files are stored in.
Definition: settings_scene.cpp:19
int getFlashCardLimit()
Get the round limit for flashcards.
Definition: settings_scene.cpp:66
boolean sessionUnderway()
Determines if the study session is underway.
Definition: settings_scene.cpp:107
int getStudyDurationMin()
Get the Study Duration.
Definition: settings_scene.cpp:71
void setFlashCardLimit(const int &n_cards)
Set the maximum number of flashcards per round.
Definition: settings_scene.cpp:76
StudySettings()
Construct a new Study Settings object.
Definition: settings_scene.cpp:15
void decFCLimit()
decrement the flashcard card round limit by 1
Definition: settings_scene.cpp:41
void incFCLimit()
increment the flashcard card round limit by 1
Definition: settings_scene.cpp:32
void startSession()
Set the start time for the study session.
Definition: settings_scene.cpp:101
void reset()
Reset the settings back to the defaults.
Definition: settings_scene.cpp:24
StudySettings(const int &n_cards, const int &mins)
Construct a new Study Settings object.
void incStudyDuration()
increment the study duration by 1 minute
Definition: settings_scene.cpp:49
void decStudyDuration()
decrement the study duration by 1 minute
Definition: settings_scene.cpp:57
Contains useful helper functions.