~ubuntukylin-members/i-help-you/trunk

« back to all changes in this revision

Viewing changes to src/main.cpp

  • Committer: kobe
  • Date: 2013-06-04 06:03:32 UTC
  • Revision ID: kobe24_lixiang@126.com-20130604060332-9iv62g3jwn68ewem
initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 National University of Defense Technology(NUDT) & Kylin Ltd.
 
3
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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/>.
 
15
 */
 
16
 
 
17
 
 
18
//#include <QtGui/QGuiApplication>
 
19
//#include "qtquick2applicationviewer/qtquick2applicationviewer.h"
 
20
//#include "dispatcher.h"
 
21
 
 
22
//#include <QObject>
 
23
//#include <QString>
 
24
//#include <QStringList>
 
25
//#include <QQmlParserStatus>
 
26
//#include <QQmlListProperty>
 
27
//#include <QQmlExtensionPlugin>
 
28
//#include <QQmlComponent>
 
29
//#include <QDir>
 
30
//#include <QDebug>
 
31
//#include <unistd.h>
 
32
 
 
33
// Qt
 
34
#include <QGuiApplication>
 
35
#include <QQmlComponent>
 
36
// local
 
37
#include "dispatcher.h"
 
38
#include "ihu-application.h"
 
39
 
 
40
int main(int argc, char** argv)
 
41
{
 
42
    qmlRegisterType<DispatcherQml>("RegisterMyType", 0, 1, "Dispatcher");
 
43
    IhuApplication application(argc, argv);
 
44
 
 
45
    if (!application.setup()) {
 
46
        return 0;
 
47
    }
 
48
 
 
49
    return application.exec();
 
50
}
 
51
 
 
52
//int main(int argc, char *argv[])
 
53
//{
 
54
//    QGuiApplication app(argc, argv);
 
55
 
 
56
//    qmlRegisterType<DispatcherQml>("RegisterMyType", 0, 1, "Dispatcher");
 
57
 
 
58
//    QtQuick2ApplicationViewer viewer;
 
59
////    QDir dir;
 
60
////    QString path = dir.currentPath();
 
61
////    if (access("/usr/bin/ihu", 0) == 0) {
 
62
////        viewer.setMainQmlFile(QStringLiteral("qml/main.qml"));
 
63
////    }
 
64
////    else {
 
65
//        viewer.setSource(QUrl::fromLocalFile("/usr/share/ihu/qml/main.qml"));
 
66
////    }
 
67
//    viewer.showExpanded();
 
68
 
 
69
//    //DispatcherQml *dispathcer = new DispatcherQml();
 
70
//    return app.exec();
 
71
//}