Commit 9290e89caf053f82cc122ee35fd1f2cb8e288b9d
1 parent
7a3fdac0e0
Exists in
master
and in
2 other branches
설정 음향 조정
- 키패드 볼륨 조정 수정
Showing
5 changed files
with
41 additions
and
30 deletions
Show diff stats
app/gui/oven_control/config.cpp
@@ -352,10 +352,12 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ | @@ -352,10 +352,12 @@ void Config::execConfigWindow(QWidget *parent, Define::ConfigType idx){ | ||
352 | dlg = new configResttimeFormatDlg(parent); | 352 | dlg = new configResttimeFormatDlg(parent); |
353 | break; | 353 | break; |
354 | case config_marster_vol: | 354 | case config_marster_vol: |
355 | - dlg = new ConfigMasterVolumeDlg(parent); | 355 | + dlg = new ConfigVolumeDlg(parent, idx); |
356 | break; | 356 | break; |
357 | - case config_keypad_sound1: | ||
358 | case config_keypad_sound2: | 357 | case config_keypad_sound2: |
358 | + dlg = new ConfigVolumeDlg(parent, idx); | ||
359 | + break; | ||
360 | + case config_keypad_sound1: | ||
359 | case config_request_loadexec: | 361 | case config_request_loadexec: |
360 | case config_programstep_finish: | 362 | case config_programstep_finish: |
361 | case config_cooktime_finish: | 363 | case config_cooktime_finish: |
app/gui/oven_control/config.h
@@ -349,7 +349,7 @@ class Config : public QObject | @@ -349,7 +349,7 @@ class Config : public QObject | ||
349 | "잔여시간 포맷", //12 | 349 | "잔여시간 포맷", //12 |
350 | "마스터 볼륨", //13 | 350 | "마스터 볼륨", //13 |
351 | "키패드 소리 - 1", | 351 | "키패드 소리 - 1", |
352 | - "키패드 소리 - 2 ", //15 | 352 | + "키패드 볼륨 ", //15 |
353 | "적재/실행 요청", | 353 | "적재/실행 요청", |
354 | "프로그램 단계 종료", | 354 | "프로그램 단계 종료", |
355 | "조리시간 종료", | 355 | "조리시간 종료", |
app/gui/oven_control/configmastervolumedlg.cpp
1 | -#include "config.h" | ||
2 | #include "configmastervolumedlg.h" | 1 | #include "configmastervolumedlg.h" |
3 | #include "ui_configmastervolumedlg.h" | 2 | #include "ui_configmastervolumedlg.h" |
4 | 3 | ||
@@ -6,9 +5,9 @@ | @@ -6,9 +5,9 @@ | ||
6 | 5 | ||
7 | using namespace Define; | 6 | using namespace Define; |
8 | 7 | ||
9 | -#define MAX_MASTER_VOL 7 | 8 | +#define MAX_VOL 7 |
10 | 9 | ||
11 | -ConfigMasterVolumeDlg::ConfigMasterVolumeDlg(QWidget *parent) : | 10 | +ConfigVolumeDlg::ConfigVolumeDlg(QWidget *parent, ConfigType type) : |
12 | QDialog(parent), | 11 | QDialog(parent), |
13 | ui(new Ui::ConfigMasterVolumeDlg) | 12 | ui(new Ui::ConfigMasterVolumeDlg) |
14 | { | 13 | { |
@@ -18,50 +17,56 @@ ConfigMasterVolumeDlg::ConfigMasterVolumeDlg(QWidget *parent) : | @@ -18,50 +17,56 @@ ConfigMasterVolumeDlg::ConfigMasterVolumeDlg(QWidget *parent) : | ||
18 | this->setWindowFlags( Qt::FramelessWindowHint); | 17 | this->setWindowFlags( Qt::FramelessWindowHint); |
19 | this->setAttribute( Qt::WA_DeleteOnClose); | 18 | this->setAttribute( Qt::WA_DeleteOnClose); |
20 | 19 | ||
21 | - item = cfg->getConfigValue(config_marster_vol); | ||
22 | - m_nPrevMasterVol = m_nCurMasterVol = item.d32; | ||
23 | - ui->ctrProgressLight->setMaxProgress(m_nCurMasterVol,MAX_MASTER_VOL); | 20 | + if(type == config_keypad_sound2){ |
21 | + ui->ctrLbTitle->setText(tr("키패드 볼륨")); | ||
22 | + } | ||
23 | + | ||
24 | + m_cfgType = type; | ||
25 | + | ||
26 | + item = cfg->getConfigValue(m_cfgType); | ||
27 | + m_nPrevVol = m_nCurVol = item.d32; | ||
28 | + ui->ctrProgressLight->setMaxProgress(m_nCurVol,MAX_VOL); | ||
24 | } | 29 | } |
25 | 30 | ||
26 | -ConfigMasterVolumeDlg::~ConfigMasterVolumeDlg() | 31 | +ConfigVolumeDlg::~ConfigVolumeDlg() |
27 | { | 32 | { |
28 | delete ui; | 33 | delete ui; |
29 | } | 34 | } |
30 | 35 | ||
31 | -void ConfigMasterVolumeDlg::on_ctrBtnOk_clicked() | 36 | +void ConfigVolumeDlg::on_ctrBtnOk_clicked() |
32 | { | 37 | { |
33 | accept(); | 38 | accept(); |
34 | } | 39 | } |
35 | 40 | ||
36 | -void ConfigMasterVolumeDlg::on_ctrBtnCancel_clicked() | 41 | +void ConfigVolumeDlg::on_ctrBtnCancel_clicked() |
37 | { | 42 | { |
38 | Config* cfg = Config::getInstance(); | 43 | Config* cfg = Config::getInstance(); |
39 | config_item item; | 44 | config_item item; |
40 | - item.d32 = m_nPrevMasterVol; | ||
41 | - cfg->setConfigValue(config_marster_vol,item); | 45 | + item.d32 = m_nPrevVol; |
46 | + cfg->setConfigValue(m_cfgType,item); | ||
42 | reject(); | 47 | reject(); |
43 | } | 48 | } |
44 | 49 | ||
45 | -void ConfigMasterVolumeDlg::on_ctrBtnMinus_clicked() | 50 | +void ConfigVolumeDlg::on_ctrBtnMinus_clicked() |
46 | { | 51 | { |
47 | Config* cfg = Config::getInstance(); | 52 | Config* cfg = Config::getInstance(); |
48 | config_item item; | 53 | config_item item; |
49 | - m_nCurMasterVol = m_nCurMasterVol > 0?m_nCurMasterVol-1:0; | ||
50 | - item.d32 = m_nCurMasterVol; | ||
51 | - cfg->setConfigValue(config_marster_vol,item); | ||
52 | - ui->ctrProgressLight->setCurrentProgress(m_nCurMasterVol); | 54 | + m_nCurVol = m_nCurVol > 0?m_nCurVol-1:0; |
55 | + item.d32 = m_nCurVol; | ||
56 | + cfg->setConfigValue(m_cfgType,item); | ||
57 | + ui->ctrProgressLight->setCurrentProgress(m_nCurVol); | ||
53 | 58 | ||
54 | SoundPlayer::playClick(); | 59 | SoundPlayer::playClick(); |
55 | } | 60 | } |
56 | 61 | ||
57 | -void ConfigMasterVolumeDlg::on_ctrBtnPlus_clicked() | 62 | +void ConfigVolumeDlg::on_ctrBtnPlus_clicked() |
58 | { | 63 | { |
59 | Config* cfg = Config::getInstance(); | 64 | Config* cfg = Config::getInstance(); |
60 | config_item item; | 65 | config_item item; |
61 | - m_nCurMasterVol = m_nCurMasterVol<MAX_MASTER_VOL?m_nCurMasterVol+1:MAX_MASTER_VOL; | ||
62 | - item.d32 = m_nCurMasterVol; | ||
63 | - cfg->setConfigValue(config_marster_vol,item); | ||
64 | - ui->ctrProgressLight->setCurrentProgress(m_nCurMasterVol); | 66 | + m_nCurVol = m_nCurVol<MAX_VOL?m_nCurVol+1:MAX_VOL; |
67 | + item.d32 = m_nCurVol; | ||
68 | + cfg->setConfigValue(m_cfgType,item); | ||
69 | + ui->ctrProgressLight->setCurrentProgress(m_nCurVol); | ||
65 | 70 | ||
66 | SoundPlayer::playClick(); | 71 | SoundPlayer::playClick(); |
67 | } | 72 | } |
app/gui/oven_control/configmastervolumedlg.h
@@ -2,18 +2,21 @@ | @@ -2,18 +2,21 @@ | ||
2 | #define CONFIGMASTERVOLUMEDLG_H | 2 | #define CONFIGMASTERVOLUMEDLG_H |
3 | 3 | ||
4 | #include <QDialog> | 4 | #include <QDialog> |
5 | +#include "config.h" | ||
6 | + | ||
7 | +using namespace Define; | ||
5 | 8 | ||
6 | namespace Ui { | 9 | namespace Ui { |
7 | class ConfigMasterVolumeDlg; | 10 | class ConfigMasterVolumeDlg; |
8 | } | 11 | } |
9 | 12 | ||
10 | -class ConfigMasterVolumeDlg : public QDialog | 13 | +class ConfigVolumeDlg : public QDialog |
11 | { | 14 | { |
12 | Q_OBJECT | 15 | Q_OBJECT |
13 | 16 | ||
14 | public: | 17 | public: |
15 | - explicit ConfigMasterVolumeDlg(QWidget *parent = 0); | ||
16 | - ~ConfigMasterVolumeDlg(); | 18 | + explicit ConfigVolumeDlg(QWidget *parent = 0, ConfigType type=config_invalid); |
19 | + ~ConfigVolumeDlg(); | ||
17 | 20 | ||
18 | private slots: | 21 | private slots: |
19 | void on_ctrBtnOk_clicked(); | 22 | void on_ctrBtnOk_clicked(); |
@@ -26,8 +29,9 @@ private slots: | @@ -26,8 +29,9 @@ private slots: | ||
26 | 29 | ||
27 | private: | 30 | private: |
28 | Ui::ConfigMasterVolumeDlg *ui; | 31 | Ui::ConfigMasterVolumeDlg *ui; |
29 | - int m_nCurMasterVol; | ||
30 | - int m_nPrevMasterVol; | 32 | + int m_nCurVol; |
33 | + int m_nPrevVol; | ||
34 | + ConfigType m_cfgType; | ||
31 | }; | 35 | }; |
32 | 36 | ||
33 | #endif // CONFIGMASTERVOLUMEDLG_H | 37 | #endif // CONFIGMASTERVOLUMEDLG_H |
app/gui/oven_control/configmastervolumedlg.ui
@@ -65,7 +65,7 @@ QPushButton::pressed, QPushButton::focus{ | @@ -65,7 +65,7 @@ QPushButton::pressed, QPushButton::focus{ | ||
65 | <number>0</number> | 65 | <number>0</number> |
66 | </property> | 66 | </property> |
67 | <item> | 67 | <item> |
68 | - <widget class="QLabel" name="label"> | 68 | + <widget class="QLabel" name="ctrLbTitle"> |
69 | <property name="font"> | 69 | <property name="font"> |
70 | <font> | 70 | <font> |
71 | <pointsize>18</pointsize> | 71 | <pointsize>18</pointsize> |