407b5a295a8fa1142452854e02a5633b9f63ffcb
[vlc-remote] / appsettings.h
1 /*   VLC-REMOTE for MAEMO 5
2 *   Copyright (C) 2010 Schutz Sacha <istdasklar@gmail.com>, Dru Moore <usr@dru-id.co.uk>, Yann Nave <yannux@onbebop.net>
3 *   This program is free software; you can redistribute it and/or modify
4 *   it under the terms of the GNU General Public License version 2,
5 *   or (at your option) any later version, as published by the Free
6 *   Software Foundation
7 *
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 *
13 *   You should have received a copy of the GNU General Public
14 *   License along with this program; if not, write to the
15 *   Free Software Foundation, Inc.,
16 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17 */
18 #ifndef APPSETTINGS_H
19 #define APPSETTINGS_H
20 #include <QSettings>
21
22 struct VlcDirectory {
23     QString name;
24     QString path;
25 };
26 enum Orientation {
27     AUTO_ROTATE = 0,
28     LANDSCAPE,
29     PORTRAIT
30 };
31
32 class AppSettings {
33 public:
34     explicit AppSettings();
35     ~AppSettings();
36     static QString getCurrentKey();
37     static QString getCurrentIp();
38     static VlcDirectory getHomeDirectory();
39     static QList<VlcDirectory>* getFavourites();
40     static bool addFavourite(VlcDirectory dir);
41     static bool deleteFavourite(VlcDirectory dir);
42     static bool setHomeDirectory(VlcDirectory dir);
43     static Orientation setOrientation(Orientation orientation);
44     static Orientation getOrientation();
45 //private:
46     //static QSettings settings;
47 };
48
49 #endif // APPSETTINGS_H