2 * This file is part of CameraPlus.
4 * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library 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 GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #include <QApplication>
22 #include <QDeclarativeView>
23 #include <QDeclarativeContext>
24 #include <QDeclarativeEngine>
25 #include <QtDeclarative>
29 #include "filenaming.h"
30 #include "quillitem.h"
31 #include "displaystate.h"
32 #include "fsmonitor.h"
33 #include "cameraresources.h"
35 #include "orientation.h"
37 #include "mountprotector.h"
38 #include "trackerstore.h"
39 #include "focusrectangle.h"
40 #include "sharehelper.h"
41 #include "deletehelper.h"
42 #include "galleryhelper.h"
43 #include "postcapturemodel.h"
44 #include "batteryinfo.h"
45 #include "gridlines.h"
46 #include "deviceinfo.h"
47 #include "devicekeys.h"
48 #include "platformsettings.h"
49 #include "dbusservice.h"
52 #include "qt_private/qdeclarativedebughelper_p.h"
53 #endif /* QMLJSDEBUGGER */
55 Q_DECL_EXPORT int main(int argc, char *argv[]) {
56 QApplication::setAttribute(Qt::AA_X11InitThreads, true);
57 QApplication app(argc, argv);
60 QDeclarativeDebugHelper::enableDebugging();
61 #endif /* QMLJSDEBUGGER */
63 QDeclarativeView view;
64 view.setAttribute(Qt::WA_NoSystemBackground);
65 view.setViewport(new QGLWidget);
66 view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
67 view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
68 view.viewport()->setAttribute(Qt::WA_NoSystemBackground);
70 qmlRegisterType<Settings>("CameraPlus", 1, 0, "Settings");
71 qmlRegisterType<FileNaming>("CameraPlus", 1, 0, "FileNaming");
72 qmlRegisterType<QuillItem>("CameraPlus", 1, 0, "QuillItem");
73 qmlRegisterType<DisplayState>("CameraPlus", 1, 0, "DisplayState");
74 qmlRegisterType<FSMonitor>("CameraPlus", 1, 0, "FSMonitor");
75 qmlRegisterType<CameraResources>("CameraPlus", 1, 0, "CameraResources");
76 qmlRegisterType<Compass>("CameraPlus", 1, 0, "Compass");
77 qmlRegisterType<Orientation>("CameraPlus", 1, 0, "Orientation");
78 qmlRegisterType<Geocode>("CameraPlus", 1, 0, "ReverseGeocode");
79 qmlRegisterType<MountProtector>("CameraPlus", 1, 0, "MountProtector");
80 qmlRegisterType<TrackerStore>("CameraPlus", 1, 0, "TrackerStore");
81 qmlRegisterType<FocusRectangle>("CameraPlus", 1, 0, "FocusRectangle");
82 qmlRegisterType<ShareHelper>("CameraPlus", 1, 0, "ShareHelper");
83 qmlRegisterType<DeleteHelper>("CameraPlus", 1, 0, "DeleteHelper");
84 qmlRegisterType<GalleryHelper>("CameraPlus", 1, 0, "GalleryHelper");
85 qmlRegisterType<PostCaptureModel>("CameraPlus", 1, 0, "PostCaptureModel");
86 qmlRegisterType<BatteryInfo>("CameraPlus", 1, 0, "BatteryInfo");
87 qmlRegisterType<GridLines>("CameraPlus", 1, 0, "GridLines");
88 qmlRegisterType<DeviceInfo>("CameraPlus", 1, 0, "DeviceInfo");
89 qmlRegisterType<DeviceKeys>("CameraPlus", 1, 0, "DeviceKeys");
90 qmlRegisterType<PlatformSettings>("CameraPlus", 1, 0, "PlatformSettings");
92 view.setSource(QUrl("qrc:/qml/main.qml"));
94 view.showFullScreen();