summaryrefslogtreecommitdiff
path: root/share/qtcreator/templates/shared/qtquickapplicationviewer/qtquick1applicationviewer/qtquick1applicationviewer.h
blob: b9dc3a9fee428d50b0ed894a3c9049b093b469fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
  This file was generated by the Qt Quick 1 Application wizard of Qt Creator.
  QtQuick1ApplicationViewer is a convenience class containing mobile device
  specific code such as screen orientation handling. Also QML paths 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 QTQUICK1APPLICATIONVIEWER_H
#define QTQUICK1APPLICATIONVIEWER_H

#include <QDeclarativeView>

class QtQuick1ApplicationViewer : public QDeclarativeView
{
    Q_OBJECT

public:
    enum ScreenOrientation {
        ScreenOrientationLockPortrait,
        ScreenOrientationLockLandscape,
        ScreenOrientationAuto
    };

    explicit QtQuick1ApplicationViewer(QWidget *parent = 0);
    virtual ~QtQuick1ApplicationViewer();

    static QtQuick1ApplicationViewer *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 QtQuick1ApplicationViewerPrivate *d;
};

#endif // QTQUICK1APPLICATIONVIEWER_H