Add hotkey settings

This commit is contained in:
Dan Paulat 2024-04-10 00:01:34 -05:00
parent 22e3101c22
commit 3da1d15470
7 changed files with 272 additions and 1 deletions

View file

@ -0,0 +1,42 @@
#pragma once
#include <scwx/qt/settings/settings_category.hpp>
#include <scwx/qt/settings/settings_variable.hpp>
#include <scwx/qt/types/hotkey_types.hpp>
#include <memory>
#include <string>
namespace scwx
{
namespace qt
{
namespace settings
{
class HotkeySettings : public SettingsCategory
{
public:
explicit HotkeySettings();
~HotkeySettings();
HotkeySettings(const HotkeySettings&) = delete;
HotkeySettings& operator=(const HotkeySettings&) = delete;
HotkeySettings(HotkeySettings&&) noexcept;
HotkeySettings& operator=(HotkeySettings&&) noexcept;
SettingsVariable<std::string>& hotkey(scwx::qt::types::Hotkey hotkey) const;
static HotkeySettings& Instance();
friend bool operator==(const HotkeySettings& lhs, const HotkeySettings& rhs);
private:
class Impl;
std::unique_ptr<Impl> p;
};
} // namespace settings
} // namespace qt
} // namespace scwx