-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppSettings.h
More file actions
46 lines (39 loc) · 1.4 KB
/
Copy pathAppSettings.h
File metadata and controls
46 lines (39 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include <string>
class AppSettings
{
static AppSettings* _appSettingInstance;
std::string theme; // "dark" / "light"
int fontSize; // e.g. 14, 16, 18
int volumeLevel; // 0–100
bool isMuted; // true / false
std::string language; // e.g. "English", "Zulu"
int autoSaveInterval; // minutes
std::string startupMode; // "normal", "safe", etc.
std::string username; // current user
std::string lastLogin;
AppSettings();
public :
static AppSettings* getSetting();
void showtheme() const;
std::string getTheme() const;
int getFontSize() const;
int getVolumeLevel() const;
bool getIsMuted() const;
std::string getLanguage() const;
int getAutoSaveInterval() const;
std::string getStartupMode() const;
std::string getUsername() const;
std::string getLastLogin() const;
void setTheme(const std::string& newTheme);
void setFontSize(int size);
void setVolumeLevel(int volume);
void setIsMuted(bool muted);
void setLanguage(const std::string& lang);
void setAutoSaveInterval(int minutes);
void setStartupMode(const std::string& mode);
void setUsername(const std::string& user);
void setLastLogin(const std::string& time);
void loadFromFile(const std::string& filePath);
void saveToFile(const std::string& filePath) const;
};