12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef OPTIONS_H
- #define OPTIONS_H
-
- #include <QObject>
- #include <QSettings>
- #include <QStringList>
- #include <QDebug>
- #include <QApplication>
-
- class Options : public QObject
- {
- Q_OBJECT
- public:
- static Options* instance();
- static void init(QObject* p = 0);
-
- bool startAtBoot();
- QString getDefaultLogin(bool override = true);
- bool isAutoConnect();
- QStringList getContacts();
- int getAutoReconnectInterval();
-
- public slots:
- void setStartAtBoot(bool s);
- void setDefaultLogin(QString login);
- void setAutoConnect(bool c);
- void setContacts(QStringList contacts);
- void setAutoReconnectInterval(int t);
-
- private:
- explicit Options(QObject *parent = 0);
- static Options* m_options;
- QSettings m_settings;
-
- };
-
- #endif // OPTIONS_H
|