#include <QDeclarativeEngine>
#include <QtDeclarative>
#include <QGLWidget>
+#include <QuillFile>
#include "imports/plugin.h"
#include "orientation.h"
#include "geocode.h"
#include "mountprotector.h"
+#include "trackerstore.h"
+#include "focusrectangle.h"
+#include "sharehelper.h"
+#include "deletehelper.h"
+#include "galleryhelper.h"
+
+static void initQuill() {
+ // TODO: All these are hardcoded.
+ Quill::setPreviewLevelCount(1);
+ Quill::setPreviewSize(0, QSize(854, 480));
+ Quill::setMinimumPreviewSize(0, QSize(854, 480));
+ Quill::setThumbnailExtension("jpeg");
+ Quill::setThumbnailFlavorName(0, "screen");
+ Quill::setBackgroundRenderingColor(Qt::black);
+ QString tempPath(QDir::homePath() + QDir::separator() + ".config" +
+ QDir::separator() + "quill" + QDir::separator() + "tmp");
+ QDir().mkpath(tempPath);
+ Quill::setTemporaryFilePath(tempPath);
+ Quill::setDBusThumbnailingEnabled(true);
+ Quill::setThumbnailCreationEnabled(true);
+}
Q_DECL_EXPORT int main(int argc, char *argv[]) {
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
QApplication app(argc, argv);
+ // Let's initialize Quill:
+ initQuill();
+
QDeclarativeView view;
view.setViewport(new QGLWidget);
view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
qmlRegisterType<Orientation>("CameraPlus", 1, 0, "Orientation");
qmlRegisterType<Geocode>("CameraPlus", 1, 0, "ReverseGeocode");
qmlRegisterType<MountProtector>("CameraPlus", 1, 0, "MountProtector");
+ qmlRegisterType<TrackerStore>("CameraPlus", 1, 0, "TrackerStore");
+ qmlRegisterType<FocusRectangle>("CameraPlus", 1, 0, "FocusRectangle");
+ qmlRegisterType<ShareHelper>("CameraPlus", 1, 0, "ShareHelper");
+ qmlRegisterType<DeleteHelper>("CameraPlus", 1, 0, "DeleteHelper");
+ qmlRegisterType<GalleryHelper>("CameraPlus", 1, 0, "GalleryHelper");
QUrl sourceUrl = QUrl::fromLocalFile(QDir::currentPath() + "/main.qml");
view.setSource(sourceUrl);
int ret = app.exec();
return ret;
-};
+}