qmlFrontend/main.cpp
author unc0rr
Sun, 28 Sep 2014 00:49:04 +0400
branchqmlfrontend
changeset 10428 7c25297720f1
parent 10420 02c573d19224
child 10436 084e046f6bd5
permissions -rw-r--r--
More refactoring: move PoC preview getting code into flib
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     1
#include <QtGui/QGuiApplication>
10420
unc0rr
parents: 10402
diff changeset
     2
#include <QQmlEngine>
unc0rr
parents: 10402
diff changeset
     3
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     4
#include "qtquick2applicationviewer/qtquick2applicationviewer.h"
10420
unc0rr
parents: 10402
diff changeset
     5
#include "hwengine.h"
unc0rr
parents: 10402
diff changeset
     6
#include "previewimageprovider.h"
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     7
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     8
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     9
int main(int argc, char *argv[])
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    10
{
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    11
    QGuiApplication app(argc, argv);
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    12
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    13
    HWEngine::exposeToQML();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    14
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    15
    QtQuick2ApplicationViewer viewer;
10420
unc0rr
parents: 10402
diff changeset
    16
unc0rr
parents: 10402
diff changeset
    17
    viewer.engine()->addImageProvider(QLatin1String("preview"), new PreviewImageProvider());
unc0rr
parents: 10402
diff changeset
    18
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    19
    viewer.setMainQmlFile(QStringLiteral("qml/qmlFrontend/main.qml"));
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    20
    viewer.showExpanded();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    21
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    22
    return app.exec();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    23
}