2 * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "mainwindow.h"
18 #include <QApplication>
19 #include <QtGui/QGuiApplication>
20 #include <QtQml/QQmlApplicationEngine>
21 #include <QtQml/qqml.h>
23 #include "../src2/applicationlauncher.h"
24 #include "../src2/statusbarmodel.h"
25 #include "layouthandler.h"
26 #include "../src2/applicationmodel.h"
28 int main(int argc, char *argv[])
30 QApplication a(argc, argv);
32 // used for application settings (QSettings)
33 QCoreApplication::setOrganizationDomain("LinuxFoundation");
34 QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
35 QCoreApplication::setApplicationName("HomeScreen");
36 QCoreApplication::setApplicationVersion("0.6.0");
38 qDebug("%s, v%s", QCoreApplication::applicationName().toStdString().c_str(), QCoreApplication::applicationVersion().toStdString().c_str());
40 qDBusRegisterMetaType<AppInfo>();
41 qDBusRegisterMetaType<QList<AppInfo> >();
43 qmlRegisterType<ApplicationLauncher>("HomeScreen", 1, 0, "ApplicationLauncher");
44 qmlRegisterType<ApplicationModel>("Home", 1, 0, "ApplicationModel");
45 qmlRegisterType<StatusBarModel>("HomeScreen", 1, 0, "StatusBarModel");
46 qmlRegisterType<LayoutHandler>("HomeScreen", 1, 0, "LayoutHandler");
49 QQmlApplicationEngine engine;
50 engine.load(QUrl(QStringLiteral("qrc:/main.qml")));