This repository was archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
42 lines (35 loc) · 1.21 KB
/
main.cpp
File metadata and controls
42 lines (35 loc) · 1.21 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
#include <QtGui/QApplication>
#include <QDebug>
#include <qmlapplicationviewer.h>
#include <QtDeclarative>
#include <QIcon>
#include <QLibraryInfo>
#include <blog.h>
#include <profile.h>
#include <settings.h>
#include <oauth.h>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setApplicationName("meemblr");
app.setApplicationVersion("0.0.1");
app.setOrganizationName("cyrus and ZogG");
Profile profile_req;
Blog blog_req;
Settings settings;
Oauth oauth;
oauth.setSettings(&settings);
/* DEBUG VALUES */
if (settings.getUsername() == "") {
settings.setUsername("zogg");
}
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
viewer.rootContext()->setContextProperty("profile_req",&profile_req);
viewer.rootContext()->setContextProperty("blog_req",&blog_req);
viewer.rootContext()->setContextProperty("settings",&settings);
viewer.rootContext()->setContextProperty("oauth",&oauth);
viewer.setMainQmlFile(QLatin1String("qml/meemblr/main.qml"));
viewer.showExpanded();
return app.exec();
}