-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (29 loc) · 924 Bytes
/
Copy pathmain.cpp
File metadata and controls
37 lines (29 loc) · 924 Bytes
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
#include <QtGui/QApplication>
#include "cwidgetbase.h"
#include "WidgetSelector.h"
#include "HardwareLayer.h"
#include <QFile>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
CWidgetSelector selector;
selector.LoadWidgets();
//-F- Appying default stylesheet
QFile file(":/Resources/default.css");
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
a.setStyleSheet(styleSheet);
file.close();
//-F- Calling OnSettingsChanged to load initial values
for(int i=0;i<selector.GetCount();i++)
{
selector.GetWidget(i)->OnSettingsChanged();
}
//-F- Showing Main Window Widget
selector.show();
selector.ShowThisWidget(0);
//-F- Adjusting brightness
CHardwareLayer::GetInstance()->SetBrightness(
selector.GetSettings()->value("General/Brightness",100).toInt());
return a.exec();
}