Load color tables from settings

This commit is contained in:
Dan Paulat 2021-11-06 22:18:02 -05:00
parent bcae7d9825
commit b241703b40
16 changed files with 324 additions and 17 deletions

View file

@ -0,0 +1,46 @@
#pragma once
#include <memory>
#include <string>
#include <boost/json.hpp>
namespace scwx
{
namespace qt
{
namespace settings
{
class PaletteSettingsImpl;
class PaletteSettings
{
public:
explicit PaletteSettings();
~PaletteSettings();
PaletteSettings(const PaletteSettings&) = delete;
PaletteSettings& operator=(const PaletteSettings&) = delete;
PaletteSettings(PaletteSettings&&) noexcept;
PaletteSettings& operator=(PaletteSettings&&) noexcept;
const std::string& palette(const std::string& name) const;
boost::json::value ToJson() const;
static std::shared_ptr<PaletteSettings> Create();
static std::shared_ptr<PaletteSettings> Load(const boost::json::value* json,
bool& jsonDirty);
friend bool operator==(const PaletteSettings& lhs,
const PaletteSettings& rhs);
private:
std::unique_ptr<PaletteSettingsImpl> p;
};
} // namespace settings
} // namespace qt
} // namespace scwx