myqmlapplicationviewer.h 823 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Copyright (c) 2011 Nokia Corporation.
  3. */
  4. #ifndef MYQMLAPPLICATIONVIEWER_H
  5. #define MYQMLAPPLICATIONVIEWER_H
  6. #include <QtDeclarative/QDeclarativeView>
  7. class MyQmlApplicationViewer : public QDeclarativeView
  8. {
  9. Q_OBJECT
  10. public:
  11. enum ScreenOrientation {
  12. ScreenOrientationLockPortrait,
  13. ScreenOrientationLockLandscape,
  14. ScreenOrientationAuto
  15. };
  16. public:
  17. explicit MyQmlApplicationViewer(QWidget *parent = 0);
  18. virtual ~MyQmlApplicationViewer();
  19. void launchWithSplashQmlFile(const QString &file);
  20. void setMainQmlFile(const QString &file);
  21. void setOrientation(ScreenOrientation orientation);
  22. void showExpanded();
  23. public slots:
  24. void loadMainQml();
  25. private:
  26. QString m_mainQml;
  27. };
  28. #endif // MYQMLAPPLICATIONVIEWER_H