2
* Copyright (C) 2013 National University of Defense Technology(NUDT) & Kylin Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
//#include <QtGui/QGuiApplication>
19
//#include "qtquick2applicationviewer/qtquick2applicationviewer.h"
20
//#include "dispatcher.h"
24
//#include <QStringList>
25
//#include <QQmlParserStatus>
26
//#include <QQmlListProperty>
27
//#include <QQmlExtensionPlugin>
28
//#include <QQmlComponent>
34
#include <QGuiApplication>
35
#include <QQmlComponent>
37
#include "dispatcher.h"
38
#include "ihu-application.h"
40
int main(int argc, char** argv)
42
qmlRegisterType<DispatcherQml>("RegisterMyType", 0, 1, "Dispatcher");
43
IhuApplication application(argc, argv);
45
if (!application.setup()) {
49
return application.exec();
52
//int main(int argc, char *argv[])
54
// QGuiApplication app(argc, argv);
56
// qmlRegisterType<DispatcherQml>("RegisterMyType", 0, 1, "Dispatcher");
58
// QtQuick2ApplicationViewer viewer;
60
//// QString path = dir.currentPath();
61
//// if (access("/usr/bin/ihu", 0) == 0) {
62
//// viewer.setMainQmlFile(QStringLiteral("qml/main.qml"));
65
// viewer.setSource(QUrl::fromLocalFile("/usr/share/ihu/qml/main.qml"));
67
// viewer.showExpanded();
69
// //DispatcherQml *dispathcer = new DispatcherQml();