92fef6124
고영탁
환경 설정 - 설정 UI 완료
|
1
2
3
|
#include "configbacklightdlg.h"
#include "ui_configbacklightdlg.h"
#include "config.h"
|
a9841cd3c
김태훈
밝기 조절 설정 중에도 화면 밝...
|
4
|
#include "backlight.h"
|
92fef6124
고영탁
환경 설정 - 설정 UI 완료
|
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
|
using namespace Define;
#define MAX_LIGHT 7
#define MIN_LIGHT 0
ConfigBackLightDlg::ConfigBackLightDlg(QWidget *parent) :
QDialog(parent),
ui(new Ui::ConfigBackLightDlg)
{
Config* cfg = Config::getInstance();
Define::config_item item;
ui->setupUi(this);
this->setWindowFlags( Qt::FramelessWindowHint);
this->setAttribute( Qt::WA_DeleteOnClose);
showFullScreen();
item = cfg->getConfigValue(config_backlight);
m_nSelBackLight = item.d32;
ui->ctrProgressLight->setMaxProgress(0,MAX_LIGHT);
ui->ctrProgressLight->setCurrentProgress(m_nSelBackLight);
}
ConfigBackLightDlg::~ConfigBackLightDlg()
{
delete ui;
}
void ConfigBackLightDlg::on_ctrBtnOk_clicked()
{
Config* cfg = Config::getInstance();
config_item item;
item.d32 = m_nSelBackLight;
cfg->setConfigValue(config_backlight,item);
accept();
}
void ConfigBackLightDlg::on_ctrBtnCancel_clicked()
{
|
a9841cd3c
김태훈
밝기 조절 설정 중에도 화면 밝...
|
44
45
46
47
|
Config* cfg = Config::getInstance();
config_item item;
item = cfg->getConfigValue(config_backlight);
Backlight::set(item.d32);
|
92fef6124
고영탁
환경 설정 - 설정 UI 완료
|
48
49
50
51
52
53
54
55
56
57
58
59
60
|
reject();
}
void ConfigBackLightDlg::on_pushButton_clicked()
{
}
void ConfigBackLightDlg::on_ctrBtnPlus_clicked()
{
//minus button;
m_nSelBackLight = m_nSelBackLight>0?m_nSelBackLight-1:0;
ui->ctrProgressLight->setCurrentProgress(m_nSelBackLight);
|
a9841cd3c
김태훈
밝기 조절 설정 중에도 화면 밝...
|
61
62
|
Backlight::set(m_nSelBackLight);
|
92fef6124
고영탁
환경 설정 - 설정 UI 완료
|
63
64
65
66
67
68
69
70
|
}
void ConfigBackLightDlg::on_ctrBtnMinus_clicked()
{
m_nSelBackLight = m_nSelBackLight<7?m_nSelBackLight+1:7;
ui->ctrProgressLight->setCurrentProgress(m_nSelBackLight);
|
a9841cd3c
김태훈
밝기 조절 설정 중에도 화면 밝...
|
71
72
|
Backlight::set(m_nSelBackLight);
|
92fef6124
고영탁
환경 설정 - 설정 UI 완료
|
73
|
}
|