Commit be7d2a6253b452fa29e07a25477adffc666a55c7
1 parent
79810624a1
Exists in
master
and in
2 other branches
엔코더 기능 구현
- 키보드 기능 엔코더 구현(focusInKeyboard API 사용) - 날짜와 시간 적용
Showing
14 changed files
with
743 additions
and
257 deletions
Show diff stats
app/gui/oven_control/configdatetimedlg.cpp
1 | #include <QDateTime> | 1 | #include <QDateTime> |
2 | +#include <QKeyEvent> | ||
2 | #include "configdatetimedlg.h" | 3 | #include "configdatetimedlg.h" |
3 | #include "ui_configdatetimedlg.h" | 4 | #include "ui_configdatetimedlg.h" |
4 | #include "system.h" | 5 | #include "system.h" |
@@ -12,6 +13,8 @@ ConfigDateTimeDlg::ConfigDateTimeDlg(QWidget *parent) : | @@ -12,6 +13,8 @@ ConfigDateTimeDlg::ConfigDateTimeDlg(QWidget *parent) : | ||
12 | ui->setupUi(this); | 13 | ui->setupUi(this); |
13 | this->setWindowFlags( Qt::FramelessWindowHint); | 14 | this->setWindowFlags( Qt::FramelessWindowHint); |
14 | this->setAttribute( Qt::WA_DeleteOnClose); | 15 | this->setAttribute( Qt::WA_DeleteOnClose); |
16 | + qApp->setActiveWindow(this); | ||
17 | + this->setFocus(); | ||
15 | 18 | ||
16 | foreach (QPushButton *button, findChildren<QPushButton *>()) | 19 | foreach (QPushButton *button, findChildren<QPushButton *>()) |
17 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); | 20 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); |
@@ -25,6 +28,28 @@ ConfigDateTimeDlg::ConfigDateTimeDlg(QWidget *parent) : | @@ -25,6 +28,28 @@ ConfigDateTimeDlg::ConfigDateTimeDlg(QWidget *parent) : | ||
25 | ui->ctrSpBxDay->setValue(dt_.day()); | 28 | ui->ctrSpBxDay->setValue(dt_.day()); |
26 | ui->ctrSpBxHour->setValue(tm_.hour()); | 29 | ui->ctrSpBxHour->setValue(tm_.hour()); |
27 | ui->ctrSpBxMin->setValue(tm_.minute()); | 30 | ui->ctrSpBxMin->setValue(tm_.minute()); |
31 | + | ||
32 | + ui->ctrSpBxYear->setFocus(); | ||
33 | + m_bInputState = true; | ||
34 | + | ||
35 | + | ||
36 | + connect(ui->keyboardwidget, SIGNAL(onOkKeyClicked()), this, SLOT(on_keyEnter_clicked())); | ||
37 | + connect(ui->keyboardwidget, SIGNAL(onCancelKeyClicked()), this, SLOT(on_keyCancel_clicked())); | ||
38 | + | ||
39 | + m_pMapperSpins = new QSignalMapper(this); | ||
40 | + m_pMapperSpins->setMapping(ui->ctrSpBxYear, ui->ctrSpBxYear); | ||
41 | + m_pMapperSpins->setMapping(ui->ctrSpBxMonth, ui->ctrSpBxMonth); | ||
42 | + m_pMapperSpins->setMapping(ui->ctrSpBxDay, ui->ctrSpBxDay); | ||
43 | + m_pMapperSpins->setMapping(ui->ctrSpBxHour, ui->ctrSpBxHour); | ||
44 | + m_pMapperSpins->setMapping(ui->ctrSpBxMin, ui->ctrSpBxMin); | ||
45 | + | ||
46 | + connect(ui->ctrSpBxYear, SIGNAL(focusInEdit()), m_pMapperSpins, SLOT(map())); | ||
47 | + connect(ui->ctrSpBxMonth, SIGNAL(focusInEdit()), m_pMapperSpins, SLOT(map())); | ||
48 | + connect(ui->ctrSpBxDay, SIGNAL(focusInEdit()), m_pMapperSpins, SLOT(map())); | ||
49 | + connect(ui->ctrSpBxHour, SIGNAL(focusInEdit()), m_pMapperSpins, SLOT(map())); | ||
50 | + connect(ui->ctrSpBxMin, SIGNAL(focusInEdit()), m_pMapperSpins, SLOT(map())); | ||
51 | + | ||
52 | + connect(m_pMapperSpins, SIGNAL(mapped(QWidget*)), this, SLOT(on_focusInSpinBox(QWidget*))); | ||
28 | } | 53 | } |
29 | 54 | ||
30 | ConfigDateTimeDlg::~ConfigDateTimeDlg() | 55 | ConfigDateTimeDlg::~ConfigDateTimeDlg() |
@@ -55,3 +80,69 @@ void ConfigDateTimeDlg::on_ctrBtnCancel_clicked() | @@ -55,3 +80,69 @@ void ConfigDateTimeDlg::on_ctrBtnCancel_clicked() | ||
55 | { | 80 | { |
56 | this->reject(); | 81 | this->reject(); |
57 | } | 82 | } |
83 | + | ||
84 | +void ConfigDateTimeDlg::keyPressEvent(QKeyEvent *event){ | ||
85 | + int i = 0; | ||
86 | + switch (event->key()) | ||
87 | + { | ||
88 | + case 0x01000030: // Turn left | ||
89 | + if(focusWidget() == ui->ctrSpBxYear) ui->ctrBtnCancel->setFocus(); | ||
90 | + else focusPreviousChild(); | ||
91 | + break; | ||
92 | + case 0x01000031: // Push | ||
93 | + | ||
94 | + break; | ||
95 | + case 0x01000032: // Turn right | ||
96 | + if(focusWidget() == ui->ctrBtnCancel) ui->ctrSpBxYear->setFocus(); | ||
97 | + else focusNextChild(); | ||
98 | + | ||
99 | + break; | ||
100 | + } | ||
101 | +} | ||
102 | + | ||
103 | +void ConfigDateTimeDlg::keyReleaseEvent(QKeyEvent *event){ | ||
104 | + int i = 0; | ||
105 | + switch (event->key()) | ||
106 | + { | ||
107 | + case 0x01000030: // Turn left | ||
108 | + if(focusWidget() == ui->ctrSpBxYear) ui->ctrBtnCancel->setFocus(); | ||
109 | + else focusPreviousChild(); | ||
110 | + break; | ||
111 | + case 0x01000031: // Push | ||
112 | + { | ||
113 | + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget()); | ||
114 | + if(btn != NULL){ | ||
115 | + btn->click(); | ||
116 | + } | ||
117 | + else{ | ||
118 | + QSpinBox *spbx = qobject_cast<QSpinBox*>(focusWidget()); | ||
119 | + qDebug() << "grab keyboard"; | ||
120 | + if(spbx != NULL) ui->keyboardwidget->focusInKeyboard(); | ||
121 | + } | ||
122 | + break; | ||
123 | + } | ||
124 | + case 0x01000032: // Turn right | ||
125 | + if(focusWidget() == ui->ctrBtnCancel) ui->ctrSpBxYear->setFocus(); | ||
126 | + else focusNextChild(); | ||
127 | + break; | ||
128 | + } | ||
129 | +} | ||
130 | + | ||
131 | +void ConfigDateTimeDlg::on_keyCancel_clicked(){ | ||
132 | + QSpinBox *spbx = qobject_cast<QSpinBox*>(focusWidget()); | ||
133 | + if(spbx != NULL){ | ||
134 | + spbx->setValue(m_nFocusValue); | ||
135 | + } | ||
136 | + ui->keyboardwidget->focusOutKeyboard(); | ||
137 | +} | ||
138 | + | ||
139 | +void ConfigDateTimeDlg::on_keyEnter_clicked(){ | ||
140 | + ui->keyboardwidget->focusOutKeyboard(); | ||
141 | +} | ||
142 | + | ||
143 | +void ConfigDateTimeDlg::on_focusInSpinBox(QWidget *widget){ | ||
144 | + QSpinBox *spbx = qobject_cast<QSpinBox*>(widget); | ||
145 | + if(spbx != NULL){ | ||
146 | + m_nFocusValue = spbx->value(); | ||
147 | + } | ||
148 | +} |
app/gui/oven_control/configdatetimedlg.h
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | #define CONFIGDATETIMEDLG_H | 2 | #define CONFIGDATETIMEDLG_H |
3 | 3 | ||
4 | #include <QDialog> | 4 | #include <QDialog> |
5 | +#include <QSignalMapper> | ||
5 | 6 | ||
6 | 7 | ||
7 | namespace Ui { | 8 | namespace Ui { |
@@ -24,8 +25,21 @@ private slots: | @@ -24,8 +25,21 @@ private slots: | ||
24 | 25 | ||
25 | void on_ctrBtnCancel_clicked(); | 26 | void on_ctrBtnCancel_clicked(); |
26 | 27 | ||
28 | + void on_keyCancel_clicked(); | ||
29 | + void on_keyEnter_clicked(); | ||
30 | + | ||
31 | + void on_focusInSpinBox(QWidget* widget); | ||
32 | + | ||
33 | +protected: | ||
34 | + void keyReleaseEvent(QKeyEvent* event); | ||
35 | + void keyPressEvent(QKeyEvent* event); | ||
36 | + | ||
37 | + | ||
27 | private: | 38 | private: |
28 | Ui::ConfigDateTimeDlg *ui; | 39 | Ui::ConfigDateTimeDlg *ui; |
40 | + bool m_bInputState; | ||
41 | + QSignalMapper* m_pMapperSpins; | ||
42 | + int m_nFocusValue; | ||
29 | }; | 43 | }; |
30 | 44 | ||
31 | #endif // CONFIGDATETIMEDLG_H | 45 | #endif // CONFIGDATETIMEDLG_H |
app/gui/oven_control/configdatetimedlg.ui
@@ -483,6 +483,15 @@ QPushButton::pressed, QPushButton::focus{ | @@ -483,6 +483,15 @@ QPushButton::pressed, QPushButton::focus{ | ||
483 | <header>formatterspinbox.h</header> | 483 | <header>formatterspinbox.h</header> |
484 | </customwidget> | 484 | </customwidget> |
485 | </customwidgets> | 485 | </customwidgets> |
486 | + <tabstops> | ||
487 | + <tabstop>ctrSpBxYear</tabstop> | ||
488 | + <tabstop>ctrSpBxMonth</tabstop> | ||
489 | + <tabstop>ctrSpBxDay</tabstop> | ||
490 | + <tabstop>ctrSpBxHour</tabstop> | ||
491 | + <tabstop>ctrSpBxMin</tabstop> | ||
492 | + <tabstop>ctrBtnOk</tabstop> | ||
493 | + <tabstop>ctrBtnCancel</tabstop> | ||
494 | + </tabstops> | ||
486 | <resources/> | 495 | <resources/> |
487 | <connections/> | 496 | <connections/> |
488 | </ui> | 497 | </ui> |
app/gui/oven_control/electricmodelsettingwindow.cpp
@@ -13,6 +13,8 @@ ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) : | @@ -13,6 +13,8 @@ ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) : | ||
13 | ui->clockContainer->setParent(ui->upperStack); | 13 | ui->clockContainer->setParent(ui->upperStack); |
14 | setAttribute(Qt::WA_DeleteOnClose); | 14 | setAttribute(Qt::WA_DeleteOnClose); |
15 | 15 | ||
16 | + | ||
17 | + | ||
16 | foreach (QPushButton *button, findChildren<QPushButton *>()) | 18 | foreach (QPushButton *button, findChildren<QPushButton *>()) |
17 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); | 19 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); |
18 | 20 | ||
@@ -20,26 +22,27 @@ ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) : | @@ -20,26 +22,27 @@ ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) : | ||
20 | Define::config_item item; | 22 | Define::config_item item; |
21 | item = cfg->getConfigValue(Define::config_model); | 23 | item = cfg->getConfigValue(Define::config_model); |
22 | selitem = item.d32; | 24 | selitem = item.d32; |
23 | - m_ctrChkedbtn = NULL; | ||
24 | switch(selitem){ | 25 | switch(selitem){ |
25 | case Define::model_electric_10: | 26 | case Define::model_electric_10: |
26 | ui->e10Button->setChecked(true); | 27 | ui->e10Button->setChecked(true); |
27 | - m_ctrChkedbtn = ui->e10Button; | ||
28 | break; | 28 | break; |
29 | case Define::model_electric_20: | 29 | case Define::model_electric_20: |
30 | ui->e20Button->setChecked(true); | 30 | ui->e20Button->setChecked(true); |
31 | - m_ctrChkedbtn = ui->e20Button; | ||
32 | break; | 31 | break; |
33 | case Define::model_electric_24: | 32 | case Define::model_electric_24: |
34 | ui->e24Button->setChecked(true); | 33 | ui->e24Button->setChecked(true); |
35 | - m_ctrChkedbtn = ui->e24Button; | ||
36 | break; | 34 | break; |
37 | case Define::model_electric_40: | 35 | case Define::model_electric_40: |
38 | ui->e40Button->setChecked(true); | 36 | ui->e40Button->setChecked(true); |
39 | - m_ctrChkedbtn = ui->e40Button; | ||
40 | break; | 37 | break; |
41 | } | 38 | } |
42 | this->setFocus(); | 39 | this->setFocus(); |
40 | + m_vectorTabOrder.append(this); | ||
41 | + m_vectorTabOrder.append(ui->e10Button); | ||
42 | + m_vectorTabOrder.append(ui->e20Button); | ||
43 | + m_vectorTabOrder.append(ui->e24Button); | ||
44 | + m_vectorTabOrder.append(ui->e40Button); | ||
45 | + m_vectorTabOrder.append(ui->backButton); | ||
43 | } | 46 | } |
44 | 47 | ||
45 | ElectricModelSettingWindow::~ElectricModelSettingWindow() | 48 | ElectricModelSettingWindow::~ElectricModelSettingWindow() |
@@ -47,41 +50,6 @@ ElectricModelSettingWindow::~ElectricModelSettingWindow() | @@ -47,41 +50,6 @@ ElectricModelSettingWindow::~ElectricModelSettingWindow() | ||
47 | delete ui; | 50 | delete ui; |
48 | } | 51 | } |
49 | 52 | ||
50 | -void ElectricModelSettingWindow::keyPressEvent(QKeyEvent *event) | ||
51 | -{ | ||
52 | - switch (event->key()) | ||
53 | - { | ||
54 | - case 0x01000030: // Turn left | ||
55 | - onEncoderLeft(); | ||
56 | - break; | ||
57 | - case 0x01000031: // Push | ||
58 | - pushed = focusWidget(); | ||
59 | - break; | ||
60 | - case 0x01000032: // Turn right | ||
61 | - onEncoderRight(); | ||
62 | - break; | ||
63 | - } | ||
64 | -} | ||
65 | - | ||
66 | -void ElectricModelSettingWindow::keyReleaseEvent(QKeyEvent *event) | ||
67 | -{ | ||
68 | - switch (event->key()) | ||
69 | - { | ||
70 | - case 0x01000030: // Turn left | ||
71 | - onEncoderLeft(); | ||
72 | - break; | ||
73 | - case 0x01000031: // Push | ||
74 | - if (focusWidget() == pushed) | ||
75 | - onEncoderClicked(pushed); | ||
76 | - | ||
77 | - pushed = NULL; | ||
78 | - break; | ||
79 | - case 0x01000032: // Turn right | ||
80 | - onEncoderRight(); | ||
81 | - break; | ||
82 | - } | ||
83 | -} | ||
84 | - | ||
85 | void ElectricModelSettingWindow::setModel(Define::model_type model) | 53 | void ElectricModelSettingWindow::setModel(Define::model_type model) |
86 | { | 54 | { |
87 | Define::config_item item; | 55 | Define::config_item item; |
@@ -95,24 +63,18 @@ void ElectricModelSettingWindow::setModel(Define::model_type model) | @@ -95,24 +63,18 @@ void ElectricModelSettingWindow::setModel(Define::model_type model) | ||
95 | void ElectricModelSettingWindow::on_e10Button_clicked() | 63 | void ElectricModelSettingWindow::on_e10Button_clicked() |
96 | { | 64 | { |
97 | //setModel(Define::model_electric_10); | 65 | //setModel(Define::model_electric_10); |
98 | - if(m_ctrChkedbtn != NULL) m_ctrChkedbtn->setChecked(false); | ||
99 | - m_ctrChkedbtn = ui->e10Button; | ||
100 | selitem = Define::model_electric_10; | 66 | selitem = Define::model_electric_10; |
101 | } | 67 | } |
102 | 68 | ||
103 | void ElectricModelSettingWindow::on_e20Button_clicked() | 69 | void ElectricModelSettingWindow::on_e20Button_clicked() |
104 | { | 70 | { |
105 | //setModel(Define::model_electric_20); | 71 | //setModel(Define::model_electric_20); |
106 | - if(m_ctrChkedbtn != NULL) m_ctrChkedbtn->setChecked(false); | ||
107 | - m_ctrChkedbtn = ui->e20Button; | ||
108 | selitem = Define::model_electric_20; | 72 | selitem = Define::model_electric_20; |
109 | } | 73 | } |
110 | 74 | ||
111 | void ElectricModelSettingWindow::on_e24Button_clicked() | 75 | void ElectricModelSettingWindow::on_e24Button_clicked() |
112 | { | 76 | { |
113 | //setModel(Define::model_electric_24); | 77 | //setModel(Define::model_electric_24); |
114 | - if(m_ctrChkedbtn != NULL) m_ctrChkedbtn->setChecked(false); | ||
115 | - m_ctrChkedbtn = ui->e24Button; | ||
116 | 78 | ||
117 | selitem = Define::model_electric_24; | 79 | selitem = Define::model_electric_24; |
118 | 80 | ||
@@ -121,8 +83,6 @@ void ElectricModelSettingWindow::on_e24Button_clicked() | @@ -121,8 +83,6 @@ void ElectricModelSettingWindow::on_e24Button_clicked() | ||
121 | void ElectricModelSettingWindow::on_e40Button_clicked() | 83 | void ElectricModelSettingWindow::on_e40Button_clicked() |
122 | { | 84 | { |
123 | //setModel(Define::model_electric_40); | 85 | //setModel(Define::model_electric_40); |
124 | - if(m_ctrChkedbtn != NULL) m_ctrChkedbtn->setChecked(false); | ||
125 | - m_ctrChkedbtn = ui->e40Button; | ||
126 | 86 | ||
127 | selitem = Define::model_electric_40; | 87 | selitem = Define::model_electric_40; |
128 | } | 88 | } |
@@ -144,19 +104,99 @@ void ElectricModelSettingWindow::on_backButton_clicked() | @@ -144,19 +104,99 @@ void ElectricModelSettingWindow::on_backButton_clicked() | ||
144 | close(); | 104 | close(); |
145 | } | 105 | } |
146 | 106 | ||
147 | -void ElectricModelSettingWindow::onEncoderLeft() | ||
148 | -{ | ||
149 | - focusPreviousChild(); | ||
150 | -} | 107 | +void ElectricModelSettingWindow::keyPressEvent(QKeyEvent *event){ |
108 | + int i = 0; | ||
109 | + switch (event->key()) | ||
110 | + { | ||
111 | + case 0x01000030: // Turn left | ||
112 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | ||
113 | + if(focusWidget() == m_vectorTabOrder[i]) break; | ||
114 | + } | ||
151 | 115 | ||
152 | -void ElectricModelSettingWindow::onEncoderRight() | ||
153 | -{ | ||
154 | - focusNextChild(); | 116 | + if(i==0){ |
117 | + i = m_vectorTabOrder.size()-1; | ||
118 | + m_vectorTabOrder[i]->setFocus(); | ||
119 | + } | ||
120 | + else if(i < m_vectorTabOrder.size()) { | ||
121 | + i = i - 1; | ||
122 | + m_vectorTabOrder[i]->setFocus(); | ||
123 | + } | ||
124 | + else{ | ||
125 | + i=0; | ||
126 | + m_vectorTabOrder[i]->setFocus(); | ||
127 | + } | ||
128 | + break; | ||
129 | + case 0x01000031: // Push | ||
130 | + | ||
131 | + break; | ||
132 | + case 0x01000032: // Turn right | ||
133 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | ||
134 | + if(focusWidget() == m_vectorTabOrder[i]) break; | ||
135 | + } | ||
136 | + | ||
137 | + if(i<m_vectorTabOrder.size()-1){ | ||
138 | + i+=1; | ||
139 | + m_vectorTabOrder[i]->setFocus(); | ||
140 | + } | ||
141 | + else if(i== (m_vectorTabOrder.size()-1)){ | ||
142 | + i=0; | ||
143 | + m_vectorTabOrder[i]->setFocus(); | ||
144 | + } | ||
145 | + else{ | ||
146 | + i=0; | ||
147 | + m_vectorTabOrder[i]->setFocus(); | ||
148 | + } | ||
149 | + break; | ||
150 | + } | ||
155 | } | 151 | } |
156 | 152 | ||
157 | -void ElectricModelSettingWindow::onEncoderClicked(QWidget *clicked) | ||
158 | -{ | ||
159 | - QPushButton *b = qobject_cast<QPushButton *>(clicked); | ||
160 | - if (b) | ||
161 | - b->click(); | 153 | +void ElectricModelSettingWindow::keyReleaseEvent(QKeyEvent *event){ |
154 | + int i = 0; | ||
155 | + switch (event->key()) | ||
156 | + { | ||
157 | + case 0x01000030: // Turn left | ||
158 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | ||
159 | + if(focusWidget() == m_vectorTabOrder[i]) break; | ||
160 | + } | ||
161 | + | ||
162 | + if(i==0){ | ||
163 | + i = m_vectorTabOrder.size()-1; | ||
164 | + m_vectorTabOrder[i]->setFocus(); | ||
165 | + } | ||
166 | + else if(i < m_vectorTabOrder.size()) { | ||
167 | + i = i - 1; | ||
168 | + m_vectorTabOrder[i]->setFocus(); | ||
169 | + } | ||
170 | + else{ | ||
171 | + i=0; | ||
172 | + m_vectorTabOrder[i]->setFocus(); | ||
173 | + } | ||
174 | + break; | ||
175 | + case 0x01000031: // Push | ||
176 | + { | ||
177 | + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget()); | ||
178 | + if(btn != NULL){ | ||
179 | + btn->click(); | ||
180 | + } | ||
181 | + break; | ||
182 | + } | ||
183 | + case 0x01000032: // Turn right | ||
184 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | ||
185 | + if(focusWidget() == m_vectorTabOrder[i]) break; | ||
186 | + } | ||
187 | + | ||
188 | + if(i<m_vectorTabOrder.size()-1){ | ||
189 | + i+=1; | ||
190 | + m_vectorTabOrder[i]->setFocus(); | ||
191 | + } | ||
192 | + else if(i== (m_vectorTabOrder.size()-1)){ | ||
193 | + i=0; | ||
194 | + m_vectorTabOrder[i]->setFocus(); | ||
195 | + } | ||
196 | + else{ | ||
197 | + i=0; | ||
198 | + m_vectorTabOrder[i]->setFocus(); | ||
199 | + } | ||
200 | + break; | ||
201 | + } | ||
162 | } | 202 | } |
app/gui/oven_control/electricmodelsettingwindow.h
@@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
3 | 3 | ||
4 | #include <QMainWindow> | 4 | #include <QMainWindow> |
5 | #include <QPushButton> | 5 | #include <QPushButton> |
6 | +#include <QKeyEvent> | ||
7 | +#include <QVector> | ||
6 | 8 | ||
7 | #include "config.h" | 9 | #include "config.h" |
8 | 10 | ||
@@ -37,12 +39,7 @@ private: | @@ -37,12 +39,7 @@ private: | ||
37 | int selitem; | 39 | int selitem; |
38 | 40 | ||
39 | QWidget *pushed = NULL; | 41 | QWidget *pushed = NULL; |
40 | - | ||
41 | - void onEncoderLeft(); | ||
42 | - void onEncoderRight(); | ||
43 | - void onEncoderClicked(QWidget *clicked); | ||
44 | - | ||
45 | - QPushButton *m_ctrChkedbtn; | 42 | + QVector<QWidget*> m_vectorTabOrder; |
46 | }; | 43 | }; |
47 | 44 | ||
48 | #endif // ELECTRICMODELSETTINGWINDOW_H | 45 | #endif // ELECTRICMODELSETTINGWINDOW_H |
app/gui/oven_control/electricmodelsettingwindow.ui
@@ -49,7 +49,7 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url( | @@ -49,7 +49,7 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url( | ||
49 | <bool>true</bool> | 49 | <bool>true</bool> |
50 | </property> | 50 | </property> |
51 | <property name="autoExclusive"> | 51 | <property name="autoExclusive"> |
52 | - <bool>false</bool> | 52 | + <bool>true</bool> |
53 | </property> | 53 | </property> |
54 | </widget> | 54 | </widget> |
55 | <widget class="QWidget" name="widget" native="true"> | 55 | <widget class="QWidget" name="widget" native="true"> |
@@ -183,7 +183,7 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url( | @@ -183,7 +183,7 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url( | ||
183 | <bool>true</bool> | 183 | <bool>true</bool> |
184 | </property> | 184 | </property> |
185 | <property name="autoExclusive"> | 185 | <property name="autoExclusive"> |
186 | - <bool>false</bool> | 186 | + <bool>true</bool> |
187 | </property> | 187 | </property> |
188 | </widget> | 188 | </widget> |
189 | <widget class="QLabel" name="label_15"> | 189 | <widget class="QLabel" name="label_15"> |
@@ -396,7 +396,7 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url( | @@ -396,7 +396,7 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url( | ||
396 | <bool>true</bool> | 396 | <bool>true</bool> |
397 | </property> | 397 | </property> |
398 | <property name="autoExclusive"> | 398 | <property name="autoExclusive"> |
399 | - <bool>false</bool> | 399 | + <bool>true</bool> |
400 | </property> | 400 | </property> |
401 | </widget> | 401 | </widget> |
402 | <widget class="QPushButton" name="e20Button"> | 402 | <widget class="QPushButton" name="e20Button"> |
@@ -433,7 +433,7 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url( | @@ -433,7 +433,7 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url( | ||
433 | <bool>true</bool> | 433 | <bool>true</bool> |
434 | </property> | 434 | </property> |
435 | <property name="autoExclusive"> | 435 | <property name="autoExclusive"> |
436 | - <bool>false</bool> | 436 | + <bool>true</bool> |
437 | </property> | 437 | </property> |
438 | </widget> | 438 | </widget> |
439 | <widget class="Line" name="line_3"> | 439 | <widget class="Line" name="line_3"> |
app/gui/oven_control/formatterspinbox.cpp
@@ -7,7 +7,6 @@ FormatterSpinBox::FormatterSpinBox(QWidget *parent) | @@ -7,7 +7,6 @@ FormatterSpinBox::FormatterSpinBox(QWidget *parent) | ||
7 | : QSpinBox(parent) | 7 | : QSpinBox(parent) |
8 | { | 8 | { |
9 | m_nwidth = 2; | 9 | m_nwidth = 2; |
10 | - | ||
11 | } | 10 | } |
12 | 11 | ||
13 | //! [1] | 12 | //! [1] |
@@ -31,9 +30,14 @@ FormatterSpinBox::FormatterSpinBox(QWidget *parent) | @@ -31,9 +30,14 @@ FormatterSpinBox::FormatterSpinBox(QWidget *parent) | ||
31 | } | 30 | } |
32 | 31 | ||
33 | void FormatterSpinBox::focusInEvent(QFocusEvent *event){ | 32 | void FormatterSpinBox::focusInEvent(QFocusEvent *event){ |
34 | - QTimer::singleShot(200,this,SLOT(selectAll())); | 33 | + qDebug() << "focus in"; |
34 | + if(event->reason() == Qt::MouseFocusReason) QTimer::singleShot(200,this,SLOT(selectAll())); | ||
35 | + else selectAll(); | ||
36 | + emit focusInEdit(); | ||
35 | } | 37 | } |
36 | 38 | ||
37 | - void FormatterSpinBox::mouseReleaseEvent(QMouseEvent *event){ | ||
38 | - this->selectAll(); | 39 | + void FormatterSpinBox::focusOutEvent(QFocusEvent *event){ |
40 | + QSpinBox::focusOutEvent(event); | ||
41 | + emit focusOutEdit(); | ||
39 | } | 42 | } |
43 | + |
app/gui/oven_control/formatterspinbox.h
@@ -12,6 +12,10 @@ class FormatterSpinBox : public QSpinBox | @@ -12,6 +12,10 @@ class FormatterSpinBox : public QSpinBox | ||
12 | private: | 12 | private: |
13 | int m_nwidth; | 13 | int m_nwidth; |
14 | 14 | ||
15 | +signals: | ||
16 | + void focusInEdit(void); | ||
17 | + void focusOutEdit(void); | ||
18 | + | ||
15 | public: | 19 | public: |
16 | explicit FormatterSpinBox(QWidget *parent = Q_NULLPTR); | 20 | explicit FormatterSpinBox(QWidget *parent = Q_NULLPTR); |
17 | 21 | ||
@@ -21,8 +25,7 @@ public: | @@ -21,8 +25,7 @@ public: | ||
21 | void setFormatterWidth(int wid); | 25 | void setFormatterWidth(int wid); |
22 | 26 | ||
23 | void focusInEvent(QFocusEvent *event); | 27 | void focusInEvent(QFocusEvent *event); |
24 | - | ||
25 | - void mouseReleaseEvent(QMouseEvent *event); | 28 | + void focusOutEvent(QFocusEvent *event); |
26 | }; | 29 | }; |
27 | 30 | ||
28 | #endif // SPINBOX_H | 31 | #endif // SPINBOX_H |
app/gui/oven_control/gasmodelsettingwindow.cpp
@@ -21,82 +21,50 @@ GasModelSettingWindow::GasModelSettingWindow(QWidget *parent) : | @@ -21,82 +21,50 @@ GasModelSettingWindow::GasModelSettingWindow(QWidget *parent) : | ||
21 | Define::config_item item; | 21 | Define::config_item item; |
22 | item = cfg->getConfigValue(Define::config_model); | 22 | item = cfg->getConfigValue(Define::config_model); |
23 | selitem = item.d32; | 23 | selitem = item.d32; |
24 | - m_ctrChkedBtn = NULL; | ||
25 | switch(item.d32){ | 24 | switch(item.d32){ |
26 | case Define::model_gas_lng_10: | 25 | case Define::model_gas_lng_10: |
27 | ui->lng10Button->setChecked(true); | 26 | ui->lng10Button->setChecked(true); |
28 | - m_ctrChkedBtn = ui->lng10Button; | ||
29 | break; | 27 | break; |
30 | case Define::model_gas_lng_20: | 28 | case Define::model_gas_lng_20: |
31 | ui->lng20Button->setChecked(true); | 29 | ui->lng20Button->setChecked(true); |
32 | - m_ctrChkedBtn = ui->lng20Button; | ||
33 | break; | 30 | break; |
34 | case Define::model_gas_lng_24: | 31 | case Define::model_gas_lng_24: |
35 | ui->lng24Button->setChecked(true); | 32 | ui->lng24Button->setChecked(true); |
36 | - m_ctrChkedBtn = ui->lng24Button; | ||
37 | break; | 33 | break; |
38 | case Define::model_gas_lng_40: | 34 | case Define::model_gas_lng_40: |
39 | ui->lng40Button->setChecked(true); | 35 | ui->lng40Button->setChecked(true); |
40 | - m_ctrChkedBtn = ui->lng40Button; | ||
41 | break; | 36 | break; |
42 | case Define::model_gas_lpg_10: | 37 | case Define::model_gas_lpg_10: |
43 | ui->lpg10Button->setChecked(true); | 38 | ui->lpg10Button->setChecked(true); |
44 | - m_ctrChkedBtn = ui->lpg10Button; | ||
45 | break; | 39 | break; |
46 | case Define::model_gas_lpg_20: | 40 | case Define::model_gas_lpg_20: |
47 | ui->lpg20Button->setChecked(true); | 41 | ui->lpg20Button->setChecked(true); |
48 | - m_ctrChkedBtn = ui->lpg20Button; | ||
49 | break; | 42 | break; |
50 | case Define::model_gas_lpg_24: | 43 | case Define::model_gas_lpg_24: |
51 | ui->lpg24Button->setChecked(true); | 44 | ui->lpg24Button->setChecked(true); |
52 | - m_ctrChkedBtn = ui->lpg24Button; | ||
53 | break; | 45 | break; |
54 | case Define::model_gas_lpg_40: | 46 | case Define::model_gas_lpg_40: |
55 | ui->lpg40Button->setChecked(true); | 47 | ui->lpg40Button->setChecked(true); |
56 | - m_ctrChkedBtn = ui->lpg40Button; | ||
57 | break; | 48 | break; |
58 | } | 49 | } |
59 | this->setFocus(); | 50 | this->setFocus(); |
60 | -} | ||
61 | 51 | ||
62 | -GasModelSettingWindow::~GasModelSettingWindow() | ||
63 | -{ | ||
64 | - delete ui; | ||
65 | -} | 52 | + m_vectorTabOrder.append(this); |
53 | + m_vectorTabOrder.append(ui->lpg10Button); | ||
54 | + m_vectorTabOrder.append(ui->lng10Button); | ||
55 | + m_vectorTabOrder.append(ui->lpg20Button); | ||
56 | + m_vectorTabOrder.append(ui->lng20Button); | ||
57 | + m_vectorTabOrder.append(ui->lpg24Button); | ||
58 | + m_vectorTabOrder.append(ui->lng24Button); | ||
59 | + m_vectorTabOrder.append(ui->lpg40Button); | ||
60 | + m_vectorTabOrder.append(ui->lng40Button); | ||
61 | + m_vectorTabOrder.append(ui->backButton); | ||
66 | 62 | ||
67 | -void GasModelSettingWindow::keyPressEvent(QKeyEvent *event) | ||
68 | -{ | ||
69 | - switch (event->key()) | ||
70 | - { | ||
71 | - case 0x01000030: // Turn left | ||
72 | - onEncoderLeft(); | ||
73 | - break; | ||
74 | - case 0x01000031: // Push | ||
75 | - pushed = focusWidget(); | ||
76 | - break; | ||
77 | - case 0x01000032: // Turn right | ||
78 | - onEncoderRight(); | ||
79 | - break; | ||
80 | - } | ||
81 | } | 63 | } |
82 | 64 | ||
83 | -void GasModelSettingWindow::keyReleaseEvent(QKeyEvent *event) | 65 | +GasModelSettingWindow::~GasModelSettingWindow() |
84 | { | 66 | { |
85 | - switch (event->key()) | ||
86 | - { | ||
87 | - case 0x01000030: // Turn left | ||
88 | - onEncoderLeft(); | ||
89 | - break; | ||
90 | - case 0x01000031: // Push | ||
91 | - if (focusWidget() == pushed) | ||
92 | - onEncoderClicked(pushed); | ||
93 | - | ||
94 | - pushed = NULL; | ||
95 | - break; | ||
96 | - case 0x01000032: // Turn right | ||
97 | - onEncoderRight(); | ||
98 | - break; | ||
99 | - } | 67 | + delete ui; |
100 | } | 68 | } |
101 | 69 | ||
102 | void GasModelSettingWindow::setModel(Define::model_type model) | 70 | void GasModelSettingWindow::setModel(Define::model_type model) |
@@ -112,71 +80,48 @@ void GasModelSettingWindow::setModel(Define::model_type model) | @@ -112,71 +80,48 @@ void GasModelSettingWindow::setModel(Define::model_type model) | ||
112 | void GasModelSettingWindow::on_lpg10Button_clicked() | 80 | void GasModelSettingWindow::on_lpg10Button_clicked() |
113 | { | 81 | { |
114 | //setModel(Define::model_gas_lpg_10); | 82 | //setModel(Define::model_gas_lpg_10); |
115 | - if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false); | ||
116 | - m_ctrChkedBtn = ui->lpg10Button; | ||
117 | selitem = Define::model_gas_lpg_10; | 83 | selitem = Define::model_gas_lpg_10; |
118 | } | 84 | } |
119 | 85 | ||
120 | void GasModelSettingWindow::on_lng10Button_clicked() | 86 | void GasModelSettingWindow::on_lng10Button_clicked() |
121 | { | 87 | { |
122 | //setModel(Define::model_gas_lng_10); | 88 | //setModel(Define::model_gas_lng_10); |
123 | - if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false); | ||
124 | - m_ctrChkedBtn = ui->lng10Button; | ||
125 | - | ||
126 | selitem = Define::model_gas_lng_10; | 89 | selitem = Define::model_gas_lng_10; |
127 | } | 90 | } |
128 | 91 | ||
129 | void GasModelSettingWindow::on_lpg20Button_clicked() | 92 | void GasModelSettingWindow::on_lpg20Button_clicked() |
130 | { | 93 | { |
131 | //setModel(Define::model_gas_lpg_20); | 94 | //setModel(Define::model_gas_lpg_20); |
132 | - if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false); | ||
133 | - m_ctrChkedBtn = ui->lpg20Button; | ||
134 | - | ||
135 | selitem = Define::model_gas_lpg_20; | 95 | selitem = Define::model_gas_lpg_20; |
136 | } | 96 | } |
137 | 97 | ||
138 | void GasModelSettingWindow::on_lng20Button_clicked() | 98 | void GasModelSettingWindow::on_lng20Button_clicked() |
139 | { | 99 | { |
140 | //setModel(Define::model_gas_lng_20); | 100 | //setModel(Define::model_gas_lng_20); |
141 | - if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false); | ||
142 | - m_ctrChkedBtn = ui->lng20Button; | ||
143 | - | ||
144 | selitem = Define::model_gas_lng_20; | 101 | selitem = Define::model_gas_lng_20; |
145 | } | 102 | } |
146 | 103 | ||
147 | void GasModelSettingWindow::on_lpg24Button_clicked() | 104 | void GasModelSettingWindow::on_lpg24Button_clicked() |
148 | { | 105 | { |
149 | //setModel(Define::model_gas_lpg_24); | 106 | //setModel(Define::model_gas_lpg_24); |
150 | - if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false); | ||
151 | - m_ctrChkedBtn = ui->lpg24Button; | ||
152 | - | ||
153 | selitem = Define::model_gas_lpg_24; | 107 | selitem = Define::model_gas_lpg_24; |
154 | } | 108 | } |
155 | 109 | ||
156 | void GasModelSettingWindow::on_lng24Button_clicked() | 110 | void GasModelSettingWindow::on_lng24Button_clicked() |
157 | { | 111 | { |
158 | //setModel(Define::model_gas_lng_24); | 112 | //setModel(Define::model_gas_lng_24); |
159 | - if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false); | ||
160 | - m_ctrChkedBtn = ui->lng24Button; | ||
161 | - | ||
162 | selitem = Define::model_gas_lng_24; | 113 | selitem = Define::model_gas_lng_24; |
163 | } | 114 | } |
164 | 115 | ||
165 | void GasModelSettingWindow::on_lpg40Button_clicked() | 116 | void GasModelSettingWindow::on_lpg40Button_clicked() |
166 | { | 117 | { |
167 | //setModel(Define::model_gas_lpg_40); | 118 | //setModel(Define::model_gas_lpg_40); |
168 | - if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false); | ||
169 | - m_ctrChkedBtn = ui->lpg40Button; | ||
170 | - | ||
171 | selitem = Define::model_gas_lpg_40; | 119 | selitem = Define::model_gas_lpg_40; |
172 | } | 120 | } |
173 | 121 | ||
174 | void GasModelSettingWindow::on_lng40Button_clicked() | 122 | void GasModelSettingWindow::on_lng40Button_clicked() |
175 | { | 123 | { |
176 | //setModel(Define::model_gas_lng_40); | 124 | //setModel(Define::model_gas_lng_40); |
177 | - if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false); | ||
178 | - m_ctrChkedBtn = ui->lng40Button; | ||
179 | - | ||
180 | selitem = Define::model_gas_lng_40; | 125 | selitem = Define::model_gas_lng_40; |
181 | } | 126 | } |
182 | 127 | ||
@@ -198,19 +143,100 @@ void GasModelSettingWindow::on_backButton_clicked() | @@ -198,19 +143,100 @@ void GasModelSettingWindow::on_backButton_clicked() | ||
198 | close(); | 143 | close(); |
199 | } | 144 | } |
200 | 145 | ||
201 | -void GasModelSettingWindow::onEncoderLeft() | ||
202 | -{ | ||
203 | - focusPreviousChild(); | ||
204 | -} | 146 | +void GasModelSettingWindow::keyPressEvent(QKeyEvent *event){ |
147 | + int i = 0; | ||
148 | + switch (event->key()) | ||
149 | + { | ||
150 | + case 0x01000030: // Turn left | ||
151 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | ||
152 | + if(focusWidget() == m_vectorTabOrder[i]) break; | ||
153 | + } | ||
205 | 154 | ||
206 | -void GasModelSettingWindow::onEncoderRight() | ||
207 | -{ | ||
208 | - focusNextChild(); | 155 | + if(i==0){ |
156 | + i = m_vectorTabOrder.size()-1; | ||
157 | + m_vectorTabOrder[i]->setFocus(); | ||
158 | + } | ||
159 | + else if(i < m_vectorTabOrder.size()) { | ||
160 | + i = i - 1; | ||
161 | + m_vectorTabOrder[i]->setFocus(); | ||
162 | + } | ||
163 | + else{ | ||
164 | + i=0; | ||
165 | + m_vectorTabOrder[i]->setFocus(); | ||
166 | + } | ||
167 | + break; | ||
168 | + case 0x01000031: // Push | ||
169 | + | ||
170 | + break; | ||
171 | + case 0x01000032: // Turn right | ||
172 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | ||
173 | + if(focusWidget() == m_vectorTabOrder[i]) break; | ||
174 | + } | ||
175 | + | ||
176 | + if(i<m_vectorTabOrder.size()-1){ | ||
177 | + i+=1; | ||
178 | + m_vectorTabOrder[i]->setFocus(); | ||
179 | + } | ||
180 | + else if(i== (m_vectorTabOrder.size()-1)){ | ||
181 | + i=0; | ||
182 | + m_vectorTabOrder[i]->setFocus(); | ||
183 | + } | ||
184 | + else{ | ||
185 | + i=0; | ||
186 | + m_vectorTabOrder[i]->setFocus(); | ||
187 | + } | ||
188 | + break; | ||
189 | + } | ||
209 | } | 190 | } |
210 | 191 | ||
211 | -void GasModelSettingWindow::onEncoderClicked(QWidget *clicked) | ||
212 | -{ | ||
213 | - QPushButton *b = qobject_cast<QPushButton *>(clicked); | ||
214 | - if (b) | ||
215 | - b->click(); | 192 | +void GasModelSettingWindow::keyReleaseEvent(QKeyEvent *event){ |
193 | + int i = 0; | ||
194 | + switch (event->key()) | ||
195 | + { | ||
196 | + case 0x01000030: // Turn left | ||
197 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | ||
198 | + if(focusWidget() == m_vectorTabOrder[i]) break; | ||
199 | + } | ||
200 | + | ||
201 | + if(i==0){ | ||
202 | + i = m_vectorTabOrder.size()-1; | ||
203 | + m_vectorTabOrder[i]->setFocus(); | ||
204 | + } | ||
205 | + else if(i < m_vectorTabOrder.size()) { | ||
206 | + i = i - 1; | ||
207 | + m_vectorTabOrder[i]->setFocus(); | ||
208 | + } | ||
209 | + else{ | ||
210 | + i=0; | ||
211 | + m_vectorTabOrder[i]->setFocus(); | ||
212 | + } | ||
213 | + break; | ||
214 | + case 0x01000031: // Push | ||
215 | + { | ||
216 | + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget()); | ||
217 | + if(btn != NULL){ | ||
218 | + btn->click(); | ||
219 | + } | ||
220 | + break; | ||
221 | + } | ||
222 | + case 0x01000032: // Turn right | ||
223 | + for(i = 0; i < m_vectorTabOrder.size();i++){ | ||
224 | + if(focusWidget() == m_vectorTabOrder[i]) break; | ||
225 | + } | ||
226 | + | ||
227 | + if(i<m_vectorTabOrder.size()-1){ | ||
228 | + i+=1; | ||
229 | + m_vectorTabOrder[i]->setFocus(); | ||
230 | + } | ||
231 | + else if(i== (m_vectorTabOrder.size()-1)){ | ||
232 | + i=0; | ||
233 | + m_vectorTabOrder[i]->setFocus(); | ||
234 | + } | ||
235 | + else{ | ||
236 | + i=0; | ||
237 | + m_vectorTabOrder[i]->setFocus(); | ||
238 | + } | ||
239 | + break; | ||
240 | + } | ||
216 | } | 241 | } |
242 | + |
app/gui/oven_control/gasmodelsettingwindow.h
@@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
3 | 3 | ||
4 | #include <QMainWindow> | 4 | #include <QMainWindow> |
5 | #include <QPushButton> | 5 | #include <QPushButton> |
6 | +#include <QVector> | ||
7 | +#include <QKeyEvent> | ||
6 | 8 | ||
7 | #include "config.h" | 9 | #include "config.h" |
8 | 10 | ||
@@ -40,11 +42,7 @@ private: | @@ -40,11 +42,7 @@ private: | ||
40 | uint32_t selitem; | 42 | uint32_t selitem; |
41 | 43 | ||
42 | QWidget *pushed = NULL; | 44 | QWidget *pushed = NULL; |
43 | - | ||
44 | - void onEncoderLeft(); | ||
45 | - void onEncoderRight(); | ||
46 | - void onEncoderClicked(QWidget *clicked); | ||
47 | - QPushButton* m_ctrChkedBtn; | 45 | + QVector<QWidget*> m_vectorTabOrder; |
48 | }; | 46 | }; |
49 | 47 | ||
50 | #endif // GASMODELSETTINGWINDOW_H | 48 | #endif // GASMODELSETTINGWINDOW_H |
app/gui/oven_control/gasmodelsettingwindow.ui
@@ -49,7 +49,7 @@ QPushButton:pressed, QPushButton::checked , QPushButton:focus{ border-image: url | @@ -49,7 +49,7 @@ QPushButton:pressed, QPushButton::checked , QPushButton:focus{ border-image: url | ||
49 | <bool>true</bool> | 49 | <bool>true</bool> |
50 | </property> | 50 | </property> |
51 | <property name="autoExclusive"> | 51 | <property name="autoExclusive"> |
52 | - <bool>false</bool> | 52 | + <bool>true</bool> |
53 | </property> | 53 | </property> |
54 | </widget> | 54 | </widget> |
55 | <widget class="QWidget" name="widget" native="true"> | 55 | <widget class="QWidget" name="widget" native="true"> |
@@ -196,7 +196,7 @@ QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url | @@ -196,7 +196,7 @@ QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url | ||
196 | <bool>true</bool> | 196 | <bool>true</bool> |
197 | </property> | 197 | </property> |
198 | <property name="autoExclusive"> | 198 | <property name="autoExclusive"> |
199 | - <bool>false</bool> | 199 | + <bool>true</bool> |
200 | </property> | 200 | </property> |
201 | </widget> | 201 | </widget> |
202 | <widget class="QPushButton" name="lng20Button"> | 202 | <widget class="QPushButton" name="lng20Button"> |
@@ -233,7 +233,7 @@ QPushButton:pressed , QPushButton::checked, QPushButton:focus { border-image: ur | @@ -233,7 +233,7 @@ QPushButton:pressed , QPushButton::checked, QPushButton:focus { border-image: ur | ||
233 | <bool>true</bool> | 233 | <bool>true</bool> |
234 | </property> | 234 | </property> |
235 | <property name="autoExclusive"> | 235 | <property name="autoExclusive"> |
236 | - <bool>false</bool> | 236 | + <bool>true</bool> |
237 | </property> | 237 | </property> |
238 | </widget> | 238 | </widget> |
239 | <widget class="QPushButton" name="lpg24Button"> | 239 | <widget class="QPushButton" name="lpg24Button"> |
@@ -270,7 +270,7 @@ QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url | @@ -270,7 +270,7 @@ QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url | ||
270 | <bool>true</bool> | 270 | <bool>true</bool> |
271 | </property> | 271 | </property> |
272 | <property name="autoExclusive"> | 272 | <property name="autoExclusive"> |
273 | - <bool>false</bool> | 273 | + <bool>true</bool> |
274 | </property> | 274 | </property> |
275 | </widget> | 275 | </widget> |
276 | <widget class="QLabel" name="label_15"> | 276 | <widget class="QLabel" name="label_15"> |
@@ -496,7 +496,7 @@ QPushButton:pressed, QPushButton::checked, QPushButton:focus{ border-image: url( | @@ -496,7 +496,7 @@ QPushButton:pressed, QPushButton::checked, QPushButton:focus{ border-image: url( | ||
496 | <bool>true</bool> | 496 | <bool>true</bool> |
497 | </property> | 497 | </property> |
498 | <property name="autoExclusive"> | 498 | <property name="autoExclusive"> |
499 | - <bool>false</bool> | 499 | + <bool>true</bool> |
500 | </property> | 500 | </property> |
501 | </widget> | 501 | </widget> |
502 | <widget class="QPushButton" name="lng10Button"> | 502 | <widget class="QPushButton" name="lng10Button"> |
@@ -533,7 +533,7 @@ QPushButton:pressed , QPushButton::checked, QPushButton:focus{ border-image: url | @@ -533,7 +533,7 @@ QPushButton:pressed , QPushButton::checked, QPushButton:focus{ border-image: url | ||
533 | <bool>true</bool> | 533 | <bool>true</bool> |
534 | </property> | 534 | </property> |
535 | <property name="autoExclusive"> | 535 | <property name="autoExclusive"> |
536 | - <bool>false</bool> | 536 | + <bool>true</bool> |
537 | </property> | 537 | </property> |
538 | </widget> | 538 | </widget> |
539 | <widget class="Line" name="line_3"> | 539 | <widget class="Line" name="line_3"> |
@@ -619,7 +619,7 @@ QPushButton:pressed,QPushButton::checked, QPushButton:focus { border-image: url( | @@ -619,7 +619,7 @@ QPushButton:pressed,QPushButton::checked, QPushButton:focus { border-image: url( | ||
619 | <bool>true</bool> | 619 | <bool>true</bool> |
620 | </property> | 620 | </property> |
621 | <property name="autoExclusive"> | 621 | <property name="autoExclusive"> |
622 | - <bool>false</bool> | 622 | + <bool>true</bool> |
623 | </property> | 623 | </property> |
624 | </widget> | 624 | </widget> |
625 | <widget class="Line" name="line_8"> | 625 | <widget class="Line" name="line_8"> |
@@ -682,7 +682,7 @@ QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url | @@ -682,7 +682,7 @@ QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url | ||
682 | <bool>true</bool> | 682 | <bool>true</bool> |
683 | </property> | 683 | </property> |
684 | <property name="autoExclusive"> | 684 | <property name="autoExclusive"> |
685 | - <bool>false</bool> | 685 | + <bool>true</bool> |
686 | </property> | 686 | </property> |
687 | </widget> | 687 | </widget> |
688 | </widget> | 688 | </widget> |
app/gui/oven_control/keyboardwidget.cpp
@@ -5,52 +5,145 @@ | @@ -5,52 +5,145 @@ | ||
5 | 5 | ||
6 | #include "soundplayer.h" | 6 | #include "soundplayer.h" |
7 | 7 | ||
8 | +static const QString m_mapKeyboard[] = { | ||
9 | + "1", | ||
10 | + "2", | ||
11 | + "3", | ||
12 | + "4", | ||
13 | + "5", | ||
14 | + "6", | ||
15 | + "7", | ||
16 | + "8", | ||
17 | + "9", | ||
18 | + "0", | ||
19 | + "Q", | ||
20 | + "W", | ||
21 | + "E", | ||
22 | + "R", | ||
23 | + "T", | ||
24 | + "Y", | ||
25 | + "U", | ||
26 | + "I", | ||
27 | + "O", | ||
28 | + "P", | ||
29 | + "A", | ||
30 | + "S", | ||
31 | + "D", | ||
32 | + "F", | ||
33 | + "G", | ||
34 | + "H", | ||
35 | + "J", | ||
36 | + "K", | ||
37 | + "L", | ||
38 | + "Z", | ||
39 | + "X", | ||
40 | + "C", | ||
41 | + "V", | ||
42 | + "B", | ||
43 | + "N", | ||
44 | + "M", | ||
45 | + "-", | ||
46 | + ",", | ||
47 | + " " | ||
48 | +}; | ||
49 | + | ||
50 | + | ||
51 | + | ||
8 | KeyboardWidget::KeyboardWidget(QWidget *parent) : | 52 | KeyboardWidget::KeyboardWidget(QWidget *parent) : |
9 | QWidget(parent), | 53 | QWidget(parent), |
10 | ui(new Ui::KeyboardWidget) | 54 | ui(new Ui::KeyboardWidget) |
11 | { | 55 | { |
12 | ui->setupUi(this); | 56 | ui->setupUi(this); |
57 | + | ||
58 | + m_pCurCheckedBtn = NULL; | ||
59 | + m_vectorTabOrder.append(ui->pushButton_1); | ||
60 | + m_vectorTabOrder.append(ui->pushButton_2); | ||
61 | + m_vectorTabOrder.append(ui->pushButton_3); | ||
62 | + m_vectorTabOrder.append(ui->pushButton_4); | ||
63 | + m_vectorTabOrder.append(ui->pushButton_5); | ||
64 | + m_vectorTabOrder.append(ui->pushButton_6); | ||
65 | + m_vectorTabOrder.append(ui->pushButton_7); | ||
66 | + m_vectorTabOrder.append(ui->pushButton_8); | ||
67 | + m_vectorTabOrder.append(ui->pushButton_9); | ||
68 | + m_vectorTabOrder.append(ui->pushButton_10); | ||
69 | + m_vectorTabOrder.append(ui->pushButton_11); | ||
70 | + m_vectorTabOrder.append(ui->pushButton_12); | ||
71 | + m_vectorTabOrder.append(ui->pushButton_13); | ||
72 | + m_vectorTabOrder.append(ui->pushButton_14); | ||
73 | + m_vectorTabOrder.append(ui->pushButton_15); | ||
74 | + m_vectorTabOrder.append(ui->pushButton_16); | ||
75 | + m_vectorTabOrder.append(ui->pushButton_17); | ||
76 | + m_vectorTabOrder.append(ui->pushButton_18); | ||
77 | + m_vectorTabOrder.append(ui->pushButton_19); | ||
78 | + m_vectorTabOrder.append(ui->pushButton_20); | ||
79 | + m_vectorTabOrder.append(ui->pushButton_21); | ||
80 | + m_vectorTabOrder.append(ui->pushButton_22); | ||
81 | + m_vectorTabOrder.append(ui->pushButton_23); | ||
82 | + m_vectorTabOrder.append(ui->pushButton_24); | ||
83 | + m_vectorTabOrder.append(ui->pushButton_25); | ||
84 | + m_vectorTabOrder.append(ui->pushButton_26); | ||
85 | + m_vectorTabOrder.append(ui->pushButton_27); | ||
86 | + m_vectorTabOrder.append(ui->pushButton_28); | ||
87 | + m_vectorTabOrder.append(ui->pushButton_29); | ||
88 | + m_vectorTabOrder.append(ui->pushButton_30); | ||
89 | + m_vectorTabOrder.append(ui->pushButton_31); | ||
90 | + m_vectorTabOrder.append(ui->pushButton_32); | ||
91 | + m_vectorTabOrder.append(ui->pushButton_33); | ||
92 | + m_vectorTabOrder.append(ui->pushButton_34); | ||
93 | + m_vectorTabOrder.append(ui->pushButton_35); | ||
94 | + m_vectorTabOrder.append(ui->pushButton_36); | ||
95 | + m_vectorTabOrder.append(ui->pushButton_37); | ||
96 | + m_vectorTabOrder.append(ui->pushButton_38); | ||
97 | + m_vectorTabOrder.append(ui->pushButton_39); | ||
98 | + m_vectorTabOrder.append(ui->pushButton_40); | ||
99 | + m_vectorTabOrder.append(ui->pushButton_41); | ||
100 | + m_vectorTabOrder.append(ui->pushButton_42); | ||
101 | + | ||
102 | + | ||
103 | + | ||
13 | m_pSignalMapper = new QSignalMapper(this); | 104 | m_pSignalMapper = new QSignalMapper(this); |
14 | 105 | ||
15 | - m_pSignalMapper->setMapping(ui->pushButton_1, tr("1")); | ||
16 | - m_pSignalMapper->setMapping(ui->pushButton_2, tr("2")); | ||
17 | - m_pSignalMapper->setMapping(ui->pushButton_3, tr("3")); | ||
18 | - m_pSignalMapper->setMapping(ui->pushButton_4, tr("4")); | ||
19 | - m_pSignalMapper->setMapping(ui->pushButton_5, tr("5")); | ||
20 | - m_pSignalMapper->setMapping(ui->pushButton_6, tr("6")); | ||
21 | - m_pSignalMapper->setMapping(ui->pushButton_7, tr("7")); | ||
22 | - m_pSignalMapper->setMapping(ui->pushButton_8, tr("8")); | ||
23 | - m_pSignalMapper->setMapping(ui->pushButton_9, tr("9")); | ||
24 | - m_pSignalMapper->setMapping(ui->pushButton_10, tr("0")); | ||
25 | - m_pSignalMapper->setMapping(ui->pushButton_11, tr("Q")); | ||
26 | - m_pSignalMapper->setMapping(ui->pushButton_12, tr("W")); | ||
27 | - m_pSignalMapper->setMapping(ui->pushButton_13, tr("E")); | ||
28 | - m_pSignalMapper->setMapping(ui->pushButton_14, tr("R")); | ||
29 | - m_pSignalMapper->setMapping(ui->pushButton_15, tr("T")); | ||
30 | - m_pSignalMapper->setMapping(ui->pushButton_16, tr("Y")); | ||
31 | - m_pSignalMapper->setMapping(ui->pushButton_17, tr("U")); | ||
32 | - m_pSignalMapper->setMapping(ui->pushButton_18, tr("I")); | ||
33 | - m_pSignalMapper->setMapping(ui->pushButton_19, tr("O")); | ||
34 | - m_pSignalMapper->setMapping(ui->pushButton_20, tr("P")); | ||
35 | - m_pSignalMapper->setMapping(ui->pushButton_21, tr("A")); | ||
36 | - m_pSignalMapper->setMapping(ui->pushButton_22, tr("S")); | ||
37 | - m_pSignalMapper->setMapping(ui->pushButton_23, tr("D")); | ||
38 | - m_pSignalMapper->setMapping(ui->pushButton_24, tr("F")); | ||
39 | - m_pSignalMapper->setMapping(ui->pushButton_25, tr("G")); | ||
40 | - m_pSignalMapper->setMapping(ui->pushButton_26, tr("H")); | ||
41 | - m_pSignalMapper->setMapping(ui->pushButton_27, tr("J")); | ||
42 | - m_pSignalMapper->setMapping(ui->pushButton_28, tr("K")); | ||
43 | - m_pSignalMapper->setMapping(ui->pushButton_29, tr("L")); | ||
44 | - m_pSignalMapper->setMapping(ui->pushButton_30, tr("Z")); | ||
45 | - m_pSignalMapper->setMapping(ui->pushButton_31, tr("X")); | ||
46 | - m_pSignalMapper->setMapping(ui->pushButton_32, tr("C")); | ||
47 | - m_pSignalMapper->setMapping(ui->pushButton_33, tr("V")); | ||
48 | - m_pSignalMapper->setMapping(ui->pushButton_34, tr("B")); | ||
49 | - m_pSignalMapper->setMapping(ui->pushButton_35, tr("N")); | ||
50 | - m_pSignalMapper->setMapping(ui->pushButton_36, tr("M")); | ||
51 | - m_pSignalMapper->setMapping(ui->pushButton_37, tr("-")); | ||
52 | - m_pSignalMapper->setMapping(ui->pushButton_38, tr(",")); | ||
53 | - m_pSignalMapper->setMapping(ui->pushButton_40, tr(" ")); | 106 | + m_pSignalMapper->setMapping(ui->pushButton_1, 0); |
107 | + m_pSignalMapper->setMapping(ui->pushButton_2, 1); | ||
108 | + m_pSignalMapper->setMapping(ui->pushButton_3, 2); | ||
109 | + m_pSignalMapper->setMapping(ui->pushButton_4, 3); | ||
110 | + m_pSignalMapper->setMapping(ui->pushButton_5, 4); | ||
111 | + m_pSignalMapper->setMapping(ui->pushButton_6, 5); | ||
112 | + m_pSignalMapper->setMapping(ui->pushButton_7, 6); | ||
113 | + m_pSignalMapper->setMapping(ui->pushButton_8, 7); | ||
114 | + m_pSignalMapper->setMapping(ui->pushButton_9, 8); | ||
115 | + m_pSignalMapper->setMapping(ui->pushButton_10, 9); | ||
116 | + m_pSignalMapper->setMapping(ui->pushButton_11, 10); | ||
117 | + m_pSignalMapper->setMapping(ui->pushButton_12, 11); | ||
118 | + m_pSignalMapper->setMapping(ui->pushButton_13, 12); | ||
119 | + m_pSignalMapper->setMapping(ui->pushButton_14, 13); | ||
120 | + m_pSignalMapper->setMapping(ui->pushButton_15, 14); | ||
121 | + m_pSignalMapper->setMapping(ui->pushButton_16, 15); | ||
122 | + m_pSignalMapper->setMapping(ui->pushButton_17, 16); | ||
123 | + m_pSignalMapper->setMapping(ui->pushButton_18, 17); | ||
124 | + m_pSignalMapper->setMapping(ui->pushButton_19, 18); | ||
125 | + m_pSignalMapper->setMapping(ui->pushButton_20, 19); | ||
126 | + m_pSignalMapper->setMapping(ui->pushButton_21, 20); | ||
127 | + m_pSignalMapper->setMapping(ui->pushButton_22, 21); | ||
128 | + m_pSignalMapper->setMapping(ui->pushButton_23, 22); | ||
129 | + m_pSignalMapper->setMapping(ui->pushButton_24, 23); | ||
130 | + m_pSignalMapper->setMapping(ui->pushButton_25, 24); | ||
131 | + m_pSignalMapper->setMapping(ui->pushButton_26, 25); | ||
132 | + m_pSignalMapper->setMapping(ui->pushButton_27, 26); | ||
133 | + m_pSignalMapper->setMapping(ui->pushButton_28, 27); | ||
134 | + m_pSignalMapper->setMapping(ui->pushButton_29, 28); | ||
135 | + m_pSignalMapper->setMapping(ui->pushButton_30, 29); | ||
136 | + m_pSignalMapper->setMapping(ui->pushButton_31, 30); | ||
137 | + m_pSignalMapper->setMapping(ui->pushButton_32, 31); | ||
138 | + m_pSignalMapper->setMapping(ui->pushButton_33, 32); | ||
139 | + m_pSignalMapper->setMapping(ui->pushButton_34, 33); | ||
140 | + m_pSignalMapper->setMapping(ui->pushButton_35, 34); | ||
141 | + m_pSignalMapper->setMapping(ui->pushButton_36, 35); | ||
142 | + m_pSignalMapper->setMapping(ui->pushButton_37, 36); | ||
143 | + m_pSignalMapper->setMapping(ui->pushButton_38, 37); | ||
144 | + m_pSignalMapper->setMapping(ui->pushButton_40, 38); | ||
145 | + | ||
146 | + | ||
54 | 147 | ||
55 | 148 | ||
56 | connect(ui->pushButton_1,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | 149 | connect(ui->pushButton_1,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); |
@@ -93,7 +186,7 @@ KeyboardWidget::KeyboardWidget(QWidget *parent) : | @@ -93,7 +186,7 @@ KeyboardWidget::KeyboardWidget(QWidget *parent) : | ||
93 | connect(ui->pushButton_38,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | 186 | connect(ui->pushButton_38,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); |
94 | connect(ui->pushButton_40,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); | 187 | connect(ui->pushButton_40,SIGNAL(clicked(bool)),m_pSignalMapper,SLOT(map())); |
95 | 188 | ||
96 | - connect(m_pSignalMapper,SIGNAL(mapped(QString)), this, SLOT(onKeyboardClicked(QString))); | 189 | + connect(m_pSignalMapper,SIGNAL(mapped(int)), this, SLOT(onKeyboardClicked(int))); |
97 | 190 | ||
98 | foreach (QPushButton *button, findChildren<QPushButton *>()) | 191 | foreach (QPushButton *button, findChildren<QPushButton *>()) |
99 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); | 192 | connect(button, &QPushButton::pressed, SoundPlayer::playClick); |
@@ -106,6 +199,10 @@ KeyboardWidget::~KeyboardWidget() | @@ -106,6 +199,10 @@ KeyboardWidget::~KeyboardWidget() | ||
106 | 199 | ||
107 | void KeyboardWidget::on_pushButton_41_clicked() | 200 | void KeyboardWidget::on_pushButton_41_clicked() |
108 | { | 201 | { |
202 | + if(m_pCurCheckedBtn != NULL) m_pCurCheckedBtn->setChecked(false); | ||
203 | + m_nCurTabPos = 40; | ||
204 | + m_pCurCheckedBtn = m_vectorTabOrder[m_nCurTabPos]; | ||
205 | + m_pCurCheckedBtn->setChecked(true); | ||
109 | QKeyEvent key(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier); | 206 | QKeyEvent key(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier); |
110 | QGuiApplication::sendEvent(QApplication::focusObject(),&key); | 207 | QGuiApplication::sendEvent(QApplication::focusObject(),&key); |
111 | emit onOkKeyClicked(); | 208 | emit onOkKeyClicked(); |
@@ -113,25 +210,87 @@ void KeyboardWidget::on_pushButton_41_clicked() | @@ -113,25 +210,87 @@ void KeyboardWidget::on_pushButton_41_clicked() | ||
113 | 210 | ||
114 | void KeyboardWidget::on_pushButton_42_clicked() | 211 | void KeyboardWidget::on_pushButton_42_clicked() |
115 | { | 212 | { |
213 | + if(m_pCurCheckedBtn != NULL) m_pCurCheckedBtn->setChecked(false); | ||
214 | + m_nCurTabPos = 41; | ||
215 | + m_pCurCheckedBtn = m_vectorTabOrder[m_nCurTabPos]; | ||
216 | + m_pCurCheckedBtn->setChecked(true); | ||
217 | + if(m_pCurCheckedBtn != NULL) m_pCurCheckedBtn->setChecked(false); | ||
116 | emit onCancelKeyClicked(); | 218 | emit onCancelKeyClicked(); |
117 | } | 219 | } |
118 | 220 | ||
119 | void KeyboardWidget::on_pushButton_39_clicked() | 221 | void KeyboardWidget::on_pushButton_39_clicked() |
120 | { | 222 | { |
121 | qDebug() << qApp->focusObject(); | 223 | qDebug() << qApp->focusObject(); |
224 | + if(m_pCurCheckedBtn != NULL) m_pCurCheckedBtn->setChecked(false); | ||
225 | + m_nCurTabPos = 38; | ||
226 | + m_pCurCheckedBtn = m_vectorTabOrder[m_nCurTabPos]; | ||
227 | + m_pCurCheckedBtn->setChecked(true); | ||
122 | QKeyEvent key(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier); | 228 | QKeyEvent key(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier); |
123 | QGuiApplication::sendEvent(QApplication::focusObject(),&key); | 229 | QGuiApplication::sendEvent(QApplication::focusObject(),&key); |
124 | emit onBackspaceKeyClicked(); | 230 | emit onBackspaceKeyClicked(); |
125 | } | 231 | } |
126 | 232 | ||
127 | -void KeyboardWidget::onKeyboardClicked(const QString in){ | 233 | +void KeyboardWidget::onKeyboardClicked(const int in){ |
128 | QInputMethodEvent event; | 234 | QInputMethodEvent event; |
129 | - event.setCommitString(in); | 235 | + qDebug()<< "keyboard clicked" << in; |
236 | + event.setCommitString(m_mapKeyboard[in]); | ||
237 | + if(m_pCurCheckedBtn != NULL) m_pCurCheckedBtn->setChecked(false); | ||
238 | + if( in < 38) m_nCurTabPos = in; | ||
239 | + else if( in == 38) m_nCurTabPos = 39; | ||
240 | + m_pCurCheckedBtn = m_vectorTabOrder[m_nCurTabPos]; | ||
241 | + m_pCurCheckedBtn->setChecked(true); | ||
130 | QGuiApplication::sendEvent(QApplication::focusObject(),&event); | 242 | QGuiApplication::sendEvent(QApplication::focusObject(),&event); |
131 | - emit onKeyboardClickSignal(in); | 243 | + emit onKeyboardClickSignal(m_mapKeyboard[in]); |
132 | } | 244 | } |
133 | 245 | ||
134 | void KeyboardWidget::on_pushButton_40_clicked() | 246 | void KeyboardWidget::on_pushButton_40_clicked() |
135 | { | 247 | { |
136 | emit onSpaceKeyClicked(); | 248 | emit onSpaceKeyClicked(); |
137 | } | 249 | } |
250 | + | ||
251 | +void KeyboardWidget::keyPressEvent(QKeyEvent *event){ | ||
252 | + | ||
253 | +} | ||
254 | + | ||
255 | +void KeyboardWidget::keyReleaseEvent(QKeyEvent *event){ | ||
256 | + switch (event->key()) | ||
257 | + { | ||
258 | + case 0x01000030: // Turn left | ||
259 | + if(m_nCurTabPos > 0 ) m_nCurTabPos--; | ||
260 | + else m_nCurTabPos = m_vectorTabOrder.size()-1; | ||
261 | + if(m_pCurCheckedBtn !=NULL) m_pCurCheckedBtn->setChecked(false); | ||
262 | + m_pCurCheckedBtn = m_vectorTabOrder[m_nCurTabPos]; | ||
263 | + m_pCurCheckedBtn->setChecked(true); | ||
264 | + break; | ||
265 | + case 0x01000031: // Push | ||
266 | + { | ||
267 | + if(m_pCurCheckedBtn != NULL){ | ||
268 | + m_pCurCheckedBtn->click(); | ||
269 | + } | ||
270 | + break; | ||
271 | + } | ||
272 | + case 0x01000032: // Turn right | ||
273 | + if(m_nCurTabPos < (m_vectorTabOrder.size() -1)) m_nCurTabPos++; | ||
274 | + else m_nCurTabPos=0; | ||
275 | + if(m_pCurCheckedBtn !=NULL) m_pCurCheckedBtn->setChecked(false); | ||
276 | + m_pCurCheckedBtn = m_vectorTabOrder[m_nCurTabPos]; | ||
277 | + m_pCurCheckedBtn->setChecked(true); | ||
278 | + break; | ||
279 | + } | ||
280 | +} | ||
281 | + | ||
282 | +void KeyboardWidget::focusInKeyboard(){ | ||
283 | + m_nCurTabPos = 0; | ||
284 | + if(m_pCurCheckedBtn != NULL) m_pCurCheckedBtn->setChecked(false); | ||
285 | + m_pCurCheckedBtn = m_vectorTabOrder[0]; | ||
286 | + m_pCurCheckedBtn->setChecked(true); | ||
287 | + this->grabKeyboard(); | ||
288 | +} | ||
289 | + | ||
290 | +void KeyboardWidget::focusOutKeyboard(){ | ||
291 | + m_nCurTabPos = 0; | ||
292 | + if(m_pCurCheckedBtn != NULL) m_pCurCheckedBtn->setChecked(false); | ||
293 | + this->releaseKeyboard(); | ||
294 | +} | ||
295 | + | ||
296 | + |
app/gui/oven_control/keyboardwidget.h
@@ -4,6 +4,9 @@ | @@ -4,6 +4,9 @@ | ||
4 | #include <QWidget> | 4 | #include <QWidget> |
5 | #include <QSignalMapper> | 5 | #include <QSignalMapper> |
6 | #include <QChar> | 6 | #include <QChar> |
7 | +#include <QVector> | ||
8 | +#include <QPushButton> | ||
9 | + | ||
7 | 10 | ||
8 | namespace Ui { | 11 | namespace Ui { |
9 | class KeyboardWidget; | 12 | class KeyboardWidget; |
@@ -34,12 +37,23 @@ signals: | @@ -34,12 +37,23 @@ signals: | ||
34 | void onSpaceKeyClicked(); | 37 | void onSpaceKeyClicked(); |
35 | 38 | ||
36 | public slots: | 39 | public slots: |
37 | - void onKeyboardClicked(const QString in); | 40 | + void onKeyboardClicked(int in); |
41 | + void focusInKeyboard(); | ||
42 | + void focusOutKeyboard(); | ||
43 | + | ||
44 | +protected: | ||
45 | + void keyPressEvent(QKeyEvent* event); | ||
46 | + void keyReleaseEvent(QKeyEvent* event); | ||
47 | + | ||
38 | 48 | ||
39 | private: | 49 | private: |
40 | Ui::KeyboardWidget *ui; | 50 | Ui::KeyboardWidget *ui; |
41 | 51 | ||
42 | QSignalMapper *m_pSignalMapper; | 52 | QSignalMapper *m_pSignalMapper; |
53 | + | ||
54 | + QVector<QPushButton*> m_vectorTabOrder; | ||
55 | + QPushButton* m_pCurCheckedBtn; | ||
56 | + int m_nCurTabPos; | ||
43 | }; | 57 | }; |
44 | 58 | ||
45 | #endif // KEYBOARDWIDGET_H | 59 | #endif // KEYBOARDWIDGET_H |
app/gui/oven_control/keyboardwidget.ui
@@ -49,12 +49,15 @@ | @@ -49,12 +49,15 @@ | ||
49 | </property> | 49 | </property> |
50 | <property name="styleSheet"> | 50 | <property name="styleSheet"> |
51 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a033.png);} | 51 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a033.png);} |
52 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a033_ov.png); } | 52 | +QPushButton:pressed, QPushButton:checked , QPushButton:checked{ border-image: url(:/images/keyboard/088_keyboard_a033_ov.png); } |
53 | </string> | 53 | </string> |
54 | </property> | 54 | </property> |
55 | <property name="text"> | 55 | <property name="text"> |
56 | <string/> | 56 | <string/> |
57 | </property> | 57 | </property> |
58 | + <property name="checkable"> | ||
59 | + <bool>true</bool> | ||
60 | + </property> | ||
58 | <property name="autoDefault"> | 61 | <property name="autoDefault"> |
59 | <bool>false</bool> | 62 | <bool>false</bool> |
60 | </property> | 63 | </property> |
@@ -79,12 +82,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a033_ov.p | @@ -79,12 +82,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a033_ov.p | ||
79 | </property> | 82 | </property> |
80 | <property name="styleSheet"> | 83 | <property name="styleSheet"> |
81 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a016.png);} | 84 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a016.png);} |
82 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a016_ov.png); } | 85 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a016_ov.png); } |
83 | </string> | 86 | </string> |
84 | </property> | 87 | </property> |
85 | <property name="text"> | 88 | <property name="text"> |
86 | <string/> | 89 | <string/> |
87 | </property> | 90 | </property> |
91 | + <property name="checkable"> | ||
92 | + <bool>true</bool> | ||
93 | + </property> | ||
88 | <property name="autoDefault"> | 94 | <property name="autoDefault"> |
89 | <bool>false</bool> | 95 | <bool>false</bool> |
90 | </property> | 96 | </property> |
@@ -109,12 +115,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a016_ov.p | @@ -109,12 +115,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a016_ov.p | ||
109 | </property> | 115 | </property> |
110 | <property name="styleSheet"> | 116 | <property name="styleSheet"> |
111 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a009.png);} | 117 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a009.png);} |
112 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a009_ov.png); } | 118 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a009_ov.png); } |
113 | </string> | 119 | </string> |
114 | </property> | 120 | </property> |
115 | <property name="text"> | 121 | <property name="text"> |
116 | <string/> | 122 | <string/> |
117 | </property> | 123 | </property> |
124 | + <property name="checkable"> | ||
125 | + <bool>true</bool> | ||
126 | + </property> | ||
118 | <property name="autoDefault"> | 127 | <property name="autoDefault"> |
119 | <bool>false</bool> | 128 | <bool>false</bool> |
120 | </property> | 129 | </property> |
@@ -139,12 +148,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a009_ov.p | @@ -139,12 +148,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a009_ov.p | ||
139 | </property> | 148 | </property> |
140 | <property name="styleSheet"> | 149 | <property name="styleSheet"> |
141 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a020.png);} | 150 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a020.png);} |
142 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a020_ov.png); } | 151 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a020_ov.png); } |
143 | </string> | 152 | </string> |
144 | </property> | 153 | </property> |
145 | <property name="text"> | 154 | <property name="text"> |
146 | <string/> | 155 | <string/> |
147 | </property> | 156 | </property> |
157 | + <property name="checkable"> | ||
158 | + <bool>true</bool> | ||
159 | + </property> | ||
148 | <property name="autoDefault"> | 160 | <property name="autoDefault"> |
149 | <bool>false</bool> | 161 | <bool>false</bool> |
150 | </property> | 162 | </property> |
@@ -169,12 +181,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a020_ov.p | @@ -169,12 +181,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a020_ov.p | ||
169 | </property> | 181 | </property> |
170 | <property name="styleSheet"> | 182 | <property name="styleSheet"> |
171 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a012.png);} | 183 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a012.png);} |
172 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a012_ov.png); } | 184 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a012_ov.png); } |
173 | </string> | 185 | </string> |
174 | </property> | 186 | </property> |
175 | <property name="text"> | 187 | <property name="text"> |
176 | <string/> | 188 | <string/> |
177 | </property> | 189 | </property> |
190 | + <property name="checkable"> | ||
191 | + <bool>true</bool> | ||
192 | + </property> | ||
178 | <property name="autoDefault"> | 193 | <property name="autoDefault"> |
179 | <bool>false</bool> | 194 | <bool>false</bool> |
180 | </property> | 195 | </property> |
@@ -199,12 +214,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a012_ov.p | @@ -199,12 +214,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a012_ov.p | ||
199 | </property> | 214 | </property> |
200 | <property name="styleSheet"> | 215 | <property name="styleSheet"> |
201 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a022.png);} | 216 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a022.png);} |
202 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a022_ov.png); } | 217 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a022_ov.png); } |
203 | </string> | 218 | </string> |
204 | </property> | 219 | </property> |
205 | <property name="text"> | 220 | <property name="text"> |
206 | <string/> | 221 | <string/> |
207 | </property> | 222 | </property> |
223 | + <property name="checkable"> | ||
224 | + <bool>true</bool> | ||
225 | + </property> | ||
208 | <property name="autoDefault"> | 226 | <property name="autoDefault"> |
209 | <bool>false</bool> | 227 | <bool>false</bool> |
210 | </property> | 228 | </property> |
@@ -229,12 +247,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a022_ov.p | @@ -229,12 +247,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a022_ov.p | ||
229 | </property> | 247 | </property> |
230 | <property name="styleSheet"> | 248 | <property name="styleSheet"> |
231 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a034.png);} | 249 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a034.png);} |
232 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a034_ov.png); } | 250 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a034_ov.png); } |
233 | </string> | 251 | </string> |
234 | </property> | 252 | </property> |
235 | <property name="text"> | 253 | <property name="text"> |
236 | <string/> | 254 | <string/> |
237 | </property> | 255 | </property> |
256 | + <property name="checkable"> | ||
257 | + <bool>true</bool> | ||
258 | + </property> | ||
238 | <property name="autoDefault"> | 259 | <property name="autoDefault"> |
239 | <bool>false</bool> | 260 | <bool>false</bool> |
240 | </property> | 261 | </property> |
@@ -259,12 +280,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a034_ov.p | @@ -259,12 +280,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a034_ov.p | ||
259 | </property> | 280 | </property> |
260 | <property name="styleSheet"> | 281 | <property name="styleSheet"> |
261 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a036.png);} | 282 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a036.png);} |
262 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a036_ov.png); } | 283 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a036_ov.png); } |
263 | </string> | 284 | </string> |
264 | </property> | 285 | </property> |
265 | <property name="text"> | 286 | <property name="text"> |
266 | <string/> | 287 | <string/> |
267 | </property> | 288 | </property> |
289 | + <property name="checkable"> | ||
290 | + <bool>true</bool> | ||
291 | + </property> | ||
268 | <property name="autoDefault"> | 292 | <property name="autoDefault"> |
269 | <bool>false</bool> | 293 | <bool>false</bool> |
270 | </property> | 294 | </property> |
@@ -289,12 +313,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a036_ov.p | @@ -289,12 +313,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a036_ov.p | ||
289 | </property> | 313 | </property> |
290 | <property name="styleSheet"> | 314 | <property name="styleSheet"> |
291 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a038.png);} | 315 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a038.png);} |
292 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a038_ov.png); } | 316 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a038_ov.png); } |
293 | </string> | 317 | </string> |
294 | </property> | 318 | </property> |
295 | <property name="text"> | 319 | <property name="text"> |
296 | <string/> | 320 | <string/> |
297 | </property> | 321 | </property> |
322 | + <property name="checkable"> | ||
323 | + <bool>true</bool> | ||
324 | + </property> | ||
298 | <property name="autoDefault"> | 325 | <property name="autoDefault"> |
299 | <bool>false</bool> | 326 | <bool>false</bool> |
300 | </property> | 327 | </property> |
@@ -319,12 +346,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a038_ov.p | @@ -319,12 +346,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a038_ov.p | ||
319 | </property> | 346 | </property> |
320 | <property name="styleSheet"> | 347 | <property name="styleSheet"> |
321 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a019.png);} | 348 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a019.png);} |
322 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a019_ov.png); } | 349 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a019_ov.png); } |
323 | </string> | 350 | </string> |
324 | </property> | 351 | </property> |
325 | <property name="text"> | 352 | <property name="text"> |
326 | <string/> | 353 | <string/> |
327 | </property> | 354 | </property> |
355 | + <property name="checkable"> | ||
356 | + <bool>true</bool> | ||
357 | + </property> | ||
328 | <property name="autoDefault"> | 358 | <property name="autoDefault"> |
329 | <bool>false</bool> | 359 | <bool>false</bool> |
330 | </property> | 360 | </property> |
@@ -349,12 +379,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a019_ov.p | @@ -349,12 +379,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a019_ov.p | ||
349 | </property> | 379 | </property> |
350 | <property name="styleSheet"> | 380 | <property name="styleSheet"> |
351 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a006.png);} | 381 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a006.png);} |
352 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a006_ov.png); } | 382 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a006_ov.png); } |
353 | </string> | 383 | </string> |
354 | </property> | 384 | </property> |
355 | <property name="text"> | 385 | <property name="text"> |
356 | <string/> | 386 | <string/> |
357 | </property> | 387 | </property> |
388 | + <property name="checkable"> | ||
389 | + <bool>true</bool> | ||
390 | + </property> | ||
358 | <property name="autoDefault"> | 391 | <property name="autoDefault"> |
359 | <bool>false</bool> | 392 | <bool>false</bool> |
360 | </property> | 393 | </property> |
@@ -379,12 +412,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a006_ov.p | @@ -379,12 +412,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a006_ov.p | ||
379 | </property> | 412 | </property> |
380 | <property name="styleSheet"> | 413 | <property name="styleSheet"> |
381 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a021.png);} | 414 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a021.png);} |
382 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a021_ov.png); } | 415 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a021_ov.png); } |
383 | </string> | 416 | </string> |
384 | </property> | 417 | </property> |
385 | <property name="text"> | 418 | <property name="text"> |
386 | <string/> | 419 | <string/> |
387 | </property> | 420 | </property> |
421 | + <property name="checkable"> | ||
422 | + <bool>true</bool> | ||
423 | + </property> | ||
388 | <property name="autoDefault"> | 424 | <property name="autoDefault"> |
389 | <bool>false</bool> | 425 | <bool>false</bool> |
390 | </property> | 426 | </property> |
@@ -409,12 +445,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a021_ov.p | @@ -409,12 +445,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a021_ov.p | ||
409 | </property> | 445 | </property> |
410 | <property name="styleSheet"> | 446 | <property name="styleSheet"> |
411 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a014.png);} | 447 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a014.png);} |
412 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a014_ov.png); } | 448 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a014_ov.png); } |
413 | </string> | 449 | </string> |
414 | </property> | 450 | </property> |
415 | <property name="text"> | 451 | <property name="text"> |
416 | <string/> | 452 | <string/> |
417 | </property> | 453 | </property> |
454 | + <property name="checkable"> | ||
455 | + <bool>true</bool> | ||
456 | + </property> | ||
418 | <property name="autoDefault"> | 457 | <property name="autoDefault"> |
419 | <bool>false</bool> | 458 | <bool>false</bool> |
420 | </property> | 459 | </property> |
@@ -439,12 +478,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a014_ov.p | @@ -439,12 +478,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a014_ov.p | ||
439 | </property> | 478 | </property> |
440 | <property name="styleSheet"> | 479 | <property name="styleSheet"> |
441 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a023.png);} | 480 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a023.png);} |
442 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a023_ov.png); } | 481 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a023_ov.png); } |
443 | </string> | 482 | </string> |
444 | </property> | 483 | </property> |
445 | <property name="text"> | 484 | <property name="text"> |
446 | <string/> | 485 | <string/> |
447 | </property> | 486 | </property> |
487 | + <property name="checkable"> | ||
488 | + <bool>true</bool> | ||
489 | + </property> | ||
448 | <property name="autoDefault"> | 490 | <property name="autoDefault"> |
449 | <bool>false</bool> | 491 | <bool>false</bool> |
450 | </property> | 492 | </property> |
@@ -469,12 +511,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a023_ov.p | @@ -469,12 +511,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a023_ov.p | ||
469 | </property> | 511 | </property> |
470 | <property name="styleSheet"> | 512 | <property name="styleSheet"> |
471 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a008.png);} | 513 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a008.png);} |
472 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a008_ov.png); } | 514 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a008_ov.png); } |
473 | </string> | 515 | </string> |
474 | </property> | 516 | </property> |
475 | <property name="text"> | 517 | <property name="text"> |
476 | <string/> | 518 | <string/> |
477 | </property> | 519 | </property> |
520 | + <property name="checkable"> | ||
521 | + <bool>true</bool> | ||
522 | + </property> | ||
478 | <property name="autoDefault"> | 523 | <property name="autoDefault"> |
479 | <bool>false</bool> | 524 | <bool>false</bool> |
480 | </property> | 525 | </property> |
@@ -495,16 +540,19 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a008_ov.p | @@ -495,16 +540,19 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a008_ov.p | ||
495 | </size> | 540 | </size> |
496 | </property> | 541 | </property> |
497 | <property name="focusPolicy"> | 542 | <property name="focusPolicy"> |
498 | - <enum>Qt::NoFocus</enum> | 543 | + <enum>Qt::TabFocus</enum> |
499 | </property> | 544 | </property> |
500 | <property name="styleSheet"> | 545 | <property name="styleSheet"> |
501 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a003.png);} | 546 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a003.png);} |
502 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a003_ov.png); } | 547 | +QPushButton:pressed, QPushButton:checked{ border-image: url(:/images/keyboard/088_keyboard_a003_ov.png); } |
503 | </string> | 548 | </string> |
504 | </property> | 549 | </property> |
505 | <property name="text"> | 550 | <property name="text"> |
506 | <string/> | 551 | <string/> |
507 | </property> | 552 | </property> |
553 | + <property name="checkable"> | ||
554 | + <bool>true</bool> | ||
555 | + </property> | ||
508 | <property name="autoDefault"> | 556 | <property name="autoDefault"> |
509 | <bool>false</bool> | 557 | <bool>false</bool> |
510 | </property> | 558 | </property> |
@@ -525,16 +573,19 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a003_ov.p | @@ -525,16 +573,19 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a003_ov.p | ||
525 | </size> | 573 | </size> |
526 | </property> | 574 | </property> |
527 | <property name="focusPolicy"> | 575 | <property name="focusPolicy"> |
528 | - <enum>Qt::NoFocus</enum> | 576 | + <enum>Qt::TabFocus</enum> |
529 | </property> | 577 | </property> |
530 | <property name="styleSheet"> | 578 | <property name="styleSheet"> |
531 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a002.png);} | 579 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a002.png);} |
532 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a002_ov.png); } | 580 | +QPushButton:pressed , QPushButton:checked{ border-image: url(:/images/keyboard/088_keyboard_a002_ov.png); } |
533 | </string> | 581 | </string> |
534 | </property> | 582 | </property> |
535 | <property name="text"> | 583 | <property name="text"> |
536 | <string/> | 584 | <string/> |
537 | </property> | 585 | </property> |
586 | + <property name="checkable"> | ||
587 | + <bool>true</bool> | ||
588 | + </property> | ||
538 | <property name="autoDefault"> | 589 | <property name="autoDefault"> |
539 | <bool>false</bool> | 590 | <bool>false</bool> |
540 | </property> | 591 | </property> |
@@ -559,12 +610,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a002_ov.p | @@ -559,12 +610,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a002_ov.p | ||
559 | </property> | 610 | </property> |
560 | <property name="styleSheet"> | 611 | <property name="styleSheet"> |
561 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a029.png);} | 612 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a029.png);} |
562 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a029_ov.png); } | 613 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a029_ov.png); } |
563 | </string> | 614 | </string> |
564 | </property> | 615 | </property> |
565 | <property name="text"> | 616 | <property name="text"> |
566 | <string/> | 617 | <string/> |
567 | </property> | 618 | </property> |
619 | + <property name="checkable"> | ||
620 | + <bool>true</bool> | ||
621 | + </property> | ||
568 | <property name="autoDefault"> | 622 | <property name="autoDefault"> |
569 | <bool>false</bool> | 623 | <bool>false</bool> |
570 | </property> | 624 | </property> |
@@ -589,12 +643,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a029_ov.p | @@ -589,12 +643,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a029_ov.p | ||
589 | </property> | 643 | </property> |
590 | <property name="styleSheet"> | 644 | <property name="styleSheet"> |
591 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a010.png);} | 645 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a010.png);} |
592 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a010_ov.png); } | 646 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a010_ov.png); } |
593 | </string> | 647 | </string> |
594 | </property> | 648 | </property> |
595 | <property name="text"> | 649 | <property name="text"> |
596 | <string/> | 650 | <string/> |
597 | </property> | 651 | </property> |
652 | + <property name="checkable"> | ||
653 | + <bool>true</bool> | ||
654 | + </property> | ||
598 | <property name="autoDefault"> | 655 | <property name="autoDefault"> |
599 | <bool>false</bool> | 656 | <bool>false</bool> |
600 | </property> | 657 | </property> |
@@ -619,12 +676,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a010_ov.p | @@ -619,12 +676,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a010_ov.p | ||
619 | </property> | 676 | </property> |
620 | <property name="styleSheet"> | 677 | <property name="styleSheet"> |
621 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a028.png);} | 678 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a028.png);} |
622 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a028_ov.png); } | 679 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a028_ov.png); } |
623 | </string> | 680 | </string> |
624 | </property> | 681 | </property> |
625 | <property name="text"> | 682 | <property name="text"> |
626 | <string/> | 683 | <string/> |
627 | </property> | 684 | </property> |
685 | + <property name="checkable"> | ||
686 | + <bool>true</bool> | ||
687 | + </property> | ||
628 | <property name="autoDefault"> | 688 | <property name="autoDefault"> |
629 | <bool>false</bool> | 689 | <bool>false</bool> |
630 | </property> | 690 | </property> |
@@ -649,12 +709,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a028_ov.p | @@ -649,12 +709,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a028_ov.p | ||
649 | </property> | 709 | </property> |
650 | <property name="styleSheet"> | 710 | <property name="styleSheet"> |
651 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a018.png);} | 711 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a018.png);} |
652 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a018_ov.png); } | 712 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a018_ov.png); } |
653 | </string> | 713 | </string> |
654 | </property> | 714 | </property> |
655 | <property name="text"> | 715 | <property name="text"> |
656 | <string/> | 716 | <string/> |
657 | </property> | 717 | </property> |
718 | + <property name="checkable"> | ||
719 | + <bool>true</bool> | ||
720 | + </property> | ||
658 | <property name="autoDefault"> | 721 | <property name="autoDefault"> |
659 | <bool>false</bool> | 722 | <bool>false</bool> |
660 | </property> | 723 | </property> |
@@ -675,16 +738,19 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a018_ov.p | @@ -675,16 +738,19 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a018_ov.p | ||
675 | </size> | 738 | </size> |
676 | </property> | 739 | </property> |
677 | <property name="focusPolicy"> | 740 | <property name="focusPolicy"> |
678 | - <enum>Qt::NoFocus</enum> | 741 | + <enum>Qt::TabFocus</enum> |
679 | </property> | 742 | </property> |
680 | <property name="styleSheet"> | 743 | <property name="styleSheet"> |
681 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a001.png);} | 744 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a001.png);} |
682 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a001_ov.png); } | 745 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a001_ov.png); } |
683 | </string> | 746 | </string> |
684 | </property> | 747 | </property> |
685 | <property name="text"> | 748 | <property name="text"> |
686 | <string/> | 749 | <string/> |
687 | </property> | 750 | </property> |
751 | + <property name="checkable"> | ||
752 | + <bool>true</bool> | ||
753 | + </property> | ||
688 | <property name="autoDefault"> | 754 | <property name="autoDefault"> |
689 | <bool>false</bool> | 755 | <bool>false</bool> |
690 | </property> | 756 | </property> |
@@ -709,12 +775,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a001_ov.p | @@ -709,12 +775,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a001_ov.p | ||
709 | </property> | 775 | </property> |
710 | <property name="styleSheet"> | 776 | <property name="styleSheet"> |
711 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a015.png);} | 777 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a015.png);} |
712 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a015_ov.png); } | 778 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a015_ov.png); } |
713 | </string> | 779 | </string> |
714 | </property> | 780 | </property> |
715 | <property name="text"> | 781 | <property name="text"> |
716 | <string/> | 782 | <string/> |
717 | </property> | 783 | </property> |
784 | + <property name="checkable"> | ||
785 | + <bool>true</bool> | ||
786 | + </property> | ||
718 | <property name="autoDefault"> | 787 | <property name="autoDefault"> |
719 | <bool>false</bool> | 788 | <bool>false</bool> |
720 | </property> | 789 | </property> |
@@ -739,12 +808,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a015_ov.p | @@ -739,12 +808,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a015_ov.p | ||
739 | </property> | 808 | </property> |
740 | <property name="styleSheet"> | 809 | <property name="styleSheet"> |
741 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a035.png);} | 810 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a035.png);} |
742 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a035_ov.png); } | 811 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a035_ov.png); } |
743 | </string> | 812 | </string> |
744 | </property> | 813 | </property> |
745 | <property name="text"> | 814 | <property name="text"> |
746 | <string/> | 815 | <string/> |
747 | </property> | 816 | </property> |
817 | + <property name="checkable"> | ||
818 | + <bool>true</bool> | ||
819 | + </property> | ||
748 | <property name="autoDefault"> | 820 | <property name="autoDefault"> |
749 | <bool>false</bool> | 821 | <bool>false</bool> |
750 | </property> | 822 | </property> |
@@ -769,12 +841,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a035_ov.p | @@ -769,12 +841,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a035_ov.p | ||
769 | </property> | 841 | </property> |
770 | <property name="styleSheet"> | 842 | <property name="styleSheet"> |
771 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a026.png);} | 843 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a026.png);} |
772 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a026_ov.png); } | 844 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a026_ov.png); } |
773 | </string> | 845 | </string> |
774 | </property> | 846 | </property> |
775 | <property name="text"> | 847 | <property name="text"> |
776 | <string/> | 848 | <string/> |
777 | </property> | 849 | </property> |
850 | + <property name="checkable"> | ||
851 | + <bool>true</bool> | ||
852 | + </property> | ||
778 | <property name="autoDefault"> | 853 | <property name="autoDefault"> |
779 | <bool>false</bool> | 854 | <bool>false</bool> |
780 | </property> | 855 | </property> |
@@ -799,12 +874,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a026_ov.p | @@ -799,12 +874,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a026_ov.p | ||
799 | </property> | 874 | </property> |
800 | <property name="styleSheet"> | 875 | <property name="styleSheet"> |
801 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a011.png);} | 876 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a011.png);} |
802 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a011_ov.png); } | 877 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a011_ov.png); } |
803 | </string> | 878 | </string> |
804 | </property> | 879 | </property> |
805 | <property name="text"> | 880 | <property name="text"> |
806 | <string/> | 881 | <string/> |
807 | </property> | 882 | </property> |
883 | + <property name="checkable"> | ||
884 | + <bool>true</bool> | ||
885 | + </property> | ||
808 | <property name="autoDefault"> | 886 | <property name="autoDefault"> |
809 | <bool>false</bool> | 887 | <bool>false</bool> |
810 | </property> | 888 | </property> |
@@ -829,12 +907,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a011_ov.p | @@ -829,12 +907,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a011_ov.p | ||
829 | </property> | 907 | </property> |
830 | <property name="styleSheet"> | 908 | <property name="styleSheet"> |
831 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a031.png);} | 909 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a031.png);} |
832 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a031_ov.png); } | 910 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a031_ov.png); } |
833 | </string> | 911 | </string> |
834 | </property> | 912 | </property> |
835 | <property name="text"> | 913 | <property name="text"> |
836 | <string/> | 914 | <string/> |
837 | </property> | 915 | </property> |
916 | + <property name="checkable"> | ||
917 | + <bool>true</bool> | ||
918 | + </property> | ||
838 | <property name="autoDefault"> | 919 | <property name="autoDefault"> |
839 | <bool>false</bool> | 920 | <bool>false</bool> |
840 | </property> | 921 | </property> |
@@ -859,12 +940,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a031_ov.p | @@ -859,12 +940,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a031_ov.p | ||
859 | </property> | 940 | </property> |
860 | <property name="styleSheet"> | 941 | <property name="styleSheet"> |
861 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a004.png);} | 942 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a004.png);} |
862 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a004_ov.png); } | 943 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a004_ov.png); } |
863 | </string> | 944 | </string> |
864 | </property> | 945 | </property> |
865 | <property name="text"> | 946 | <property name="text"> |
866 | <string/> | 947 | <string/> |
867 | </property> | 948 | </property> |
949 | + <property name="checkable"> | ||
950 | + <bool>true</bool> | ||
951 | + </property> | ||
868 | <property name="autoDefault"> | 952 | <property name="autoDefault"> |
869 | <bool>false</bool> | 953 | <bool>false</bool> |
870 | </property> | 954 | </property> |
@@ -889,12 +973,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a004_ov.p | @@ -889,12 +973,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a004_ov.p | ||
889 | </property> | 973 | </property> |
890 | <property name="styleSheet"> | 974 | <property name="styleSheet"> |
891 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a017.png);} | 975 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a017.png);} |
892 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a017_ov.png); } | 976 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a017_ov.png); } |
893 | </string> | 977 | </string> |
894 | </property> | 978 | </property> |
895 | <property name="text"> | 979 | <property name="text"> |
896 | <string/> | 980 | <string/> |
897 | </property> | 981 | </property> |
982 | + <property name="checkable"> | ||
983 | + <bool>true</bool> | ||
984 | + </property> | ||
898 | <property name="autoDefault"> | 985 | <property name="autoDefault"> |
899 | <bool>false</bool> | 986 | <bool>false</bool> |
900 | </property> | 987 | </property> |
@@ -919,12 +1006,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a017_ov.p | @@ -919,12 +1006,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a017_ov.p | ||
919 | </property> | 1006 | </property> |
920 | <property name="styleSheet"> | 1007 | <property name="styleSheet"> |
921 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a030.png);} | 1008 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a030.png);} |
922 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a030_ov.png); } | 1009 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a030_ov.png); } |
923 | </string> | 1010 | </string> |
924 | </property> | 1011 | </property> |
925 | <property name="text"> | 1012 | <property name="text"> |
926 | <string/> | 1013 | <string/> |
927 | </property> | 1014 | </property> |
1015 | + <property name="checkable"> | ||
1016 | + <bool>true</bool> | ||
1017 | + </property> | ||
928 | <property name="autoDefault"> | 1018 | <property name="autoDefault"> |
929 | <bool>false</bool> | 1019 | <bool>false</bool> |
930 | </property> | 1020 | </property> |
@@ -949,12 +1039,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a030_ov.p | @@ -949,12 +1039,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a030_ov.p | ||
949 | </property> | 1039 | </property> |
950 | <property name="styleSheet"> | 1040 | <property name="styleSheet"> |
951 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a005.png);} | 1041 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a005.png);} |
952 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a005_ov.png); } | 1042 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a005_ov.png); } |
953 | </string> | 1043 | </string> |
954 | </property> | 1044 | </property> |
955 | <property name="text"> | 1045 | <property name="text"> |
956 | <string/> | 1046 | <string/> |
957 | </property> | 1047 | </property> |
1048 | + <property name="checkable"> | ||
1049 | + <bool>true</bool> | ||
1050 | + </property> | ||
958 | <property name="autoDefault"> | 1051 | <property name="autoDefault"> |
959 | <bool>false</bool> | 1052 | <bool>false</bool> |
960 | </property> | 1053 | </property> |
@@ -979,12 +1072,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a005_ov.p | @@ -979,12 +1072,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a005_ov.p | ||
979 | </property> | 1072 | </property> |
980 | <property name="styleSheet"> | 1073 | <property name="styleSheet"> |
981 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a007.png);} | 1074 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a007.png);} |
982 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a007_ov.png); } | 1075 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a007_ov.png); } |
983 | </string> | 1076 | </string> |
984 | </property> | 1077 | </property> |
985 | <property name="text"> | 1078 | <property name="text"> |
986 | <string/> | 1079 | <string/> |
987 | </property> | 1080 | </property> |
1081 | + <property name="checkable"> | ||
1082 | + <bool>true</bool> | ||
1083 | + </property> | ||
988 | <property name="autoDefault"> | 1084 | <property name="autoDefault"> |
989 | <bool>false</bool> | 1085 | <bool>false</bool> |
990 | </property> | 1086 | </property> |
@@ -1009,12 +1105,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a007_ov.p | @@ -1009,12 +1105,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a007_ov.p | ||
1009 | </property> | 1105 | </property> |
1010 | <property name="styleSheet"> | 1106 | <property name="styleSheet"> |
1011 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a032.png);} | 1107 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a032.png);} |
1012 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a032_ov.png); } | 1108 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a032_ov.png); } |
1013 | </string> | 1109 | </string> |
1014 | </property> | 1110 | </property> |
1015 | <property name="text"> | 1111 | <property name="text"> |
1016 | <string/> | 1112 | <string/> |
1017 | </property> | 1113 | </property> |
1114 | + <property name="checkable"> | ||
1115 | + <bool>true</bool> | ||
1116 | + </property> | ||
1018 | <property name="autoDefault"> | 1117 | <property name="autoDefault"> |
1019 | <bool>false</bool> | 1118 | <bool>false</bool> |
1020 | </property> | 1119 | </property> |
@@ -1039,12 +1138,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a032_ov.p | @@ -1039,12 +1138,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a032_ov.p | ||
1039 | </property> | 1138 | </property> |
1040 | <property name="styleSheet"> | 1139 | <property name="styleSheet"> |
1041 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a013.png);} | 1140 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a013.png);} |
1042 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a013_ov.png); } | 1141 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a013_ov.png); } |
1043 | </string> | 1142 | </string> |
1044 | </property> | 1143 | </property> |
1045 | <property name="text"> | 1144 | <property name="text"> |
1046 | <string/> | 1145 | <string/> |
1047 | </property> | 1146 | </property> |
1147 | + <property name="checkable"> | ||
1148 | + <bool>true</bool> | ||
1149 | + </property> | ||
1048 | <property name="autoDefault"> | 1150 | <property name="autoDefault"> |
1049 | <bool>false</bool> | 1151 | <bool>false</bool> |
1050 | </property> | 1152 | </property> |
@@ -1069,12 +1171,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a013_ov.p | @@ -1069,12 +1171,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a013_ov.p | ||
1069 | </property> | 1171 | </property> |
1070 | <property name="styleSheet"> | 1172 | <property name="styleSheet"> |
1071 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a025.png);} | 1173 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a025.png);} |
1072 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a025_ov.png); } | 1174 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a025_ov.png); } |
1073 | </string> | 1175 | </string> |
1074 | </property> | 1176 | </property> |
1075 | <property name="text"> | 1177 | <property name="text"> |
1076 | <string/> | 1178 | <string/> |
1077 | </property> | 1179 | </property> |
1180 | + <property name="checkable"> | ||
1181 | + <bool>true</bool> | ||
1182 | + </property> | ||
1078 | <property name="autoDefault"> | 1183 | <property name="autoDefault"> |
1079 | <bool>false</bool> | 1184 | <bool>false</bool> |
1080 | </property> | 1185 | </property> |
@@ -1099,12 +1204,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a025_ov.p | @@ -1099,12 +1204,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a025_ov.p | ||
1099 | </property> | 1204 | </property> |
1100 | <property name="styleSheet"> | 1205 | <property name="styleSheet"> |
1101 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a039.png);} | 1206 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a039.png);} |
1102 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a039_ov.png); } | 1207 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a039_ov.png); } |
1103 | </string> | 1208 | </string> |
1104 | </property> | 1209 | </property> |
1105 | <property name="text"> | 1210 | <property name="text"> |
1106 | <string/> | 1211 | <string/> |
1107 | </property> | 1212 | </property> |
1213 | + <property name="checkable"> | ||
1214 | + <bool>true</bool> | ||
1215 | + </property> | ||
1108 | <property name="autoRepeat"> | 1216 | <property name="autoRepeat"> |
1109 | <bool>true</bool> | 1217 | <bool>true</bool> |
1110 | </property> | 1218 | </property> |
@@ -1132,12 +1240,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a039_ov.p | @@ -1132,12 +1240,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a039_ov.p | ||
1132 | </property> | 1240 | </property> |
1133 | <property name="styleSheet"> | 1241 | <property name="styleSheet"> |
1134 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a024.png);} | 1242 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a024.png);} |
1135 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a024_ov.png); } | 1243 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a024_ov.png); } |
1136 | </string> | 1244 | </string> |
1137 | </property> | 1245 | </property> |
1138 | <property name="text"> | 1246 | <property name="text"> |
1139 | <string/> | 1247 | <string/> |
1140 | </property> | 1248 | </property> |
1249 | + <property name="checkable"> | ||
1250 | + <bool>true</bool> | ||
1251 | + </property> | ||
1141 | <property name="autoDefault"> | 1252 | <property name="autoDefault"> |
1142 | <bool>false</bool> | 1253 | <bool>false</bool> |
1143 | </property> | 1254 | </property> |
@@ -1162,12 +1273,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a024_ov.p | @@ -1162,12 +1273,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a024_ov.p | ||
1162 | </property> | 1273 | </property> |
1163 | <property name="styleSheet"> | 1274 | <property name="styleSheet"> |
1164 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a037.png);} | 1275 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a037.png);} |
1165 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a037_ov.png); } | 1276 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a037_ov.png); } |
1166 | </string> | 1277 | </string> |
1167 | </property> | 1278 | </property> |
1168 | <property name="text"> | 1279 | <property name="text"> |
1169 | <string/> | 1280 | <string/> |
1170 | </property> | 1281 | </property> |
1282 | + <property name="checkable"> | ||
1283 | + <bool>true</bool> | ||
1284 | + </property> | ||
1171 | <property name="autoDefault"> | 1285 | <property name="autoDefault"> |
1172 | <bool>false</bool> | 1286 | <bool>false</bool> |
1173 | </property> | 1287 | </property> |
@@ -1192,12 +1306,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a037_ov.p | @@ -1192,12 +1306,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a037_ov.p | ||
1192 | </property> | 1306 | </property> |
1193 | <property name="styleSheet"> | 1307 | <property name="styleSheet"> |
1194 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a027.png);} | 1308 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a027.png);} |
1195 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a027_ov.png); } | 1309 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a027_ov.png); } |
1196 | </string> | 1310 | </string> |
1197 | </property> | 1311 | </property> |
1198 | <property name="text"> | 1312 | <property name="text"> |
1199 | <string/> | 1313 | <string/> |
1200 | </property> | 1314 | </property> |
1315 | + <property name="checkable"> | ||
1316 | + <bool>true</bool> | ||
1317 | + </property> | ||
1201 | <property name="autoDefault"> | 1318 | <property name="autoDefault"> |
1202 | <bool>false</bool> | 1319 | <bool>false</bool> |
1203 | </property> | 1320 | </property> |
@@ -1222,12 +1339,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a027_ov.p | @@ -1222,12 +1339,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a027_ov.p | ||
1222 | </property> | 1339 | </property> |
1223 | <property name="styleSheet"> | 1340 | <property name="styleSheet"> |
1224 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a040.png);} | 1341 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a040.png);} |
1225 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a040_ov.png); } | 1342 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a040_ov.png); } |
1226 | </string> | 1343 | </string> |
1227 | </property> | 1344 | </property> |
1228 | <property name="text"> | 1345 | <property name="text"> |
1229 | <string/> | 1346 | <string/> |
1230 | </property> | 1347 | </property> |
1348 | + <property name="checkable"> | ||
1349 | + <bool>true</bool> | ||
1350 | + </property> | ||
1231 | <property name="autoDefault"> | 1351 | <property name="autoDefault"> |
1232 | <bool>false</bool> | 1352 | <bool>false</bool> |
1233 | </property> | 1353 | </property> |
@@ -1252,12 +1372,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a040_ov.p | @@ -1252,12 +1372,15 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a040_ov.p | ||
1252 | </property> | 1372 | </property> |
1253 | <property name="styleSheet"> | 1373 | <property name="styleSheet"> |
1254 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a041.png);} | 1374 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a041.png);} |
1255 | -QPushButton:pressed , QPushButton::focus { border-image: url(:/images/keyboard/088_keyboard_a041_ov.png); } | 1375 | +QPushButton:pressed , QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a041_ov.png); } |
1256 | </string> | 1376 | </string> |
1257 | </property> | 1377 | </property> |
1258 | <property name="text"> | 1378 | <property name="text"> |
1259 | <string/> | 1379 | <string/> |
1260 | </property> | 1380 | </property> |
1381 | + <property name="checkable"> | ||
1382 | + <bool>true</bool> | ||
1383 | + </property> | ||
1261 | <property name="autoDefault"> | 1384 | <property name="autoDefault"> |
1262 | <bool>false</bool> | 1385 | <bool>false</bool> |
1263 | </property> | 1386 | </property> |
@@ -1282,12 +1405,15 @@ QPushButton:pressed , QPushButton::focus { border-image: url(:/images/keyboard/0 | @@ -1282,12 +1405,15 @@ QPushButton:pressed , QPushButton::focus { border-image: url(:/images/keyboard/0 | ||
1282 | </property> | 1405 | </property> |
1283 | <property name="styleSheet"> | 1406 | <property name="styleSheet"> |
1284 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a042.png);} | 1407 | <string notr="true">QPushButton { border-image: url(:/images/keyboard/088_keyboard_a042.png);} |
1285 | -QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a042_ov.png); } | 1408 | +QPushButton:pressed, QPushButton:checked { border-image: url(:/images/keyboard/088_keyboard_a042_ov.png); } |
1286 | </string> | 1409 | </string> |
1287 | </property> | 1410 | </property> |
1288 | <property name="text"> | 1411 | <property name="text"> |
1289 | <string/> | 1412 | <string/> |
1290 | </property> | 1413 | </property> |
1414 | + <property name="checkable"> | ||
1415 | + <bool>true</bool> | ||
1416 | + </property> | ||
1291 | <property name="autoDefault"> | 1417 | <property name="autoDefault"> |
1292 | <bool>false</bool> | 1418 | <bool>false</bool> |
1293 | </property> | 1419 | </property> |
@@ -1296,6 +1422,11 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a042_ov.p | @@ -1296,6 +1422,11 @@ QPushButton:pressed { border-image: url(:/images/keyboard/088_keyboard_a042_ov.p | ||
1296 | </layout> | 1422 | </layout> |
1297 | </widget> | 1423 | </widget> |
1298 | </widget> | 1424 | </widget> |
1425 | + <tabstops> | ||
1426 | + <tabstop>pushButton_1</tabstop> | ||
1427 | + <tabstop>pushButton_2</tabstop> | ||
1428 | + <tabstop>pushButton_3</tabstop> | ||
1429 | + </tabstops> | ||
1299 | <resources/> | 1430 | <resources/> |
1300 | <connections/> | 1431 | <connections/> |
1301 | </ui> | 1432 | </ui> |