applicationdata.h 893 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef APPLICATIONDATA_H
  2. #define APPLICATIONDATA_H
  3. #include "connectiondata.h"
  4. #include <QString>
  5. #include <QList>
  6. class ApplicationData
  7. {
  8. public:
  9. static void createConfigExample(const QString& pathToConfig);
  10. ApplicationData(const QString& pathToConfig);
  11. std::pair<QString, quint16> getWebInterfaceAddress();
  12. QList<ConnectionData> getConnections();
  13. QString getServiceEmoji();
  14. QString getServiceName();
  15. QString getDataFolder();
  16. bool getAjaxIsDisabled();
  17. private:
  18. void readConfig();
  19. QString m_file;
  20. QList<ConnectionData> m_connections;
  21. // Global
  22. QString m_dataPath;
  23. QString m_nick;
  24. QString m_user;
  25. QString m_realName;
  26. QString m_password;
  27. QString m_serviceEmoji;
  28. QString m_serviceName;
  29. QString m_webInterfaceAddress;
  30. quint16 m_webInterfacePort;
  31. bool m_ajaxIsDisabled;
  32. };
  33. #endif // APPLICATIONDATA_H