aconfig.h 675 B

12345678910111213141516171819202122232425262728293031323334
  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. public:
  13. static AConfig* getInstance() {
  14. static AConfig instance;
  15. return &instance;
  16. }
  17. void saveConfig();
  18. void setValue(QString section, QString key, QString value);
  19. QString getValue(QString section, QString key);
  20. void deleteKey(QString section, QString key);
  21. void deleteSection(QString section);
  22. private:
  23. QString filename_;
  24. };
  25. #endif // CONFIG_H