qmlapplicationviewer.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // checksum 0x82ed version 0x60010
  2. /*
  3. This file was generated by the Qt Quick Application wizard of Qt Creator.
  4. QmlApplicationViewer is a convenience class containing mobile device specific
  5. code such as screen orientation handling. Also QML paths and debugging are
  6. handled here.
  7. It is recommended not to modify this file, since newer versions of Qt Creator
  8. may offer an updated version of it.
  9. */
  10. #ifndef QMLAPPLICATIONVIEWER_H
  11. #define QMLAPPLICATIONVIEWER_H
  12. #include <QtDeclarative/QDeclarativeView>
  13. class QmlApplicationViewer : public QDeclarativeView
  14. {
  15. Q_OBJECT
  16. public:
  17. enum ScreenOrientation {
  18. ScreenOrientationLockPortrait,
  19. ScreenOrientationLockLandscape,
  20. ScreenOrientationAuto
  21. };
  22. explicit QmlApplicationViewer(QWidget *parent = 0);
  23. virtual ~QmlApplicationViewer();
  24. static QmlApplicationViewer *create();
  25. void setMainQmlFile(const QString &file);
  26. void addImportPath(const QString &path);
  27. // Note that this will only have an effect on Symbian and Fremantle.
  28. void setOrientation(ScreenOrientation orientation);
  29. void showExpanded();
  30. private:
  31. explicit QmlApplicationViewer(QDeclarativeView *view, QWidget *parent);
  32. class QmlApplicationViewerPrivate *d;
  33. };
  34. QApplication *createApplication(int &argc, char **argv);
  35. #endif // QMLAPPLICATIONVIEWER_H