Settings.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. unsigned int maxThreads() const;
  34. void save();
  35. private:
  36. static Settings* ourInstance;
  37. static QSettings* ourSettings;
  38. Settings();
  39. ~Settings();
  40. Settings(Settings&) {}
  41. };
  42. #endif // SETTINGS_H