qmlapplicationviewer.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // checksum 0x898f version 0x70013
  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. class QmlApplicationViewerPrivate *d;
  32. };
  33. QApplication *createApplication(int &argc, char **argv);
  34. #endif // QMLAPPLICATIONVIEWER_H