/
main.cpp
73 lines (55 loc) · 1.53 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// ####################################################################
// OwnCloudGalleryClient - Owncloud synced picture management
//
// main.cpp
//
// created: 16. Nov 2015
// author: Florian Faßnacht (fassnacht)
//
// brief: Backend logic and connection.
// ####################################################################
// build dependent includes
#ifdef __deploy_ios
#include <QGuiApplication>
#include <QQuickView>
#include <QQmlEngine>
#endif
#ifdef __deploy_desktop
#include <QApplication>
#include <QQmlApplicationEngine>
#endif
//other includes
#include <webdavinterface.h>
#include "thumbgenerator.h"
#include <QDirIterator>
#include <iostream>
#include <QDebug>
#include <QImage>
//#include <ne_dates.h>
int main(int argc, char *argv[])
{
//Setup UI
QGuiApplication app(argc,argv);
WebDavInterface dav;
#ifdef __deploy_desktop
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/desktop.qml")));
#endif
#ifdef __deploy_ios
QQuickView view;
view.setResizeMode(QQuickView::SizeRootObjectToView);
QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit()));
view.setSource(QUrl("qrc:/AdaptiveUI.qml"));
view.show();
view.setFlags(Qt::MaximizeUsingFullscreenGeometryHint);
#endif
//Other logic
QDirIterator dir("/Users/florian.fassnacht/Desktop/Dave Matthews Band 2",QDir::Files, QDirIterator::NoIteratorFlags);
thumbGenerator tg;
while(dir.hasNext())
{
dir.next();
tg.getBigThumb(dir.filePath());
}
return app.exec();
}