feat: add Preferences dialog for managing theme, rendering, and unit settings

This commit is contained in:
AndreaRigoni
2026-04-10 18:12:05 +00:00
parent e8c10daf6d
commit f8f92ebf3d
8 changed files with 213 additions and 35 deletions

View File

@@ -23,6 +23,11 @@ public:
Dimensionless
};
enum Theme {
Dark,
Bright
};
void SetPreferredUnit(Dimension dim, const std::string& unit) {
m_PreferredUnits[dim] = unit;
}
@@ -64,9 +69,17 @@ public:
return Dimensionless;
}
bool GetThrottledRendering() const { return m_ThrottledRendering; }
void SetThrottledRendering(bool enabled) { m_ThrottledRendering = enabled; }
Theme GetTheme() const { return m_Theme; }
void SetTheme(Theme theme) { m_Theme = theme; }
private:
Settings() {}
Settings() : m_ThrottledRendering(true), m_Theme(Dark) {}
std::map<Dimension, std::string> m_PreferredUnits;
bool m_ThrottledRendering;
Theme m_Theme;
};
} // namespace Qt