-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (32 loc) · 1.09 KB
/
Copy pathmain.cpp
File metadata and controls
34 lines (32 loc) · 1.09 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
#include <QGuiApplication>
#include <QtQml>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QDir>
#include "messengerManager.h"
#include "accessPointModel.h"
#include "pointSizeToPixelSize.h"
#include "../stockMonitor/qDebug2Logcat.h"
#include "audiorecorder.h"
#include <QTranslator>
#include <QIcon>
int main(int argc, char *argv[])
{
installLogcatMessageHandler("LVChat");
QGuiApplication app(argc, argv);
QIcon icon(":/res/appicon.png");
app.setWindowIcon(icon);
QTranslator ts;
ts.load(":/LVChat.qm");
app.installTranslator(&ts);
MessengerManager *mgr = MessengerManager::instance();
SimpleAudioRecorder *recorder = new SimpleAudioRecorder(QDir::currentPath());
QQmlApplicationEngine engine;
QQmlContext *ctx = engine.rootContext();
ctx->setContextProperty("msgManager", mgr);
ctx->setContextProperty("apmodel", new AccessPointModel);
ctx->setContextProperty("fontUtil", new PointSizeToPixelSize);
ctx->setContextProperty("audioRecorder", recorder);
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
return app.exec();
}