Settings.h 1.7 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. QStringList serverList();
  25. void setServerList(QStringList& list);
  26. QString quakeFolder() const;
  27. QString botName() const;
  28. int botPing() const;
  29. int botTopColor() const;
  30. int botBottomColor() const;
  31. bool botSpectator() const;
  32. int floodProtTime() const;
  33. int qwFloodProtTime() const;
  34. int spamFloodProtTime() const;
  35. unsigned int queryInterval() const;
  36. int timeToSayHiAfterConnected() const;
  37. int timeToWaitForCountReply() const;
  38. bool developerMode() const;
  39. void save();
  40. private:
  41. static Settings* ourInstance;
  42. static QSettings* ourSettings;
  43. Settings();
  44. ~Settings();
  45. Settings(Settings&) {}
  46. };
  47. #endif // SETTINGS_H