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