1/*
2 * Copyright (C) 2012 Cutehacks AS. All rights reserved.
3 * info@cutehacks.com
4 * http://cutehacks.com
5 *
6 * This file is part of Fly.
7 *
8 * Fly is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * Fly is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with Fly. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#ifndef SETTINGS_H
23#define SETTINGS_H
24
25#include <QSettings>
26
27class Settings : public QSettings
28{
29 Q_OBJECT
30 Q_PROPERTY(QString airportCode READ airportCode WRITE setAirportCode NOTIFY airportCodeChanged)
31 Q_PROPERTY(int hoursBefore READ hoursBefore WRITE setHoursBefore NOTIFY hoursBeforeChanged)
32 Q_PROPERTY(int hoursAfter READ hoursAfter WRITE setHoursAfter NOTIFY hoursAfterChanged)
33
34public:
35 Settings(QObject *parent = 0);
36 ~Settings();
37
38 QString airportCode() const;
39 void setAirportCode(const QString &code);
40
41 int hoursBefore() const;
42 void setHoursBefore(int hours);
43
44 int hoursAfter() const;
45 void setHoursAfter(int hours);
46
47Q_SIGNALS:
48 void airportCodeChanged();
49 void hoursBeforeChanged();
50 void hoursAfterChanged();
51};
52
53#endif
54