#ifndef CSV_PREFS_STATE_H #define CSM_PREFS_STATE_H #include #include #include #ifndef Q_MOC_RUN #include #endif #include #include "category.hpp" namespace CSMPrefs { class State : public QObject { Q_OBJECT static State *sThis; const std::string mConfigFile; const Files::ConfigurationManager& mConfigurationManager; Settings::Manager mSettings; std::map mCategories; std::map::iterator mCurrentCategory; // not implemented State (const State&); State& operator= (const State&); private: void load(); void declare(); void declareCategory (const std::string& key, const std::string& name); public: State (const Files::ConfigurationManager& configurationManager); ~State(); void save(); /// \return collection of name, key pairs (sorted) std::vector > listCategories() const; static State& get(); }; // convenience function State& get(); } #endif