-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.cpp
41 lines (32 loc) · 1.31 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
#include "KeyPair.hpp"
#include "KeyStore.hpp"
#include "AccountKeys.hpp"
#include "QmlJsonRpcProvider.hpp"
#include "TransactionFoundry.hpp"
#include <QtQmlTricksPlugin_SmartDataModels.h>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
app.setOrganizationName("Nathan Hourt");
app.setOrganizationDomain("nathanhourt.com");
#ifdef NDEBUG
app.setApplicationName("Steem Pressure");
#else
app.setApplicationName("Steem Pressure Debug");
#endif
app.setApplicationVersion("1.0 Beta");
QQmlApplicationEngine engine;
// For benlau's quickpromise library
engine.addImportPath("qrc:/");
registerQtQmlTricksSmartDataModel(&engine);
qmlRegisterType<TransactionFoundry>("com.nathanhourt.steem.crypto", 1, 0, "TransactionFoundry");
qmlRegisterType<KeyPair>("com.nathanhourt.steem.crypto", 1, 0, "KeyPair");
qmlRegisterType<KeyStore>("com.nathanhourt.steem.accounts", 1, 0, "KeyStore");
qmlRegisterType<AccountKeys>("com.nathanhourt.steem.accounts", 1, 0, "AccountKeys");
qmlRegisterType<QmlJsonRpcProvider>("com.nathanhourt.rpc", 1, 0, "JsonRpcProvider");
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
return app.exec();
}