diff --git a/app/gui/oven_control/config1digitsetdlg.cpp b/app/gui/oven_control/config1digitsetdlg.cpp
index 4263305..f916b83 100644
--- a/app/gui/oven_control/config1digitsetdlg.cpp
+++ b/app/gui/oven_control/config1digitsetdlg.cpp
@@ -47,6 +47,7 @@ Config1DigitSetDlg::Config1DigitSetDlg(QWidget *parent, ConfigType type) :
strTemp1.sprintf("%%0%d",setting_val.maxlen);
+ ui->ctrSpBxValue->installEventFilter(this);
}
@@ -68,3 +69,13 @@ void Config1DigitSetDlg::on_ctrBtnCancel_clicked()
{
reject();
}
+
+bool Config1DigitSetDlg::eventFilter(QObject *object, QEvent *event){
+ if (object == ui->ctrSpBxValue && event->type() == QEvent::MouseButtonRelease )
+ {
+ ui->ctrSpBxValue->selectAll();
+ qDebug() << "Mouse Release2";
+
+ }
+ return QWidget::eventFilter(object, event);
+}
diff --git a/app/gui/oven_control/config1digitsetdlg.h b/app/gui/oven_control/config1digitsetdlg.h
index 4bca143..ca655dd 100644
--- a/app/gui/oven_control/config1digitsetdlg.h
+++ b/app/gui/oven_control/config1digitsetdlg.h
@@ -23,6 +23,8 @@ private slots:
void on_ctrBtnCancel_clicked();
+ bool eventFilter(QObject *, QEvent *);
+
private:
Ui::Config1DigitSetDlg *ui;
ConfigType m_nType;
diff --git a/app/gui/oven_control/configbacklightdlg.ui b/app/gui/oven_control/configbacklightdlg.ui
index 53d8bc1..8966207 100644
--- a/app/gui/oven_control/configbacklightdlg.ui
+++ b/app/gui/oven_control/configbacklightdlg.ui
@@ -186,6 +186,16 @@ QPushButton::pressed, QPushButton::focus{
true
+
+ QPushButton{
+ border : none;
+ color : white;
+}
+
+QPushButton::pressed, QPushButton::focus{
+ color : yellow;
+}
+
취소
@@ -211,6 +221,16 @@ QPushButton::pressed, QPushButton::focus{
true
+
+ QPushButton{
+ border : none;
+ color : white;
+}
+
+QPushButton::pressed, QPushButton::focus{
+ color : yellow;
+}
+
확인
diff --git a/app/gui/oven_control/configdatetimedlg.ui b/app/gui/oven_control/configdatetimedlg.ui
index f77df90..5ee2eb4 100644
--- a/app/gui/oven_control/configdatetimedlg.ui
+++ b/app/gui/oven_control/configdatetimedlg.ui
@@ -351,6 +351,9 @@ QPushButton::pressed, QPushButton::focus{
true
+
+ false
+
Qt::StrongFocus
@@ -467,13 +470,8 @@ QPushButton::pressed, QPushButton::focus{
600
- centralwidget
- centralwidget
- centralwidget
- centralwidget
- keyboardwidget
diff --git a/app/gui/oven_control/configmastervolumedlg.ui b/app/gui/oven_control/configmastervolumedlg.ui
index 4c5fcde..26c1a32 100644
--- a/app/gui/oven_control/configmastervolumedlg.ui
+++ b/app/gui/oven_control/configmastervolumedlg.ui
@@ -186,6 +186,16 @@ QPushButton::pressed, QPushButton::focus{
true
+
+ QPushButton{
+ border : none;
+ color : white;
+}
+
+QPushButton::pressed, QPushButton::focus{
+ color : yellow;
+}
+
취소
@@ -211,6 +221,16 @@ QPushButton::pressed, QPushButton::focus{
true
+
+ QPushButton{
+ border : none;
+ color : white;
+}
+
+QPushButton::pressed, QPushButton::focus{
+ color : yellow;
+}
+
확인
diff --git a/app/gui/oven_control/configwindow.cpp b/app/gui/oven_control/configwindow.cpp
index 88e12cf..ea0fc38 100644
--- a/app/gui/oven_control/configwindow.cpp
+++ b/app/gui/oven_control/configwindow.cpp
@@ -8,7 +8,7 @@
#include "configinfodlg.h"
#include "yesnopopupdlg.h"
#include "configdatetimedlg.h"
-
+#include "servicepassinputdlg.h"
@@ -110,9 +110,13 @@ void ConfigWindow::onConfigBtnClicked(uint16_t id){
break;
case config_enter_engineer_mode:
{
- EngineerMenuWindow *w = new EngineerMenuWindow(this);
- w->setWindowModality(Qt::WindowModal);
- w->showFullScreen();
+ dlg = new ServicePassInputDlg(this);
+ dlg->exec();
+ if(dlg->result() == QDialog::Accepted){
+ EngineerMenuWindow *w = new EngineerMenuWindow(this);
+ w->setWindowModality(Qt::WindowModal);
+ w->showFullScreen();
+ }
break;
}
case config_software_info:
diff --git a/app/gui/oven_control/formatterspinbox.cpp b/app/gui/oven_control/formatterspinbox.cpp
index 3e0437e..cf707ed 100644
--- a/app/gui/oven_control/formatterspinbox.cpp
+++ b/app/gui/oven_control/formatterspinbox.cpp
@@ -1,4 +1,5 @@
#include
+#include
#include "formatterspinbox.h"
@@ -6,6 +7,7 @@ FormatterSpinBox::FormatterSpinBox(QWidget *parent)
: QSpinBox(parent)
{
m_nwidth = 2;
+
}
//! [1]
@@ -27,3 +29,11 @@ FormatterSpinBox::FormatterSpinBox(QWidget *parent)
void FormatterSpinBox::setFormatterWidth(int wid){
m_nwidth = wid;
}
+
+ void FormatterSpinBox::focusInEvent(QFocusEvent *event){
+ QTimer::singleShot(200,this,SLOT(selectAll()));
+ }
+
+ void FormatterSpinBox::mouseReleaseEvent(QMouseEvent *event){
+ this->selectAll();
+ }
diff --git a/app/gui/oven_control/formatterspinbox.h b/app/gui/oven_control/formatterspinbox.h
index 8ae6cc3..ba632fe 100644
--- a/app/gui/oven_control/formatterspinbox.h
+++ b/app/gui/oven_control/formatterspinbox.h
@@ -19,6 +19,10 @@ public:
QString textFromValue(int value) const Q_DECL_OVERRIDE;
void setFormatterWidth(int wid);
+
+ void focusInEvent(QFocusEvent *event);
+
+ void mouseReleaseEvent(QMouseEvent *event);
};
#endif // SPINBOX_H
diff --git a/app/gui/oven_control/oven_control.pro b/app/gui/oven_control/oven_control.pro
index e48983a..1d2c9d5 100644
--- a/app/gui/oven_control/oven_control.pro
+++ b/app/gui/oven_control/oven_control.pro
@@ -98,7 +98,8 @@ SOURCES += main.cpp\
modelsettingwindow.cpp \
gasmodelsettingwindow.cpp \
electricmodelsettingwindow.cpp \
- system.cpp
+ system.cpp \
+ servicepassinputdlg.cpp
HEADERS += mainwindow.h \
cook.h \
@@ -186,7 +187,8 @@ HEADERS += mainwindow.h \
modelsettingwindow.h \
gasmodelsettingwindow.h \
electricmodelsettingwindow.h \
- system.h
+ system.h \
+ servicepassinputdlg.h
FORMS += mainwindow.ui \
manualcookwindow.ui \
@@ -247,7 +249,8 @@ FORMS += mainwindow.ui \
configfavoritebutton.ui \
modelsettingwindow.ui \
gasmodelsettingwindow.ui \
- electricmodelsettingwindow.ui
+ electricmodelsettingwindow.ui \
+ servicepassinputdlg.ui
RESOURCES += \
resources.qrc
diff --git a/app/gui/oven_control/servicepassinputdlg.cpp b/app/gui/oven_control/servicepassinputdlg.cpp
new file mode 100644
index 0000000..5bd3dfa
--- /dev/null
+++ b/app/gui/oven_control/servicepassinputdlg.cpp
@@ -0,0 +1,33 @@
+#include "servicepassinputdlg.h"
+#include "ui_servicepassinputdlg.h"
+
+#define PASS_WORD "0000"
+
+ServicePassInputDlg::ServicePassInputDlg(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::ServicePassInputDlg)
+{
+ ui->setupUi(this);
+ setWindowFlags(Qt::FramelessWindowHint);
+ setAttribute(Qt::WA_NoSystemBackground);
+ setAttribute(Qt::WA_TranslucentBackground);
+ setAttribute(Qt::WA_DeleteOnClose);
+}
+
+ServicePassInputDlg::~ServicePassInputDlg()
+{
+ delete ui;
+}
+
+void ServicePassInputDlg::on_ctrBtnOk_clicked()
+{
+ if(ui->lineEdit->text() == PASS_WORD){
+ accept();
+ }
+ else reject();
+}
+
+void ServicePassInputDlg::on_ctrBtnCancel_clicked()
+{
+ reject();
+}
diff --git a/app/gui/oven_control/servicepassinputdlg.h b/app/gui/oven_control/servicepassinputdlg.h
new file mode 100644
index 0000000..df17bbb
--- /dev/null
+++ b/app/gui/oven_control/servicepassinputdlg.h
@@ -0,0 +1,27 @@
+#ifndef SERVICEPASSINPUTDLG_H
+#define SERVICEPASSINPUTDLG_H
+
+#include
+
+namespace Ui {
+class ServicePassInputDlg;
+}
+
+class ServicePassInputDlg : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit ServicePassInputDlg(QWidget *parent = 0);
+ ~ServicePassInputDlg();
+
+private slots:
+ void on_ctrBtnOk_clicked();
+
+ void on_ctrBtnCancel_clicked();
+
+private:
+ Ui::ServicePassInputDlg *ui;
+};
+
+#endif // SERVICEPASSINPUTDLG_H
diff --git a/app/gui/oven_control/servicepassinputdlg.ui b/app/gui/oven_control/servicepassinputdlg.ui
new file mode 100644
index 0000000..e1f23a8
--- /dev/null
+++ b/app/gui/oven_control/servicepassinputdlg.ui
@@ -0,0 +1,259 @@
+
+
+ ServicePassInputDlg
+
+
+
+ 0
+ 0
+ 900
+ 1600
+
+
+
+ Dialog
+
+
+ #ConfigDateTimeDlg{
+ /*background-color : transparent;*/
+}
+
+#centralwidget{
+ background-image : url(:/images/background/popup/913.png);
+}
+
+QLabel {
+ color : white;
+}
+QLineEdit{
+ background-color : transparent;
+ color : white;
+}
+
+QSpinBox{
+ background-color : transparent;
+ color : white;
+}
+
+QPushButton{
+ border-color : transparent;
+ background-color : transparent;
+ color : white;
+}
+QPushButton::pressed, QPushButton::focus{
+ color : yellow;
+}
+
+
+
+
+ 0
+ 425
+ 900
+ 1025
+
+
+
+
+
+ 0
+ 0
+ 901
+ 441
+
+
+
+
+ 0
+
+
+ QLayout::SetDefaultConstraint
+
+
+ 30
+
+ -
+
+
+
+ 16777215
+ 94
+
+
+
+
+ 나눔고딕
+ 18
+ 75
+ true
+
+
+
+ color : white;
+
+
+
+
+
+ :/images/config/051_password_icon.png
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+
+ 16777215
+ 40
+
+
+
+
+ 나눔고딕
+ 10
+ 75
+ true
+
+
+
+ color : white;
+
+
+ 서비스
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ 20
+
+
+ 30
+
+
+ 20
+
+
+ 13
+
+
+ 0
+
+
-
+
+
+
+ 30
+
+
+
+ QLineEdit[echoMode="2"] {
+ lineedit-password-character: 8251;
+ }
+
+
+ 9999
+
+
+ QLineEdit::Password
+
+
+ Qt::AlignCenter
+
+
+
+
+
+ -
+
+
+ 10
+
+
+ 10
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 나눔고딕
+ 12
+ true
+
+
+
+ 취소
+
+
+ true
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 나눔고딕
+ 12
+ true
+
+
+
+ 확인
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+ 0
+ 425
+ 900
+ 600
+
+
+
+
+
+
+
+ KeyboardWidget
+ QWidget
+
+ 1
+
+
+
+
+
+
+