#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; public: typedef std::map Collection; typedef Collection::iterator Iterator; private: const std::string mConfigFile; const Files::ConfigurationManager& mConfigurationManager; Settings::Manager mSettings; Collection mCategories; Iterator mCurrentCategory; // not implemented State (const State&); State& operator= (const State&); private: void load(); void declare(); void declareCategory (const std::string& key); public: State (const Files::ConfigurationManager& configurationManager); ~State(); void save(); Iterator begin(); Iterator end(); static State& get(); }; // convenience function State& get(); } #endif