mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 04:10:04 +00:00
Add unit settings
This commit is contained in:
parent
7a71b9e244
commit
3bfcaede96
5 changed files with 151 additions and 3 deletions
43
scwx-qt/source/scwx/qt/settings/unit_settings.hpp
Normal file
43
scwx-qt/source/scwx/qt/settings/unit_settings.hpp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/qt/settings/settings_category.hpp>
|
||||
#include <scwx/qt/settings/settings_variable.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace settings
|
||||
{
|
||||
|
||||
class UnitSettings : public SettingsCategory
|
||||
{
|
||||
public:
|
||||
explicit UnitSettings();
|
||||
~UnitSettings();
|
||||
|
||||
UnitSettings(const UnitSettings&) = delete;
|
||||
UnitSettings& operator=(const UnitSettings&) = delete;
|
||||
|
||||
UnitSettings(UnitSettings&&) noexcept;
|
||||
UnitSettings& operator=(UnitSettings&&) noexcept;
|
||||
|
||||
SettingsVariable<std::string>& accumulation_units() const;
|
||||
SettingsVariable<std::string>& echo_tops_units() const;
|
||||
SettingsVariable<std::string>& speed_units() const;
|
||||
|
||||
static UnitSettings& Instance();
|
||||
|
||||
friend bool operator==(const UnitSettings& lhs, const UnitSettings& rhs);
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
} // namespace settings
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue