#pragma once #include #include #include #include namespace scwx { namespace qt { namespace settings { class MapSettings : public SettingsCategory { public: explicit MapSettings(); ~MapSettings(); MapSettings(const MapSettings&) = delete; MapSettings& operator=(const MapSettings&) = delete; MapSettings(MapSettings&&) noexcept; MapSettings& operator=(MapSettings&&) noexcept; std::size_t count() const; SettingsVariable& map_style(std::size_t i) const; SettingsVariable& radar_site(std::size_t i) const; SettingsVariable& radar_product_group(std::size_t i) const; SettingsVariable& radar_product(std::size_t i) const; bool Shutdown(); /** * Reads the variables from the JSON object. * * @param json JSON object to read * * @return true if the values read are valid, false if any values were * modified. */ bool ReadJson(const boost::json::object& json) override; /** * Writes the variables to the JSON object. * * @param json JSON object to write */ void WriteJson(boost::json::object& json) const override; static MapSettings& Instance(); friend bool operator==(const MapSettings& lhs, const MapSettings& rhs); private: class Impl; std::unique_ptr p; }; } // namespace settings } // namespace qt } // namespace scwx