aconfig.h 738 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef CONFIG_H
  2. #define CONFIG_H
  3. #include <QSettings>
  4. #include <QDebug>
  5. #include <string>
  6. #define ORGANIZATION_NAME "LotRO: Legacy Team"
  7. #define ORGANIZATION_DOMAIN "www.translate.lotros.ru"
  8. #define APPLICATION_NAME "LotRO: Legacy"
  9. class AConfig {
  10. private:
  11. AConfig();
  12. AConfig(const AConfig&);
  13. AConfig& operator=(AConfig&);
  14. public:
  15. static AConfig* getInstance() {
  16. static AConfig instance;
  17. return &instance;
  18. }
  19. void saveConfig();
  20. void setValue(QString section, QString key, QString value);
  21. QString getValue(QString section, QString key);
  22. void deleteKey(QString section, QString key);
  23. void deleteSection(QString section);
  24. private:
  25. QString filename_;
  26. };
  27. #endif // CONFIG_H