Repository navigation
Expand file tree
/
Copy pathmain.cpp
More file actions
55 lines (42 loc) · 1.43 KB
/
Copy pathmain.cpp
File metadata and controls
55 lines (42 loc) · 1.43 KB
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
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QTranslator>
#include <QLocale>
#include <QQuickStyle>
//build section
// #include <QtWebView/QtWebView>
//wallpaper section
#include <QCoreApplication>
#include <QDebug>
#include <QDir>
#include "wallpaper/filesystem.h"
#include "wallpaper/unsplash.h"
#include "wallpaper/photo.h"
#include "wallpaper/photolist.h"
#include "wallpaper/localphotolist.h"
#include <Magick++.h>
using namespace Magick;
int main(int argc, char *argv[])
{
//settings for wallpaper part
InitializeMagick(*argv);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
FileSystem::init();
// QtWebView::initialize();
QQuickStyle::setStyle("Material");
QTranslator appTranslator;
appTranslator.load(":/lang/netrunner-command-center_" +
QLocale::system().name());
app.installTranslator(&appTranslator);
// Register C++ class in QML
qmlRegisterType<Unsplash>("Unwallpaper", 1, 0, "Unsplash");
qmlRegisterType<Photo>("Unwallpaper", 1, 0, "PhotoModel");
qmlRegisterType<PhotoList>("Unwallpaper", 1, 0, "PhotoListModel");
qmlRegisterType<LocalPhotoList>("Unwallpaper", 1, 0, "LocalPhotoListModel");
QQmlApplicationEngine engine;
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
return app.exec();
}