Q_PROPERTY(QStringList recentStations
READ recentStations WRITE setRecentStations
NOTIFY recentStationsChanged)
+ Q_PROPERTY(QStringList favoriteStations
+ READ favoriteStations WRITE setFavoriteStations
+ NOTIFY favoriteStationsChanged)
Q_PROPERTY(int checkingInterval
READ checkingInterval WRITE setCheckingInterval
NOTIFY checkingIntervalChanged)
+ Q_PROPERTY(bool autoUpdate
+ READ autoUpdate WRITE setAutoUpdate
+ NOTIFY autoUpdateChanged)
Q_PROPERTY(bool stationViewPreferred
READ stationViewPreferred WRITE setStationViewPreferred
NOTIFY stationViewPreferredChanged)
Q_PROPERTY(bool showArrivalsPreferred
READ showArrivalsPreferred WRITE setShowArrivalsPreferred
NOTIFY showArrivalsPreferredChanged)
-
Q_PROPERTY(StationListProxyModel::SortingMode stationListSortingMode
READ stationListSortingMode WRITE setStationListSortingMode
NOTIFY stationListSortingModeChanged)
+ Q_PROPERTY(bool darkThemePreferred
+ READ darkThemePreferred WRITE setDarkThemePreferred
+ NOTIFY darkThemePreferredChanged)
+ Q_PROPERTY(QString versionString READ versionString CONSTANT)
public:
explicit Settings(QObject *parent = 0);
~Settings();
QStringList recentStations();
void setRecentStations(const QStringList &stations);
+ QStringList favoriteStations();
+ void setFavoriteStations(const QStringList &stations);
+
int checkingInterval();
void setCheckingInterval(int);
+ bool autoUpdate();
+ void setAutoUpdate(bool);
+
bool stationViewPreferred();
void setStationViewPreferred(bool);
bool showArrivalsPreferred();
void setShowArrivalsPreferred(bool);
+ bool darkThemePreferred();
+ void setDarkThemePreferred(bool);
+
StationListProxyModel::SortingMode stationListSortingMode();
void setStationListSortingMode(StationListProxyModel::SortingMode mode);
-signals:
- void queryBaseUrlChanged(const QString &);
- void recentStationsChanged(const QStringList &);
- void checkingIntervalChanged(int);
- void stationViewPreferredChanged(bool);
- void showArrivalsPreferredChanged(bool);
- void stationListSortingModeChanged(StationListProxyModel::SortingMode mode);
-
-public slots:
+ QString versionString(void);
-private:
- QSettings m_settings;
+signals:
+ void queryBaseUrlChanged();
+ void recentStationsChanged();
+ void favoriteStationsChanged();
+ void checkingIntervalChanged();
+ void autoUpdateChanged();
+ void stationViewPreferredChanged();
+ void showArrivalsPreferredChanged();
+ void darkThemePreferredChanged();
+ void stationListSortingModeChanged();
};
#endif // SETTINGS_H