Commit 66e60ceb5f984d4b64ce71d26b0c95781bc983c3
1 parent
9640713917
Exists in
master
and in
2 other branches
모든 버튼에 음향 효과 추가
Showing
44 changed files
with
198 additions
and
3 deletions
Show diff stats
app/gui/oven_control/adjustmentwindow.cpp
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | #include "adjustmentwindow.h" |
3 | 3 | #include "ui_adjustmentwindow.h" |
4 | 4 | #include "yesnopopupdlg.h" |
5 | +#include "soundplayer.h" | |
5 | 6 | |
6 | 7 | AdjustmentWindow::AdjustmentWindow(QWidget *parent) : |
7 | 8 | QMainWindow(parent), |
... | ... | @@ -11,6 +12,9 @@ AdjustmentWindow::AdjustmentWindow(QWidget *parent) : |
11 | 12 | |
12 | 13 | ui->clockContainer->setParent(ui->upperStack); |
13 | 14 | setAttribute(Qt::WA_DeleteOnClose); |
15 | + | |
16 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
17 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
14 | 18 | } |
15 | 19 | |
16 | 20 | AdjustmentWindow::~AdjustmentWindow() | ... | ... |
app/gui/oven_control/basicsettingwindow.cpp
1 | 1 | #include "basicsettingwindow.h" |
2 | 2 | #include "ui_basicsettingwindow.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | BasicSettingWindow::BasicSettingWindow(QWidget *parent) : |
5 | 7 | QMainWindow(parent), |
6 | 8 | ui(new Ui::BasicSettingWindow) |
7 | 9 | { |
8 | 10 | ui->setupUi(this); |
11 | + | |
12 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
13 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
9 | 14 | } |
10 | 15 | |
11 | 16 | BasicSettingWindow::~BasicSettingWindow() | ... | ... |
app/gui/oven_control/burnertestwindow.cpp
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 | |
4 | 4 | #include <QTimer> |
5 | 5 | |
6 | +#include "soundplayer.h" | |
7 | + | |
6 | 8 | BurnerTestWindow::BurnerTestWindow(QWidget *parent) : |
7 | 9 | QMainWindow(parent), |
8 | 10 | ui(new Ui::BurnerTestWindow) |
... | ... | @@ -12,6 +14,9 @@ BurnerTestWindow::BurnerTestWindow(QWidget *parent) : |
12 | 14 | ui->clockContainer->setParent(ui->upperStack); |
13 | 15 | setAttribute(Qt::WA_DeleteOnClose); |
14 | 16 | |
17 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
18 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
19 | + | |
15 | 20 | udp = UdpHandler::getInstance(); |
16 | 21 | |
17 | 22 | steamTimer.setInterval(5 * 60 * 1000); | ... | ... |
app/gui/oven_control/componenttestwindow.cpp
1 | 1 | #include "componenttestwindow.h" |
2 | 2 | #include "ui_componenttestwindow.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | ComponentTestWindow::ComponentTestWindow(QWidget *parent) : |
5 | 7 | QMainWindow(parent), |
6 | 8 | ui(new Ui::ComponentTestWindow) |
... | ... | @@ -10,6 +12,9 @@ ComponentTestWindow::ComponentTestWindow(QWidget *parent) : |
10 | 12 | ui->clockContainer->setParent(ui->upperStack); |
11 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
12 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
13 | 18 | udp = UdpHandler::getInstance(); |
14 | 19 | connect(udp, SIGNAL(changed()), this, SLOT(onDataChanged())); |
15 | 20 | ... | ... |
app/gui/oven_control/config1digitsetdlg.cpp
1 | 1 | #include <QDebug> |
2 | 2 | #include "config1digitsetdlg.h" |
3 | 3 | #include "ui_config1digitsetdlg.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | using namespace Define; |
6 | 7 | |
... | ... | @@ -16,6 +17,9 @@ Config1DigitSetDlg::Config1DigitSetDlg(QWidget *parent, ConfigType type) : |
16 | 17 | this->setWindowFlags( Qt::FramelessWindowHint); |
17 | 18 | this->setAttribute( Qt::WA_DeleteOnClose); |
18 | 19 | |
20 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
21 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | + | |
19 | 23 | m_nType = type; |
20 | 24 | |
21 | 25 | ui->ctrLbTitle->setText(cfg->getTitleString(m_nType)); | ... | ... |
app/gui/oven_control/configbacklightdlg.cpp
1 | 1 | #include "configbacklightdlg.h" |
2 | 2 | #include "ui_configbacklightdlg.h" |
3 | 3 | #include "config.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | #include "backlight.h" |
6 | 7 | |
... | ... | @@ -18,6 +19,10 @@ ConfigBackLightDlg::ConfigBackLightDlg(QWidget *parent) : |
18 | 19 | ui->setupUi(this); |
19 | 20 | this->setWindowFlags( Qt::FramelessWindowHint); |
20 | 21 | this->setAttribute( Qt::WA_DeleteOnClose); |
22 | + | |
23 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
24 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
25 | + | |
21 | 26 | showFullScreen(); |
22 | 27 | item = cfg->getConfigValue(config_backlight); |
23 | 28 | m_nSelBackLight = item.d32; | ... | ... |
app/gui/oven_control/configdatetimedlg.cpp
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | #include "configdatetimedlg.h" |
3 | 3 | #include "ui_configdatetimedlg.h" |
4 | 4 | #include "system.h" |
5 | +#include "soundplayer.h" | |
5 | 6 | |
6 | 7 | |
7 | 8 | ConfigDateTimeDlg::ConfigDateTimeDlg(QWidget *parent) : |
... | ... | @@ -11,6 +12,10 @@ ConfigDateTimeDlg::ConfigDateTimeDlg(QWidget *parent) : |
11 | 12 | ui->setupUi(this); |
12 | 13 | this->setWindowFlags( Qt::FramelessWindowHint); |
13 | 14 | this->setAttribute( Qt::WA_DeleteOnClose); |
15 | + | |
16 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
17 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
18 | + | |
14 | 19 | ui->ctrSpBxYear->setFormatterWidth(4); |
15 | 20 | QDateTime dt_tm = QDateTime::currentDateTime(); |
16 | 21 | QDate dt_ = dt_tm.date(); | ... | ... |
app/gui/oven_control/configdutywashdlg.cpp
1 | 1 | #include "config.h" |
2 | 2 | #include "configdutywashdlg.h" |
3 | 3 | #include "ui_configdutywashdlg.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | using namespace Define; |
6 | 7 | |
... | ... | @@ -16,6 +17,10 @@ ConfigDutyWashDlg::ConfigDutyWashDlg(QWidget *parent) : |
16 | 17 | this->setWindowFlags( Qt::FramelessWindowHint); |
17 | 18 | this->setAttribute( Qt::WA_DeleteOnClose); |
18 | 19 | |
20 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
21 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | + | |
23 | + | |
19 | 24 | ui->pushButton_1->setText(tr(active_on_off_menu[0])); |
20 | 25 | ui->pushButton_2->setText(tr(active_on_off_menu[1])); |
21 | 26 | ... | ... |
app/gui/oven_control/configfavoritebutton.cpp
1 | 1 | #include "configfavoritebutton.h" |
2 | 2 | #include "ui_configfavoritebutton.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | ConfigFavoriteButton::ConfigFavoriteButton(QWidget *parent,uint16_t btn_id) : |
5 | 7 | QWidget(parent), |
6 | 8 | ui(new Ui::ConfigFavoriteButton) |
... | ... | @@ -8,6 +10,8 @@ ConfigFavoriteButton::ConfigFavoriteButton(QWidget *parent,uint16_t btn_id) : |
8 | 10 | ui->setupUi(this); |
9 | 11 | btnid = btn_id; |
10 | 12 | |
13 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
14 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
11 | 15 | } |
12 | 16 | |
13 | 17 | ConfigFavoriteButton::~ConfigFavoriteButton() | ... | ... |
app/gui/oven_control/configfileprocessdlg.cpp
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | #include "ui_configfileprocessdlg.h" |
3 | 3 | #include "config.h" |
4 | 4 | #include "fileprocessdlg.h" |
5 | +#include "soundplayer.h" | |
5 | 6 | |
6 | 7 | ConfigFileProcessDlg::ConfigFileProcessDlg(QWidget *parent, ConfigType type, bool isDown) : |
7 | 8 | QDialog(parent), |
... | ... | @@ -13,6 +14,10 @@ ConfigFileProcessDlg::ConfigFileProcessDlg(QWidget *parent, ConfigType type, boo |
13 | 14 | setAttribute(Qt::WA_NoSystemBackground); |
14 | 15 | setAttribute(Qt::WA_TranslucentBackground); |
15 | 16 | setAttribute(Qt::WA_DeleteOnClose); |
17 | + | |
18 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
19 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
20 | + | |
16 | 21 | m_bIsDown = isDown; |
17 | 22 | if(type < config_invalid) |
18 | 23 | { | ... | ... |
app/gui/oven_control/confighalfenergydlg.cpp
1 | 1 | #include "config.h" |
2 | 2 | #include "confighalfenergydlg.h" |
3 | 3 | #include "ui_confighalfenergydlg.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | using namespace Define; |
6 | 7 | |
... | ... | @@ -16,6 +17,10 @@ ConfigHalfEnergyDlg::ConfigHalfEnergyDlg(QWidget *parent) : |
16 | 17 | this->setWindowFlags( Qt::FramelessWindowHint); |
17 | 18 | this->setAttribute( Qt::WA_DeleteOnClose); |
18 | 19 | |
20 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
21 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | + | |
23 | + | |
19 | 24 | ui->pushButton_1->setText(tr(on_off_menu[0])); |
20 | 25 | ui->pushButton_2->setText(tr(on_off_menu[1])); |
21 | 26 | ... | ... |
app/gui/oven_control/configinfodlg.cpp
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | #include <QDebug> |
4 | 4 | #include "configinfodlg.h" |
5 | 5 | #include "ui_configinfodlg.h" |
6 | +#include "soundplayer.h" | |
6 | 7 | |
7 | 8 | ConfigInfoDlg::ConfigInfoDlg(QWidget *parent, ConfigType type) : |
8 | 9 | QDialog(parent), |
... | ... | @@ -13,6 +14,9 @@ ConfigInfoDlg::ConfigInfoDlg(QWidget *parent, ConfigType type) : |
13 | 14 | this->setWindowFlags( Qt::FramelessWindowHint); |
14 | 15 | this->setAttribute( Qt::WA_DeleteOnClose); |
15 | 16 | |
17 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
18 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
19 | + | |
16 | 20 | m_nType = type; |
17 | 21 | |
18 | 22 | ui->ctrTitle->setText(cfg->getTitleString(type)); | ... | ... |
app/gui/oven_control/configipdlg.cpp
1 | 1 | #include "configipdlg.h" |
2 | 2 | #include "ui_configipdlg.h" |
3 | 3 | #include "config.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | using namespace Define; |
6 | 7 | |
... | ... | @@ -12,6 +13,10 @@ ConfigIpDlg::ConfigIpDlg(QWidget *parent) : |
12 | 13 | setWindowFlags(Qt::FramelessWindowHint); |
13 | 14 | setAttribute(Qt::WA_NoSystemBackground); |
14 | 15 | setAttribute(Qt::WA_TranslucentBackground); |
16 | + | |
17 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
18 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
19 | + | |
15 | 20 | ui->ctrGw_0->setFormatterWidth(3); |
16 | 21 | ui->ctrGw_1->setFormatterWidth(3); |
17 | 22 | ui->ctrGw_2->setFormatterWidth(3); | ... | ... |
app/gui/oven_control/configlanguagedlg.cpp
1 | 1 | #include "config.h" |
2 | 2 | #include "configlanguagedlg.h" |
3 | 3 | #include "ui_configlanguagedlg.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | using namespace Define; |
6 | 7 | |
... | ... | @@ -12,6 +13,10 @@ ConfigLanguageDlg::ConfigLanguageDlg(QWidget *parent) : |
12 | 13 | this->setWindowFlags( Qt::FramelessWindowHint); |
13 | 14 | this->setAttribute( Qt::WA_DeleteOnClose); |
14 | 15 | |
16 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
17 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
18 | + | |
19 | + | |
15 | 20 | |
16 | 21 | ui->pushButton_1->setText(tr(language_menu[0])); |
17 | 22 | ui->pushButton_2->setText(tr(language_menu[1])); | ... | ... |
app/gui/oven_control/configmastervolumedlg.cpp
... | ... | @@ -17,6 +17,10 @@ ConfigVolumeDlg::ConfigVolumeDlg(QWidget *parent, ConfigType type) : |
17 | 17 | this->setWindowFlags( Qt::FramelessWindowHint); |
18 | 18 | this->setAttribute( Qt::WA_DeleteOnClose); |
19 | 19 | |
20 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
21 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | + | |
23 | + | |
20 | 24 | if(type == config_keypad_sound2){ |
21 | 25 | ui->ctrLbTitle->setText(tr("키패드 볼륨")); |
22 | 26 | } | ... | ... |
app/gui/oven_control/configpanelbutton.cpp
... | ... | @@ -5,6 +5,8 @@ |
5 | 5 | #include <QPainter> |
6 | 6 | #include <QDebug> |
7 | 7 | |
8 | +#include "soundplayer.h" | |
9 | + | |
8 | 10 | ConfigPanelButton::ConfigPanelButton(QWidget *parent, uint16_t btn_id) : |
9 | 11 | QWidget(parent), |
10 | 12 | ui(new Ui::ConfigPanelButton) |
... | ... | @@ -24,6 +26,8 @@ ConfigPanelButton::ConfigPanelButton(QWidget *parent, uint16_t btn_id) : |
24 | 26 | |
25 | 27 | // connect(ui->favoriteButton,SIGNAL(clicked(bool)),SIGNAL(checkButtonClicked(bool))); |
26 | 28 | |
29 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
30 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
27 | 31 | } |
28 | 32 | |
29 | 33 | ConfigPanelButton::~ConfigPanelButton() | ... | ... |
app/gui/oven_control/configresttimeformatdlg.cpp
1 | 1 | #include "configresttimeformatdlg.h" |
2 | 2 | #include "ui_configresttimeformatdlg.h" |
3 | 3 | #include "config.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | using namespace Define; |
6 | 7 | |
... | ... | @@ -16,6 +17,9 @@ configResttimeFormatDlg::configResttimeFormatDlg(QWidget *parent) : |
16 | 17 | this->setWindowFlags( Qt::FramelessWindowHint); |
17 | 18 | this->setAttribute( Qt::WA_DeleteOnClose); |
18 | 19 | |
20 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
21 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | + | |
19 | 23 | ui->pushButton_1->setText(tr(rest_time_type_menu[0])); |
20 | 24 | ui->pushButton_2->setText(tr(rest_time_type_menu[1])); |
21 | 25 | ... | ... |
app/gui/oven_control/configsoundselelectdlg.cpp
1 | 1 | #include <QDebug> |
2 | 2 | #include "configsoundselelectdlg.h" |
3 | 3 | #include "ui_configsoundselelectdlg.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | |
6 | 7 | ConfigSoundSelelectDlg::ConfigSoundSelelectDlg(QWidget *parent, ConfigType cfgtype) : |
... | ... | @@ -15,6 +16,9 @@ ConfigSoundSelelectDlg::ConfigSoundSelelectDlg(QWidget *parent, ConfigType cfgty |
15 | 16 | setAttribute(Qt::WA_NoSystemBackground); |
16 | 17 | setAttribute(Qt::WA_TranslucentBackground); |
17 | 18 | |
19 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
20 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
21 | + | |
18 | 22 | this->setAttribute( Qt::WA_DeleteOnClose); |
19 | 23 | |
20 | 24 | ... | ... |
app/gui/oven_control/configtemptypedlg.cpp
1 | 1 | #include "config.h" |
2 | 2 | #include "configtemptypedlg.h" |
3 | 3 | #include "ui_configtemptypedlg.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | using namespace Define; |
6 | 7 | |
... | ... | @@ -16,6 +17,9 @@ ConfigTempTypeDlg::ConfigTempTypeDlg(QWidget *parent) : |
16 | 17 | this->setWindowFlags( Qt::FramelessWindowHint); |
17 | 18 | this->setAttribute( Qt::WA_DeleteOnClose); |
18 | 19 | |
20 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
21 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | + | |
19 | 23 | ui->pushButton_1->setText(tr(temptype_menu[0])); |
20 | 24 | ui->pushButton_2->setText(tr(temptype_menu[1])); |
21 | 25 | ... | ... |
app/gui/oven_control/configtimeformatdlg.cpp
1 | 1 | #include "config.h" |
2 | 2 | #include "configtimeformatdlg.h" |
3 | 3 | #include "ui_configtimeformatdlg.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | using namespace Define; |
6 | 7 | |
... | ... | @@ -16,6 +17,9 @@ ConfigTimeFormatDlg::ConfigTimeFormatDlg(QWidget *parent) : |
16 | 17 | this->setWindowFlags( Qt::FramelessWindowHint); |
17 | 18 | this->setAttribute( Qt::WA_DeleteOnClose); |
18 | 19 | |
20 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
21 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | + | |
19 | 23 | |
20 | 24 | ui->pushButton_1->setText(tr(time_type_menu[0])); |
21 | 25 | ui->pushButton_2->setText(tr(time_type_menu[1])); | ... | ... |
app/gui/oven_control/configwindow.cpp
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | #include "configdatetimedlg.h" |
11 | 11 | #include "servicepassinputdlg.h" |
12 | 12 | #include "fileprocessor.h" |
13 | - | |
13 | +#include "soundplayer.h" | |
14 | 14 | |
15 | 15 | ConfigWindow::ConfigWindow(QWidget *parent) : |
16 | 16 | QMainWindow(parent), |
... | ... | @@ -24,6 +24,9 @@ ConfigWindow::ConfigWindow(QWidget *parent) : |
24 | 24 | |
25 | 25 | ui->scrollAreaMenuLayout->setAlignment(Qt::AlignTop); |
26 | 26 | |
27 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
28 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
29 | + | |
27 | 30 | Config* cfg = Config::getInstance(); |
28 | 31 | |
29 | 32 | QSetIterator<uint32_t> itr = cfg->getConstBeginFavorite(); | ... | ... |
app/gui/oven_control/electricmodelsettingwindow.cpp
1 | 1 | #include "electricmodelsettingwindow.h" |
2 | 2 | #include "ui_electricmodelsettingwindow.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) : |
5 | 7 | QMainWindow(parent), |
6 | 8 | ui(new Ui::ElectricModelSettingWindow) |
... | ... | @@ -9,6 +11,9 @@ ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) : |
9 | 11 | |
10 | 12 | ui->clockContainer->setParent(ui->upperStack); |
11 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
14 | + | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
12 | 17 | } |
13 | 18 | |
14 | 19 | ElectricModelSettingWindow::~ElectricModelSettingWindow() | ... | ... |
app/gui/oven_control/engineermenuwindow.cpp
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | #include "ovenstatics.h" |
8 | 8 | #include "adjustmentwindow.h" |
9 | 9 | #include "modelsettingwindow.h" |
10 | +#include "soundplayer.h" | |
10 | 11 | |
11 | 12 | EngineerMenuWindow::EngineerMenuWindow(QWidget *parent) : |
12 | 13 | QMainWindow(parent), |
... | ... | @@ -17,8 +18,10 @@ EngineerMenuWindow::EngineerMenuWindow(QWidget *parent) : |
17 | 18 | ui->clockContainer->setParent(ui->upperStack); |
18 | 19 | setAttribute(Qt::WA_DeleteOnClose); |
19 | 20 | |
20 | - connect(ui->backButton, SIGNAL(released()), this, SLOT(close())); | |
21 | + connect(ui->backButton, SIGNAL(clicked()), this, SLOT(close())); | |
21 | 22 | |
23 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
24 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | 25 | } |
23 | 26 | |
24 | 27 | EngineerMenuWindow::~EngineerMenuWindow() | ... | ... |
app/gui/oven_control/errorpopupdlg.cpp
... | ... | @@ -2,6 +2,8 @@ |
2 | 2 | #include "ui_errorpopupdlg.h" |
3 | 3 | #include <QDebug> |
4 | 4 | |
5 | +#include "soundplayer.h" | |
6 | + | |
5 | 7 | ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QString &MsgTitle) : |
6 | 8 | QDialog(parent), |
7 | 9 | ui(new Ui::ErrorPopupDlg) |
... | ... | @@ -15,6 +17,9 @@ ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QStr |
15 | 17 | ui->ctrlWarnDescription->setText(MsgDesc); |
16 | 18 | ui->ctrlWarnTitle->setText(MsgTitle); |
17 | 19 | m_pParent = parent; |
20 | + | |
21 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
22 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
18 | 23 | } |
19 | 24 | |
20 | 25 | ErrorPopupDlg::~ErrorPopupDlg() | ... | ... |
app/gui/oven_control/fantestwindow.cpp
1 | 1 | #include "fantestwindow.h" |
2 | 2 | #include "ui_fantestwindow.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | FanTestWindow::FanTestWindow(QWidget *parent) : |
5 | 7 | QMainWindow(parent), |
6 | 8 | ui(new Ui::FanTestWindow) |
... | ... | @@ -10,6 +12,9 @@ FanTestWindow::FanTestWindow(QWidget *parent) : |
10 | 12 | ui->clockContainer->setParent(ui->upperStack); |
11 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
12 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
13 | 18 | udp = UdpHandler::getInstance(); |
14 | 19 | connect(udp, SIGNAL(changed()), this, SLOT(onDataChanged())); |
15 | 20 | ... | ... |
app/gui/oven_control/functiontestwindow.cpp
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | #include "washtestwindow.h" |
8 | 8 | #include "fantestwindow.h" |
9 | 9 | #include "gastestwindow.h" |
10 | +#include "soundplayer.h" | |
10 | 11 | |
11 | 12 | FunctionTestWindow::FunctionTestWindow(QWidget *parent) : |
12 | 13 | QMainWindow(parent), |
... | ... | @@ -17,6 +18,9 @@ FunctionTestWindow::FunctionTestWindow(QWidget *parent) : |
17 | 18 | ui->clockContainer->setParent(ui->upperStack); |
18 | 19 | setAttribute(Qt::WA_DeleteOnClose); |
19 | 20 | |
21 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
22 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
23 | + | |
20 | 24 | connect(ui->backButton, SIGNAL(clicked(bool)), SLOT(close())); |
21 | 25 | } |
22 | 26 | ... | ... |
app/gui/oven_control/gasmodelsettingwindow.cpp
1 | 1 | #include "gasmodelsettingwindow.h" |
2 | 2 | #include "ui_gasmodelsettingwindow.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | GasModelSettingWindow::GasModelSettingWindow(QWidget *parent) : |
5 | 7 | QMainWindow(parent), |
6 | 8 | ui(new Ui::GasModelSettingWindow) |
... | ... | @@ -9,6 +11,9 @@ GasModelSettingWindow::GasModelSettingWindow(QWidget *parent) : |
9 | 11 | |
10 | 12 | ui->clockContainer->setParent(ui->upperStack); |
11 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
14 | + | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
12 | 17 | } |
13 | 18 | |
14 | 19 | GasModelSettingWindow::~GasModelSettingWindow() | ... | ... |
app/gui/oven_control/gastestwindow.cpp
1 | 1 | #include "gastestwindow.h" |
2 | 2 | #include "ui_gastestwindow.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | GasTestWindow::GasTestWindow(QWidget *parent, UdpHandler *udp) : |
5 | 7 | QMainWindow(parent), |
6 | 8 | ui(new Ui::GasTestWindow), udp(udp) |
... | ... | @@ -10,6 +12,9 @@ GasTestWindow::GasTestWindow(QWidget *parent, UdpHandler *udp) : |
10 | 12 | ui->clockContainer->setParent(ui->upperStack); |
11 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
12 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
13 | 18 | connect(udp, SIGNAL(changed()), this, SLOT(onDataChanged())); |
14 | 19 | } |
15 | 20 | ... | ... |
app/gui/oven_control/historylistwindow.cpp
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | #include "ui_historylistwindow.h" |
8 | 8 | #include "ovenstatics.h" |
9 | 9 | #include "stringer.h" |
10 | - | |
10 | +#include "soundplayer.h" | |
11 | 11 | |
12 | 12 | |
13 | 13 | HistoryListWindow::HistoryListWindow(QWidget *parent) : |
... | ... | @@ -19,6 +19,9 @@ HistoryListWindow::HistoryListWindow(QWidget *parent) : |
19 | 19 | ui->clockContainer->setParent(ui->upperStack); |
20 | 20 | setAttribute(Qt::WA_DeleteOnClose); |
21 | 21 | |
22 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
23 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
24 | + | |
22 | 25 | m_ctrlErrorNameLabel = ui->ctrlLabelErrPartName; |
23 | 26 | |
24 | 27 | m_ctrlFirstTimeLabels[0] = ui->ctrlLabelStarTime_1; | ... | ... |
app/gui/oven_control/keyboardwidget.cpp
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 | #include "keyboardwidget.h" |
4 | 4 | #include "ui_keyboardwidget.h" |
5 | 5 | |
6 | +#include "soundplayer.h" | |
7 | + | |
6 | 8 | KeyboardWidget::KeyboardWidget(QWidget *parent) : |
7 | 9 | QWidget(parent), |
8 | 10 | ui(new Ui::KeyboardWidget) |
... | ... | @@ -92,6 +94,9 @@ KeyboardWidget::KeyboardWidget(QWidget *parent) : |
92 | 94 | connect(ui->pushButton_40,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); |
93 | 95 | |
94 | 96 | connect(m_pSignalMapper,SIGNAL(mapped(QString)), this, SLOT(onKeyboardClicked(QString))); |
97 | + | |
98 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
99 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
95 | 100 | } |
96 | 101 | |
97 | 102 | KeyboardWidget::~KeyboardWidget() | ... | ... |
app/gui/oven_control/modelsettingwindow.cpp
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | |
4 | 4 | #include "electricmodelsettingwindow.h" |
5 | 5 | #include "gasmodelsettingwindow.h" |
6 | +#include "soundplayer.h" | |
6 | 7 | |
7 | 8 | ModelSettingWindow::ModelSettingWindow(QWidget *parent) : |
8 | 9 | QMainWindow(parent), |
... | ... | @@ -12,6 +13,9 @@ ModelSettingWindow::ModelSettingWindow(QWidget *parent) : |
12 | 13 | |
13 | 14 | ui->clockContainer->setParent(ui->upperStack); |
14 | 15 | setAttribute(Qt::WA_DeleteOnClose); |
16 | + | |
17 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
18 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
15 | 19 | } |
16 | 20 | |
17 | 21 | ModelSettingWindow::~ModelSettingWindow() | ... | ... |
app/gui/oven_control/operationtimeheat.cpp
1 | 1 | #include "operationtimeheat.h" |
2 | 2 | #include "ui_operationtimeheat.h" |
3 | 3 | #include "ovenstatics.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | OperationTimeHeat::OperationTimeHeat(QWidget *parent) : |
6 | 7 | QMainWindow(parent), |
... | ... | @@ -11,6 +12,9 @@ OperationTimeHeat::OperationTimeHeat(QWidget *parent) : |
11 | 12 | ui->clockContainer->setParent(ui->upperStack); |
12 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
13 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
14 | 18 | reloadUI(); |
15 | 19 | |
16 | 20 | } | ... | ... |
app/gui/oven_control/operationtimemain.cpp
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | #include "operationtimeheat.h" |
4 | 4 | #include "operationtimemode.h" |
5 | 5 | #include "operationtimeparts.h" |
6 | +#include "soundplayer.h" | |
6 | 7 | |
7 | 8 | OperationTimeMain::OperationTimeMain(QWidget *parent) : |
8 | 9 | QMainWindow(parent), |
... | ... | @@ -12,6 +13,9 @@ OperationTimeMain::OperationTimeMain(QWidget *parent) : |
12 | 13 | |
13 | 14 | ui->clockContainer->setParent(ui->upperStack); |
14 | 15 | setAttribute(Qt::WA_DeleteOnClose); |
16 | + | |
17 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
18 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
15 | 19 | } |
16 | 20 | |
17 | 21 | OperationTimeMain::~OperationTimeMain() | ... | ... |
app/gui/oven_control/operationtimemode.cpp
1 | 1 | #include "operationtimemode.h" |
2 | 2 | #include "ui_operationtimemode.h" |
3 | 3 | #include "ovenstatics.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | OperationTimeMode::OperationTimeMode(QWidget *parent) : |
6 | 7 | QMainWindow(parent), |
... | ... | @@ -11,6 +12,9 @@ OperationTimeMode::OperationTimeMode(QWidget *parent) : |
11 | 12 | ui->clockContainer->setParent(ui->upperStack); |
12 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
13 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
14 | 18 | reloadUi(); |
15 | 19 | } |
16 | 20 | ... | ... |
app/gui/oven_control/operationtimeparts.cpp
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | #include "operationtimeparts.h" |
3 | 3 | #include "ui_operationtimeparts.h" |
4 | 4 | #include "ovenstatics.h" |
5 | +#include "soundplayer.h" | |
5 | 6 | |
6 | 7 | OperationTimeParts::OperationTimeParts(QWidget *parent) : |
7 | 8 | QMainWindow(parent), |
... | ... | @@ -15,6 +16,9 @@ OperationTimeParts::OperationTimeParts(QWidget *parent) : |
15 | 16 | ui->clockContainer->setParent(ui->upperStack); |
16 | 17 | setAttribute(Qt::WA_DeleteOnClose); |
17 | 18 | |
19 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
20 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
21 | + | |
18 | 22 | m_arrTimeLabels[0] = ui->m_ctrlLbListTime_1; |
19 | 23 | m_arrTimeLabels[1] = ui->m_ctrlLbListTime_2; |
20 | 24 | m_arrTimeLabels[2] = ui->m_ctrlLbListTime_3; | ... | ... |
app/gui/oven_control/programmingnamepopup.cpp
1 | 1 | #include "programmingnamepopup.h" |
2 | 2 | #include "ui_programmingnamepopup.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | ProgrammingNamePopup::ProgrammingNamePopup(QWidget *parent, CookRecord record) : |
5 | 7 | QWidget(parent), |
6 | 8 | ui(new Ui::ProgrammingNamePopup), |
... | ... | @@ -11,6 +13,11 @@ ProgrammingNamePopup::ProgrammingNamePopup(QWidget *parent, CookRecord record) : |
11 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
12 | 14 | |
13 | 15 | ui->lineEdit->setText(record.name); |
16 | + ui->lineEdit->setFocus(); | |
17 | + ui->lineEdit->selectAll(); | |
18 | + | |
19 | + connect(ui->okButton, &QPushButton::pressed, SoundPlayer::playClick); | |
20 | + connect(ui->cancelButton, &QPushButton::pressed, SoundPlayer::playClick); | |
14 | 21 | } |
15 | 22 | |
16 | 23 | ProgrammingNamePopup::~ProgrammingNamePopup() | ... | ... |
app/gui/oven_control/realtimemain.cpp
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | #include "ui_realtimemain.h" |
3 | 3 | #include "realtimepartswindow.h" |
4 | 4 | #include "realtimesensorwindow.h" |
5 | +#include "soundplayer.h" | |
5 | 6 | |
6 | 7 | RealtimeMain::RealtimeMain(QWidget *parent) : |
7 | 8 | QMainWindow(parent), |
... | ... | @@ -11,6 +12,9 @@ RealtimeMain::RealtimeMain(QWidget *parent) : |
11 | 12 | |
12 | 13 | ui->clockContainer->setParent(ui->upperStack); |
13 | 14 | setAttribute(Qt::WA_DeleteOnClose); |
15 | + | |
16 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
17 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
14 | 18 | } |
15 | 19 | |
16 | 20 | RealtimeMain::~RealtimeMain() | ... | ... |
app/gui/oven_control/realtimepartswindow.cpp
1 | 1 | #include "realtimepartswindow.h" |
2 | 2 | #include "ui_realtimepartswindow.h" |
3 | 3 | #include "ovenstatics.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | RealtimePartsWindow::RealtimePartsWindow(QWidget *parent) : |
6 | 7 | QMainWindow(parent), |
... | ... | @@ -11,6 +12,9 @@ RealtimePartsWindow::RealtimePartsWindow(QWidget *parent) : |
11 | 12 | ui->clockContainer->setParent(ui->upperStack); |
12 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
13 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
14 | 18 | // for(i=0;i<CONTROL_LIST_COL_MAX;i++){ |
15 | 19 | // for(j=0;i<CONTROL_LIST_ITEM_MAX;j++){ |
16 | 20 | // m_arrLbState[i][j]=NULL; | ... | ... |
app/gui/oven_control/realtimesensorwindow.cpp
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | #include "ovenstatics.h" |
4 | 4 | #include "stringer.h" |
5 | 5 | #include "QDateTime" |
6 | +#include "soundplayer.h" | |
6 | 7 | |
7 | 8 | RealtimeSensorWindow::RealtimeSensorWindow(QWidget *parent) : |
8 | 9 | QMainWindow(parent), |
... | ... | @@ -16,6 +17,9 @@ RealtimeSensorWindow::RealtimeSensorWindow(QWidget *parent) : |
16 | 17 | ui->clockContainer->setParent(ui->upperStack); |
17 | 18 | setAttribute(Qt::WA_DeleteOnClose); |
18 | 19 | |
20 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
21 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
22 | + | |
19 | 23 | m_arrLbState[0][0] = ui->m_ctrlLbListState_1_1; |
20 | 24 | m_arrLbState[0][1] = ui->m_ctrlLbListState_1_2; |
21 | 25 | m_arrLbState[0][2] = ui->m_ctrlLbListState_1_3; | ... | ... |
app/gui/oven_control/servicehistorymain.cpp
1 | 1 | #include "servicehistorymain.h" |
2 | 2 | #include "ui_servicehistorymain.h" |
3 | 3 | #include "historylistwindow.h" |
4 | +#include "soundplayer.h" | |
4 | 5 | |
5 | 6 | ServiceHistoryMain::ServiceHistoryMain(QWidget *parent) : |
6 | 7 | QMainWindow(parent), |
... | ... | @@ -11,6 +12,9 @@ ServiceHistoryMain::ServiceHistoryMain(QWidget *parent) : |
11 | 12 | ui->clockContainer->setParent(ui->upperStack); |
12 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
13 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
14 | 18 | connect(ui->backButton, SIGNAL(released()), this, SLOT(close())); |
15 | 19 | } |
16 | 20 | ... | ... |
app/gui/oven_control/servicepassinputdlg.cpp
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | #include "ui_servicepassinputdlg.h" |
3 | 3 | #include "engineermenuwindow.h" |
4 | 4 | #include <QDebug> |
5 | +#include "soundplayer.h" | |
5 | 6 | |
6 | 7 | #define PASS_WORD "0000" |
7 | 8 | |
... | ... | @@ -15,6 +16,10 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent) : |
15 | 16 | setAttribute(Qt::WA_TranslucentBackground); |
16 | 17 | setAttribute(Qt::WA_DeleteOnClose); |
17 | 18 | this->setResult(QDialog::Accepted); |
19 | + | |
20 | + | |
21 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
22 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
18 | 23 | } |
19 | 24 | |
20 | 25 | ServicePassInputDlg::~ServicePassInputDlg() | ... | ... |
app/gui/oven_control/valvetestwindow.cpp
1 | 1 | #include "valvetestwindow.h" |
2 | 2 | #include "ui_valvetestwindow.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | ValveTestWindow::ValveTestWindow(QWidget *parent) : |
5 | 7 | QMainWindow(parent), |
6 | 8 | ui(new Ui::ValveTestWindow) |
... | ... | @@ -10,6 +12,9 @@ ValveTestWindow::ValveTestWindow(QWidget *parent) : |
10 | 12 | ui->clockContainer->setParent(ui->upperStack); |
11 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
12 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
13 | 18 | udp = UdpHandler::getInstance(); |
14 | 19 | connect(udp, SIGNAL(changed()), this, SLOT(onDataChanged())); |
15 | 20 | ... | ... |
app/gui/oven_control/washtestwindow.cpp
1 | 1 | #include "washtestwindow.h" |
2 | 2 | #include "ui_washtestwindow.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | WashTestWindow::WashTestWindow(QWidget *parent) : |
5 | 7 | QMainWindow(parent), |
6 | 8 | ui(new Ui::WashTestWindow) |
... | ... | @@ -10,6 +12,9 @@ WashTestWindow::WashTestWindow(QWidget *parent) : |
10 | 12 | ui->clockContainer->setParent(ui->upperStack); |
11 | 13 | setAttribute(Qt::WA_DeleteOnClose); |
12 | 14 | |
15 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
16 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
17 | + | |
13 | 18 | udp = UdpHandler::getInstance(); |
14 | 19 | connect(udp, SIGNAL(changed()), this, SLOT(onDataChanged())); |
15 | 20 | ... | ... |
app/gui/oven_control/yesnopopupdlg.cpp
1 | 1 | #include "yesnopopupdlg.h" |
2 | 2 | #include "ui_yesnopopupdlg.h" |
3 | 3 | |
4 | +#include "soundplayer.h" | |
5 | + | |
4 | 6 | YesNoPopupDlg::YesNoPopupDlg(QWidget *parent, QString strDesc) : |
5 | 7 | QDialog(parent), |
6 | 8 | ui(new Ui::YesNoPopupDlg) |
... | ... | @@ -17,6 +19,8 @@ YesNoPopupDlg::YesNoPopupDlg(QWidget *parent, QString strDesc) : |
17 | 19 | ui->ctrLbDesc->setText(strDesc); |
18 | 20 | |
19 | 21 | //this->setAttribute( Qt::WA_DeleteOnClose); |
22 | + foreach (QPushButton *button, findChildren<QPushButton *>()) | |
23 | + connect(button, &QPushButton::pressed, SoundPlayer::playClick); | |
20 | 24 | } |
21 | 25 | |
22 | 26 | YesNoPopupDlg::~YesNoPopupDlg() | ... | ... |