bad but good
[tlb/tlb-podcasts.git] / AppManager.h
1 #ifndef _APP_MANAGER_H_
2 #define _APP_MANAGER_H_
3
4 #include <QObject>
5 #include <QUrl>
6
7 #include <QQmlEngine>
8 #include <QJSEngine>
9 #include <QQuickView>
10 #include <QStack>
11
12 #include "Shows.h"
13
14 class AppManager: public QObject
15 {
16 Q_OBJECT;
17 QML_ELEMENT;
18 QML_SINGLETON;
19
20 Q_PROPERTY(QObject* shows READ shows CONSTANT)
21
22 public:
23 AppManager(QObject* parent);
24 virtual ~AppManager();
25
26 static AppManager *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine);
27
28 void initializeView(QUrl url);
29 QObject *shows();
30
31 public slots:
32 void requestNewSource(QUrl sourceFile);
33 void requestBack();
34
35 signals:
36 void internalNewSource(QUrl sourceFile);
37
38 private:
39 QQuickView *m_view;
40 QStack<QUrl> m_pageHistory;
41 QUrl currentPage;
42 };
43
44 #endif /* _APP_MANAGER_H_ */