diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-05-15 09:39:37 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-05-15 10:00:22 +0300 |
commit | 0fc60b87ece9fb992c2d8cb15bc34f25f347ce6e (patch) | |
tree | fae25d5fc7f770e498c3f1640001d15749299f9b /demos/qmlpolarchart/qmlapplicationviewer/qmlapplicationviewer.h | |
parent | 668c483b1a22bb9b32569bec0486344f422ed14b (diff) |
Fix build issues with multi-core builds in qml/quick demos
Qmake couldn't handle shared sources so make each app have
their own copy of application viewer sources again.
Change-Id: I6ee1948c91b5cc41bdd69237b106d3bfe935226c
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'demos/qmlpolarchart/qmlapplicationviewer/qmlapplicationviewer.h')
-rw-r--r-- | demos/qmlpolarchart/qmlapplicationviewer/qmlapplicationviewer.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/demos/qmlpolarchart/qmlapplicationviewer/qmlapplicationviewer.h b/demos/qmlpolarchart/qmlapplicationviewer/qmlapplicationviewer.h new file mode 100644 index 00000000..fba2d52a --- /dev/null +++ b/demos/qmlpolarchart/qmlapplicationviewer/qmlapplicationviewer.h @@ -0,0 +1,46 @@ +// checksum 0xc67a version 0x80016 +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#ifndef QMLAPPLICATIONVIEWER_H +#define QMLAPPLICATIONVIEWER_H + +#include <QDeclarativeView> + +class QmlApplicationViewer : public QDeclarativeView +{ + Q_OBJECT + +public: + enum ScreenOrientation { + ScreenOrientationLockPortrait, + ScreenOrientationLockLandscape, + ScreenOrientationAuto + }; + + explicit QmlApplicationViewer(QWidget *parent = 0); + virtual ~QmlApplicationViewer(); + + static QmlApplicationViewer *create(); + + void setMainQmlFile(const QString &file); + void addImportPath(const QString &path); + + // Note that this will only have an effect on Fremantle. + void setOrientation(ScreenOrientation orientation); + + void showExpanded(); + +private: + class QmlApplicationViewerPrivate *d; +}; + +QApplication *createApplication(int &argc, char **argv); + +#endif // QMLAPPLICATIONVIEWER_H |