-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·57 lines (42 loc) · 1.52 KB
/
main.cpp
File metadata and controls
executable file
·57 lines (42 loc) · 1.52 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
56
57
#include "mainwindow.h"
#include <QApplication>
#include "iozone/iozone_event.h"
#include "postmark/postmark_event.h"
#include <QCoreApplication>
MainWindow *g_w;
const QEvent::Type ioZoneEvent::ioZoneEventType = (QEvent::Type)QEvent::registerEventType(QEvent::User + 100);
const QEvent::Type postmarkEvent::postmarkEventType = (QEvent::Type)QEvent::registerEventType(QEvent::User + 101);
extern void notifyGUI(int type, long long kb, long long reclen, unsigned long long speed)
{
ioZoneEvent *iozevent = new ioZoneEvent(type, kb, reclen, speed);
QCoreApplication::postEvent(g_w, iozevent);
}
extern "C" {
void notifyGUI_2_int(int nowfs, int isprogress, int type, int total, int persecond)
{
postmarkEvent *postmarkevent = new postmarkEvent(nowfs, isprogress, type, total, persecond);
QCoreApplication::postEvent(g_w, postmarkevent);
}
void notifyGUI_2_float(int nowfs, int isprogress, int type, float total, float persecond)
{
postmarkEvent *postmarkevent = new postmarkEvent(nowfs, isprogress, type, total, persecond);
QCoreApplication::postEvent(g_w, postmarkevent);
}
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
g_w = new MainWindow();
g_w->show();
QFile qssFile(":/qss/skin.qss");
QString qss;
qssFile.open(QFile::ReadOnly);
if(qssFile.isOpen())
{
qss = QLatin1String(qssFile.readAll());
//qApp->setStyleSheet(qss);
a.setStyleSheet(qss);
qssFile.close();
}
return a.exec();
}