loadhelper.cpp 873 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * Copyright (c) 2012 Nokia Corporation.
  3. */
  4. // Class header
  5. #include "loadhelper.h"
  6. // Internal includes
  7. #include "qmlapplicationviewer.h"
  8. /*!
  9. \class LoadHelper
  10. \brief LoadHelper is a utility class for loading the main.qml file after splash.
  11. */
  12. /*!
  13. Factory method for creating a LoadHelper instance.
  14. */
  15. LoadHelper *LoadHelper::create(QmlApplicationViewer *viewer, QObject *parent)
  16. {
  17. return new LoadHelper(viewer, parent);
  18. }
  19. /*!
  20. Constructor.
  21. */
  22. LoadHelper::LoadHelper(QmlApplicationViewer *viewer, QObject *parent)
  23. : QObject(parent),
  24. m_viewer(viewer)
  25. {}
  26. /*!
  27. Public slot that sets the main QML file. Usually used in conjunction with
  28. a single shot timer.
  29. */
  30. void LoadHelper::loadMainQML()
  31. {
  32. if (m_viewer) {
  33. m_viewer->setMainQmlFile(QLatin1String("qml/VideoStreamer/main.qml"));
  34. }
  35. }