Sometimes its the little things..
[qzeecontrol] / main.cpp
1 /*
2  *  Copyright 2012 Ruediger Gad
3  *
4  *  This file is part of QZeeControl.
5  *
6  *  QZeeControl is free software: you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation, either version 3 of the License, or
9  *  (at your option) any later version.
10  *
11  *  QZeeControl is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with QZeeControl.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #include <QtGui/QApplication>
21 #include <QtDeclarative>
22 #include "qmlapplicationviewer.h"
23 #include "btconnector.h"
24 #include "xtstadapter.h"
25
26 Q_DECL_EXPORT int main(int argc, char *argv[])
27 {
28     QScopedPointer<QApplication> app(createApplication(argc, argv));
29
30     qmlRegisterType<BtConnector>("qzeecontrol", 1, 0, "BtConnector");
31     qmlRegisterType<XtstAdapter>("qzeecontrol", 1, 0, "XtstAdapter");
32
33     QmlApplicationViewer viewer;
34     viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
35     viewer.setMainQmlFile(QLatin1String("qml/QZeeControl/main.qml"));
36     viewer.showExpanded();
37
38     return app->exec();
39 }