Settings.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. void save();
  39. private:
  40. static Settings* ourInstance;
  41. static QSettings* ourSettings;
  42. Settings();
  43. ~Settings();
  44. Settings(Settings&) {}
  45. };
  46. #endif // SETTINGS_H