qmlFrontend/main.cpp
author unc0rr
Wed, 03 Dec 2014 00:07:33 +0300
branchqmlfrontend
changeset 10606 8e95911cb86b
parent 10436 084e046f6bd5
child 10886 99273b7afbff
permissions -rw-r--r--
merge default
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"
10436
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10420
diff changeset
     7
#include "themeiconprovider.h"
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     8
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
     9
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    10
int main(int argc, char *argv[])
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    11
{
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    12
    QGuiApplication app(argc, argv);
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    13
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    14
    HWEngine::exposeToQML();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    15
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    16
    QtQuick2ApplicationViewer viewer;
10420
unc0rr
parents: 10402
diff changeset
    17
unc0rr
parents: 10402
diff changeset
    18
    viewer.engine()->addImageProvider(QLatin1String("preview"), new PreviewImageProvider());
10436
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents: 10420
diff changeset
    19
    viewer.engine()->addImageProvider(QLatin1String("theme"), new ThemeIconProvider());
10420
unc0rr
parents: 10402
diff changeset
    20
10402
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    21
    viewer.setMainQmlFile(QStringLiteral("qml/qmlFrontend/main.qml"));
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    22
    viewer.showExpanded();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    23
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    24
    return app.exec();
3313336c1ee0 Let's get it started
unc0rr
parents:
diff changeset
    25
}