Settings.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. GNU General Public License version 3 notice
  3. Copyright (C) 2012 Mihawk <luiz@netdome.biz>. All rights reserved.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see < http://www.gnu.org/licenses/ >.
  14. */
  15. #ifndef SETTINGS_H
  16. #define SETTINGS_H
  17. class QSettings;
  18. class QString;
  19. class QStringList;
  20. class Settings
  21. {
  22. public:
  23. static Settings* globalInstance();
  24. bool changeConfigFile(const QString& fileName);
  25. QStringList serverList();
  26. void setServerList(QStringList& list);
  27. QString quakeFolder() const;
  28. QString botName() const;
  29. int botPing() const;
  30. int botTopColor() const;
  31. int botBottomColor() const;
  32. bool botSpectator() const;
  33. int floodProtTime() const;
  34. int qwFloodProtTime() const;
  35. int spamFloodProtTime() const;
  36. unsigned int queryInterval() const;
  37. int timeToSayHiAfterConnected() const;
  38. int timeToWaitForCountReply() const;
  39. bool developerMode() const;
  40. void save();
  41. private:
  42. static Settings* ourInstance;
  43. static QSettings* ourSettings;
  44. Settings();
  45. ~Settings();
  46. Settings(Settings&) {}
  47. };
  48. #endif // SETTINGS_H