1234567891011121314151617181920212223242526272829303132 |
- #include <QtGui/QApplication>
- #include "qmlapplicationviewer.h"
- #include <QList>
- #include <QByteArray>
- #include <QSensor>
- QTM_USE_NAMESPACE
- #include <QDebug>
- #include "skyview.h"
- int main(int argc, char *argv[])
- {
- QApplication app(argc, argv);
- qmlRegisterType<SkyView>("StarMap", 1, 0, "SkyView");
- QmlApplicationViewer viewer;
- viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer.setMainQmlFile(QLatin1String("qml/starmap/main.qml"));
- viewer.showFullScreen();
- QList<QByteArray> types = QSensor::sensorTypes();
- Q_FOREACH(QString type, types) {
- qDebug() << "Sensor type found:" << type;
- }
- return app.exec();
- }
|