Merge lp:~baratosha23/stellarium/stellarium into lp:stellarium
- stellarium
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | Alexander Wolf |
Proposed branch: | lp:~baratosha23/stellarium/stellarium |
Merge into: | lp:stellarium |
Diff against target: |
560 lines (+260/-10) 20 files modified
data/default_config.ini.cmake (+1/-0) plugins/Oculars/src/gui/OcularDialog.cpp (+33/-0) plugins/Oculars/src/gui/OcularDialog.hpp (+7/-0) plugins/Satellites/src/gui/SatellitesDialog.cpp (+20/-0) plugins/Satellites/src/gui/SatellitesDialog.hpp (+4/-0) plugins/Satellites/src/gui/SatellitesImportDialog.cpp (+19/-0) plugins/Satellites/src/gui/SatellitesImportDialog.hpp (+7/-0) plugins/SolarSystemEditor/src/gui/MpcImportWindow.cpp (+22/-0) plugins/SolarSystemEditor/src/gui/MpcImportWindow.hpp (+4/-0) src/StelMainView.cpp (+3/-0) src/core/StelCore.cpp (+2/-7) src/gui/ConfigurationDialog.cpp (+21/-0) src/gui/ConfigurationDialog.hpp (+4/-0) src/gui/LocationDialog.cpp (+24/-0) src/gui/LocationDialog.hpp (+4/-0) src/gui/SearchDialog.cpp (+20/-3) src/gui/ShortcutsDialog.cpp (+21/-0) src/gui/ShortcutsDialog.hpp (+4/-0) src/gui/StelDialog.cpp (+35/-0) src/gui/StelDialog.hpp (+5/-0) |
To merge this branch: | bzr merge lp:~baratosha23/stellarium/stellarium |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Fabien Chéreau | Needs Fixing | ||
Alexander Wolf | Needs Fixing | ||
Review via email: mp+237364@code.launchpad.net |
Commit message
Description of the change
Show touch Keyboard for windows tablet pc. Fixed a bug when running widget LocationDialog before obtaining the coordinates of the location from ip.
- 6997. By Vladislav Bataron
-
disable of kinetic scrolling
Vladislav Bataron (baratosha23) wrote : | # |
Virtual keyboard is included in all versions of windows 8.
I added a check of system version.
- 6998. By Vladislav Bataron
-
Showing the touch keyboard on the device only with windows 8
Alexander Wolf (alexwolf) wrote : | # |
Please see diff comments.
Fabien Chéreau (xalioth) wrote : | # |
Isn't there a better method for doing this? I would be surprised that Qt doesn't provides a clean way for that. Virtual keyboard work natively on mobile plateforms.
Also, something like this is very dangerous:
ShellExecuteA(NULL, "open", "\"C:\\Program Files\\Common Files\\microsoft shared\
Vladislav Bataron (baratosha23) wrote : | # |
> Isn't there a better method for doing this? I would be surprised that Qt
> doesn't provides a clean way for that. Virtual keyboard work natively on
> mobile plateforms.
>
>
> Also, something like this is very dangerous:
> ShellExecuteA(NULL, "open", "\"C:\\Program Files\\Common Files\\microsoft
> shared\
Unfortunately qt and the Win32 API does not have the normal method call the touch screen keyboard.
Please see BWK_readme.txt in sample - https:/
I can try to use qml to create on-screen keyboard.
http://
http://
Do this?
Vladislav Bataron (baratosha23) wrote : | # |
Qt Virtual Keyboard is included only in Commercial Licensing qt.
http://
How to make the virtual keyboard!?
Unmerged revisions
- 6998. By Vladislav Bataron
-
Showing the touch keyboard on the device only with windows 8
- 6997. By Vladislav Bataron
-
disable of kinetic scrolling
- 6996. By Vladislav Bataron
-
move variable listShowTouchKe
yboard global variables - 6995. By Vladislav Bataron
-
Merge branch
- 6994. By Vladislav Bataron
-
Fixed a bug when running widget LocationDialog before obtaining the coordinates of the location from ip.
- 6993. By Vladislav Bataron
-
Disable setFocus when using the touch screen keyboard
- 6992. By Vladislav Bataron
-
Merge branch
- 6991. By Vladislav Bataron
-
Show touch Keyboard for tablet pc
Preview Diff
1 | === modified file 'data/default_config.ini.cmake' | |||
2 | --- data/default_config.ini.cmake 2014-09-10 13:15:56 +0000 | |||
3 | +++ data/default_config.ini.cmake 2014-10-07 08:24:37 +0000 | |||
4 | @@ -116,6 +116,7 @@ | |||
5 | 116 | auto_hide_horizontal_toolbar = true | 116 | auto_hide_horizontal_toolbar = true |
6 | 117 | auto_hide_vertical_toolbar = true | 117 | auto_hide_vertical_toolbar = true |
7 | 118 | flag_enable_kinetic_scrolling = true | 118 | flag_enable_kinetic_scrolling = true |
8 | 119 | flag_enable_touch_keyboard = false | ||
9 | 119 | 120 | ||
10 | 120 | [color] | 121 | [color] |
11 | 121 | default_color = 0.5,0.5,0.7 | 122 | default_color = 0.5,0.5,0.7 |
12 | 122 | 123 | ||
13 | === modified file 'plugins/Oculars/src/gui/OcularDialog.cpp' | |||
14 | --- plugins/Oculars/src/gui/OcularDialog.cpp 2014-09-08 14:57:05 +0000 | |||
15 | +++ plugins/Oculars/src/gui/OcularDialog.cpp 2014-10-07 08:24:37 +0000 | |||
16 | @@ -346,6 +346,15 @@ | |||
17 | 346 | QList<QWidget *> addscroll; | 346 | QList<QWidget *> addscroll; |
18 | 347 | addscroll << ui->textBrowser << ui->telescopeListView << ui->ccdListView << ui->ocularListView << ui->lensListView; | 347 | addscroll << ui->textBrowser << ui->telescopeListView << ui->ccdListView << ui->ocularListView << ui->lensListView; |
19 | 348 | installKineticScrolling(addscroll); | 348 | installKineticScrolling(addscroll); |
20 | 349 | |||
21 | 350 | #ifdef Q_OS_WIN | ||
22 | 351 | // Install the Event Filter to show the touch keyboard | ||
23 | 352 | listShowTouchKeyboard << ui->togglePluginLineEdit << ui->togglePopupNavigatorWindowLineEdit << ui->ocularName << ui->ocularAFov << ui->ocularFL << ui->ocularFieldStop << ui->lensName << ui->lensMultipler | ||
24 | 353 | << ui->ccdName << ui->ccdResX << ui->ccdResY << ui->ccdChipX << ui->ccdChipY << ui->ccdPixelX << ui->ccdPixelY << ui->telescopeName << ui->telescopeFL << ui->telescopeDiameter; | ||
25 | 354 | |||
26 | 355 | foreach(QWidget * w, listShowTouchKeyboard) | ||
27 | 356 | w->installEventFilter(this); | ||
28 | 357 | #endif | ||
29 | 349 | 358 | ||
30 | 350 | //Now the rest of the actions. | 359 | //Now the rest of the actions. |
31 | 351 | connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); | 360 | connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); |
32 | @@ -547,3 +556,27 @@ | |||
33 | 547 | 556 | ||
34 | 548 | ui->textBrowser->setHtml(html); | 557 | ui->textBrowser->setHtml(html); |
35 | 549 | } | 558 | } |
36 | 559 | |||
37 | 560 | #ifdef Q_OS_WIN | ||
38 | 561 | bool OcularDialog::eventFilter(QObject *object, QEvent *event) | ||
39 | 562 | { | ||
40 | 563 | foreach(QWidget * w, listShowTouchKeyboard) | ||
41 | 564 | { | ||
42 | 565 | if (object == w) | ||
43 | 566 | { | ||
44 | 567 | if (event->type() == QEvent::FocusIn) | ||
45 | 568 | { | ||
46 | 569 | showTouchKeyboard(true); | ||
47 | 570 | return false; | ||
48 | 571 | } | ||
49 | 572 | if (event->type() == QEvent::FocusOut) | ||
50 | 573 | { | ||
51 | 574 | showTouchKeyboard(false); | ||
52 | 575 | return false; | ||
53 | 576 | } | ||
54 | 577 | |||
55 | 578 | } | ||
56 | 579 | } | ||
57 | 580 | return false; | ||
58 | 581 | } | ||
59 | 582 | #endif | ||
60 | 550 | \ No newline at end of file | 583 | \ No newline at end of file |
61 | 551 | 584 | ||
62 | === modified file 'plugins/Oculars/src/gui/OcularDialog.hpp' | |||
63 | --- plugins/Oculars/src/gui/OcularDialog.hpp 2014-01-17 12:19:02 +0000 | |||
64 | +++ plugins/Oculars/src/gui/OcularDialog.hpp 2014-10-07 08:24:37 +0000 | |||
65 | @@ -82,6 +82,10 @@ | |||
66 | 82 | virtual void createDialogContent(); | 82 | virtual void createDialogContent(); |
67 | 83 | Ui_ocularDialogForm* ui; | 83 | Ui_ocularDialogForm* ui; |
68 | 84 | 84 | ||
69 | 85 | #ifdef Q_OS_WIN | ||
70 | 86 | virtual bool eventFilter(QObject *object, QEvent *event); | ||
71 | 87 | #endif | ||
72 | 88 | |||
73 | 85 | private slots: | 89 | private slots: |
74 | 86 | void keyBindingTogglePluginChanged(const QString& newString); | 90 | void keyBindingTogglePluginChanged(const QString& newString); |
75 | 87 | void keyBindingPopupNavigatorConfigChanged(const QString& newString); | 91 | void keyBindingPopupNavigatorConfigChanged(const QString& newString); |
76 | @@ -105,6 +109,9 @@ | |||
77 | 105 | QList<Lens *>* lense; | 109 | QList<Lens *>* lense; |
78 | 106 | PropertyBasedTableModel* lensTableModel; | 110 | PropertyBasedTableModel* lensTableModel; |
79 | 107 | QRegExpValidator* validatorName; | 111 | QRegExpValidator* validatorName; |
80 | 112 | #ifdef Q_OS_WIN | ||
81 | 113 | QList<QWidget *> listShowTouchKeyboard; | ||
82 | 114 | #endif | ||
83 | 108 | }; | 115 | }; |
84 | 109 | 116 | ||
85 | 110 | #endif // _OCULARDIALOG_HPP_ | 117 | #endif // _OCULARDIALOG_HPP_ |
86 | 111 | 118 | ||
87 | === modified file 'plugins/Satellites/src/gui/SatellitesDialog.cpp' | |||
88 | --- plugins/Satellites/src/gui/SatellitesDialog.cpp 2014-09-08 14:57:05 +0000 | |||
89 | +++ plugins/Satellites/src/gui/SatellitesDialog.cpp 2014-10-07 08:24:37 +0000 | |||
90 | @@ -98,6 +98,12 @@ | |||
91 | 98 | addscroll << ui->satellitesList << ui->sourceList << ui->aboutTextBrowser; | 98 | addscroll << ui->satellitesList << ui->sourceList << ui->aboutTextBrowser; |
92 | 99 | installKineticScrolling(addscroll); | 99 | installKineticScrolling(addscroll); |
93 | 100 | 100 | ||
94 | 101 | #ifdef Q_OS_WIN | ||
95 | 102 | // Install the Event Filter to show the touch keyboard | ||
96 | 103 | ui->lineEditSearch->installEventFilter(this); | ||
97 | 104 | ui->sourceEdit->installEventFilter(this); | ||
98 | 105 | #endif | ||
99 | 106 | |||
100 | 101 | // Settings tab / updates group | 107 | // Settings tab / updates group |
101 | 102 | // These controls are refreshed by updateSettingsPage(), which in | 108 | // These controls are refreshed by updateSettingsPage(), which in |
102 | 103 | // turn is triggered by setting any of these values. Because | 109 | // turn is triggered by setting any of these values. Because |
103 | @@ -915,3 +921,17 @@ | |||
104 | 915 | ui->orbitCheckbox->blockSignals(!enabled); | 921 | ui->orbitCheckbox->blockSignals(!enabled); |
105 | 916 | ui->userCheckBox->blockSignals(!enabled); | 922 | ui->userCheckBox->blockSignals(!enabled); |
106 | 917 | } | 923 | } |
107 | 924 | |||
108 | 925 | #ifdef Q_OS_WIN | ||
109 | 926 | bool SatellitesDialog::eventFilter(QObject *object, QEvent *event) | ||
110 | 927 | { | ||
111 | 928 | if (object == ui->lineEditSearch || object == ui->sourceEdit) | ||
112 | 929 | { | ||
113 | 930 | if (event->type() == QEvent::FocusIn) | ||
114 | 931 | showTouchKeyboard(true); | ||
115 | 932 | if (event->type() == QEvent::FocusOut) | ||
116 | 933 | showTouchKeyboard(false); | ||
117 | 934 | } | ||
118 | 935 | return false; | ||
119 | 936 | } | ||
120 | 937 | #endif | ||
121 | 918 | \ No newline at end of file | 938 | \ No newline at end of file |
122 | 919 | 939 | ||
123 | === modified file 'plugins/Satellites/src/gui/SatellitesDialog.hpp' | |||
124 | --- plugins/Satellites/src/gui/SatellitesDialog.hpp 2013-04-07 19:26:57 +0000 | |||
125 | +++ plugins/Satellites/src/gui/SatellitesDialog.hpp 2014-10-07 08:24:37 +0000 | |||
126 | @@ -50,6 +50,10 @@ | |||
127 | 50 | //! Initialize the dialog widgets and connect the signals/slots | 50 | //! Initialize the dialog widgets and connect the signals/slots |
128 | 51 | void createDialogContent(); | 51 | void createDialogContent(); |
129 | 52 | 52 | ||
130 | 53 | #ifdef Q_OS_WIN | ||
131 | 54 | virtual bool eventFilter(QObject *object, QEvent *event); | ||
132 | 55 | #endif | ||
133 | 56 | |||
134 | 53 | public slots: | 57 | public slots: |
135 | 54 | void retranslate(); | 58 | void retranslate(); |
136 | 55 | 59 | ||
137 | 56 | 60 | ||
138 | === modified file 'plugins/Satellites/src/gui/SatellitesImportDialog.cpp' | |||
139 | --- plugins/Satellites/src/gui/SatellitesImportDialog.cpp 2014-09-08 14:57:05 +0000 | |||
140 | +++ plugins/Satellites/src/gui/SatellitesImportDialog.cpp 2014-10-07 08:24:37 +0000 | |||
141 | @@ -90,6 +90,11 @@ | |||
142 | 90 | addscroll << ui->listView; | 90 | addscroll << ui->listView; |
143 | 91 | installKineticScrolling(addscroll); | 91 | installKineticScrolling(addscroll); |
144 | 92 | 92 | ||
145 | 93 | #ifdef Q_OS_WIN | ||
146 | 94 | // Install the Event Filter to show the touch keyboard | ||
147 | 95 | ui->lineEditSearch->installEventFilter(this); | ||
148 | 96 | #endif | ||
149 | 97 | |||
150 | 93 | connect(ui->closeStelWindow, SIGNAL(clicked()), | 98 | connect(ui->closeStelWindow, SIGNAL(clicked()), |
151 | 94 | this, SLOT(close())); | 99 | this, SLOT(close())); |
152 | 95 | 100 | ||
153 | @@ -404,3 +409,17 @@ | |||
154 | 404 | } | 409 | } |
155 | 405 | } | 410 | } |
156 | 406 | } | 411 | } |
157 | 412 | |||
158 | 413 | #ifdef Q_OS_WIN | ||
159 | 414 | bool SatellitesImportDialog::eventFilter(QObject *object, QEvent *event) | ||
160 | 415 | { | ||
161 | 416 | if (object == ui->lineEditSearch) | ||
162 | 417 | { | ||
163 | 418 | if (event->type() == QEvent::FocusIn) | ||
164 | 419 | showTouchKeyboard(true); | ||
165 | 420 | if (event->type() == QEvent::FocusOut) | ||
166 | 421 | showTouchKeyboard(false); | ||
167 | 422 | } | ||
168 | 423 | return false; | ||
169 | 424 | } | ||
170 | 425 | #endif | ||
171 | 407 | \ No newline at end of file | 426 | \ No newline at end of file |
172 | 408 | 427 | ||
173 | === modified file 'plugins/Satellites/src/gui/SatellitesImportDialog.hpp' | |||
174 | --- plugins/Satellites/src/gui/SatellitesImportDialog.hpp 2013-09-09 23:21:42 +0000 | |||
175 | +++ plugins/Satellites/src/gui/SatellitesImportDialog.hpp 2014-10-07 08:24:37 +0000 | |||
176 | @@ -78,6 +78,13 @@ | |||
177 | 78 | 78 | ||
178 | 79 | QStandardItemModel* newSatellitesModel; | 79 | QStandardItemModel* newSatellitesModel; |
179 | 80 | QSortFilterProxyModel * filterProxyModel; | 80 | QSortFilterProxyModel * filterProxyModel; |
180 | 81 | |||
181 | 82 | protected: | ||
182 | 83 | |||
183 | 84 | #ifdef Q_OS_WIN | ||
184 | 85 | virtual bool eventFilter(QObject *object, QEvent *event); | ||
185 | 86 | #endif | ||
186 | 87 | |||
187 | 81 | }; | 88 | }; |
188 | 82 | 89 | ||
189 | 83 | #endif // IMPORTSATELLITESWINDOW_HPP | 90 | #endif // IMPORTSATELLITESWINDOW_HPP |
190 | 84 | 91 | ||
191 | === modified file 'plugins/SolarSystemEditor/src/gui/MpcImportWindow.cpp' | |||
192 | --- plugins/SolarSystemEditor/src/gui/MpcImportWindow.cpp 2014-07-04 07:59:24 +0000 | |||
193 | +++ plugins/SolarSystemEditor/src/gui/MpcImportWindow.cpp 2014-10-07 08:24:37 +0000 | |||
194 | @@ -92,6 +92,14 @@ | |||
195 | 92 | { | 92 | { |
196 | 93 | ui->setupUi(dialog); | 93 | ui->setupUi(dialog); |
197 | 94 | 94 | ||
198 | 95 | #ifdef Q_OS_WIN | ||
199 | 96 | // Install the Event Filter to show the touch keyboard | ||
200 | 97 | ui->lineEditURL->installEventFilter(this); | ||
201 | 98 | ui->lineEditBookmarkTitle->installEventFilter(this); | ||
202 | 99 | ui->lineEditFilePath->installEventFilter(this); | ||
203 | 100 | ui->lineEditQuery->installEventFilter(this); | ||
204 | 101 | #endif | ||
205 | 102 | |||
206 | 95 | //Signals | 103 | //Signals |
207 | 96 | connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); | 104 | connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); |
208 | 97 | connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); | 105 | connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); |
209 | @@ -1055,3 +1063,17 @@ | |||
210 | 1055 | output.insert(title, bookmarkGroup.value(title)); | 1063 | output.insert(title, bookmarkGroup.value(title)); |
211 | 1056 | } | 1064 | } |
212 | 1057 | } | 1065 | } |
213 | 1066 | |||
214 | 1067 | #ifdef Q_OS_WIN | ||
215 | 1068 | bool MpcImportWindow::eventFilter(QObject *object, QEvent *event) | ||
216 | 1069 | { | ||
217 | 1070 | if (object == ui->lineEditURL || object == ui->lineEditBookmarkTitle || object == ui->lineEditFilePath || object == ui->lineEditQuery) | ||
218 | 1071 | { | ||
219 | 1072 | if (event->type() == QEvent::FocusIn) | ||
220 | 1073 | showTouchKeyboard(true); | ||
221 | 1074 | if (event->type() == QEvent::FocusOut) | ||
222 | 1075 | showTouchKeyboard(false); | ||
223 | 1076 | } | ||
224 | 1077 | return false; | ||
225 | 1078 | } | ||
226 | 1079 | #endif | ||
227 | 1058 | \ No newline at end of file | 1080 | \ No newline at end of file |
228 | 1059 | 1081 | ||
229 | === modified file 'plugins/SolarSystemEditor/src/gui/MpcImportWindow.hpp' | |||
230 | --- plugins/SolarSystemEditor/src/gui/MpcImportWindow.hpp 2013-09-09 23:21:42 +0000 | |||
231 | +++ plugins/SolarSystemEditor/src/gui/MpcImportWindow.hpp 2014-10-07 08:24:37 +0000 | |||
232 | @@ -138,6 +138,10 @@ | |||
233 | 138 | protected: | 138 | protected: |
234 | 139 | virtual void createDialogContent(); | 139 | virtual void createDialogContent(); |
235 | 140 | Ui_mpcImportWindow * ui; | 140 | Ui_mpcImportWindow * ui; |
236 | 141 | |||
237 | 142 | #ifdef Q_OS_WIN | ||
238 | 143 | virtual bool eventFilter(QObject *object, QEvent *event); | ||
239 | 144 | #endif | ||
240 | 141 | }; | 145 | }; |
241 | 142 | 146 | ||
242 | 143 | #endif //_MPC_IMPORT_WINDOW_ | 147 | #endif //_MPC_IMPORT_WINDOW_ |
243 | 144 | 148 | ||
244 | === modified file 'src/StelMainView.cpp' | |||
245 | --- src/StelMainView.cpp 2014-09-17 11:16:35 +0000 | |||
246 | +++ src/StelMainView.cpp 2014-10-07 08:24:37 +0000 | |||
247 | @@ -172,6 +172,9 @@ | |||
248 | 172 | if (touchPoints.count() == 1) | 172 | if (touchPoints.count() == 1) |
249 | 173 | setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton | Qt::MiddleButton); | 173 | setAcceptedMouseButtons(Qt::LeftButton | Qt::RightButton | Qt::MiddleButton); |
250 | 174 | 174 | ||
251 | 175 | if (StelApp::getInstance().getSettings()->value("gui/flag_enable_touch_keyboard", false).toBool() == false) | ||
252 | 176 | StelApp::getInstance().getSettings()->setValue("gui/flag_enable_touch_keyboard", true); | ||
253 | 177 | |||
254 | 175 | return true; | 178 | return true; |
255 | 176 | } | 179 | } |
256 | 177 | break; | 180 | break; |
257 | 178 | 181 | ||
258 | === modified file 'src/core/StelCore.cpp' | |||
259 | --- src/core/StelCore.cpp 2014-10-05 11:17:24 +0000 | |||
260 | +++ src/core/StelCore.cpp 2014-10-07 08:24:37 +0000 | |||
261 | @@ -114,15 +114,10 @@ | |||
262 | 114 | defaultLocationID = conf->value("init_location/location", "auto").toString(); | 114 | defaultLocationID = conf->value("init_location/location", "auto").toString(); |
263 | 115 | bool ok; | 115 | bool ok; |
264 | 116 | StelLocationMgr* locationMgr = &StelApp::getInstance().getLocationMgr(); | 116 | StelLocationMgr* locationMgr = &StelApp::getInstance().getLocationMgr(); |
266 | 117 | StelLocation location; | 117 | StelLocation location = locationMgr->locationForString(defaultLocationID); |
267 | 118 | |||
268 | 118 | if (defaultLocationID == "auto") | 119 | if (defaultLocationID == "auto") |
269 | 119 | { | ||
270 | 120 | locationMgr->locationFromIP(); | 120 | locationMgr->locationFromIP(); |
271 | 121 | } | ||
272 | 122 | else | ||
273 | 123 | { | ||
274 | 124 | location = locationMgr->locationForString(defaultLocationID); | ||
275 | 125 | } | ||
276 | 126 | 121 | ||
277 | 127 | if (!location.isValid()) | 122 | if (!location.isValid()) |
278 | 128 | { | 123 | { |
279 | 129 | 124 | ||
280 | === modified file 'src/gui/ConfigurationDialog.cpp' | |||
281 | --- src/gui/ConfigurationDialog.cpp 2014-09-26 14:33:13 +0000 | |||
282 | +++ src/gui/ConfigurationDialog.cpp 2014-10-07 08:24:37 +0000 | |||
283 | @@ -162,6 +162,13 @@ | |||
284 | 162 | addscroll << ui->pluginsListWidget << ui->scriptListWidget; | 162 | addscroll << ui->pluginsListWidget << ui->scriptListWidget; |
285 | 163 | installKineticScrolling(addscroll); | 163 | installKineticScrolling(addscroll); |
286 | 164 | 164 | ||
287 | 165 | #ifdef Q_OS_WIN | ||
288 | 166 | // Install the Event Filter to show the touch keyboard | ||
289 | 167 | ui->screenshotDirEdit->installEventFilter(this); | ||
290 | 168 | ui->todayTimeSpinBox->installEventFilter(this); | ||
291 | 169 | ui->mouseTimeoutSpinBox->installEventFilter(this); | ||
292 | 170 | #endif | ||
293 | 171 | |||
294 | 165 | // Selected object info | 172 | // Selected object info |
295 | 166 | if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(0)) | 173 | if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(0)) |
296 | 167 | { | 174 | { |
297 | @@ -1232,3 +1239,17 @@ | |||
298 | 1232 | 1239 | ||
299 | 1233 | customDeltaTEquationDialog->setVisible(true); | 1240 | customDeltaTEquationDialog->setVisible(true); |
300 | 1234 | } | 1241 | } |
301 | 1242 | |||
302 | 1243 | #ifdef Q_OS_WIN | ||
303 | 1244 | bool ConfigurationDialog::eventFilter(QObject *object, QEvent *event) | ||
304 | 1245 | { | ||
305 | 1246 | if (object == ui->screenshotDirEdit || object == ui->todayTimeSpinBox || object == ui->mouseTimeoutSpinBox) | ||
306 | 1247 | { | ||
307 | 1248 | if (event->type() == QEvent::FocusIn) | ||
308 | 1249 | showTouchKeyboard(true); | ||
309 | 1250 | if (event->type() == QEvent::FocusOut) | ||
310 | 1251 | showTouchKeyboard(false); | ||
311 | 1252 | } | ||
312 | 1253 | return false; | ||
313 | 1254 | } | ||
314 | 1255 | #endif | ||
315 | 1235 | \ No newline at end of file | 1256 | \ No newline at end of file |
316 | 1236 | 1257 | ||
317 | === modified file 'src/gui/ConfigurationDialog.hpp' | |||
318 | --- src/gui/ConfigurationDialog.hpp 2014-01-23 12:57:00 +0000 | |||
319 | +++ src/gui/ConfigurationDialog.hpp 2014-10-07 08:24:37 +0000 | |||
320 | @@ -50,6 +50,10 @@ | |||
321 | 50 | virtual void createDialogContent(); | 50 | virtual void createDialogContent(); |
322 | 51 | Ui_configurationDialogForm* ui; | 51 | Ui_configurationDialogForm* ui; |
323 | 52 | 52 | ||
324 | 53 | #ifdef Q_OS_WIN | ||
325 | 54 | virtual bool eventFilter(QObject *object, QEvent *event); | ||
326 | 55 | #endif | ||
327 | 56 | |||
328 | 53 | private: | 57 | private: |
329 | 54 | //! Contains the parsed content of the starsConfig.json file | 58 | //! Contains the parsed content of the starsConfig.json file |
330 | 55 | QVariantMap nextStarCatalogToDownload; | 59 | QVariantMap nextStarCatalogToDownload; |
331 | 56 | 60 | ||
332 | === modified file 'src/gui/LocationDialog.cpp' | |||
333 | --- src/gui/LocationDialog.cpp 2014-10-05 09:30:57 +0000 | |||
334 | +++ src/gui/LocationDialog.cpp 2014-10-07 08:24:37 +0000 | |||
335 | @@ -92,6 +92,15 @@ | |||
336 | 92 | addscroll << ui->citiesListView; | 92 | addscroll << ui->citiesListView; |
337 | 93 | installKineticScrolling(addscroll); | 93 | installKineticScrolling(addscroll); |
338 | 94 | 94 | ||
339 | 95 | #ifdef Q_OS_WIN | ||
340 | 96 | // Install the Event Filter to show the touch keyboard | ||
341 | 97 | ui->citySearchLineEdit->installEventFilter(this); | ||
342 | 98 | ui->cityNameLineEdit->installEventFilter(this); | ||
343 | 99 | ui->latitudeSpinBox->installEventFilter(this); | ||
344 | 100 | ui->longitudeSpinBox->installEventFilter(this); | ||
345 | 101 | ui->altitudeSpinBox->installEventFilter(this); | ||
346 | 102 | #endif | ||
347 | 103 | |||
348 | 95 | populatePlanetList(); | 104 | populatePlanetList(); |
349 | 96 | populateCountryList(); | 105 | populateCountryList(); |
350 | 97 | 106 | ||
351 | @@ -129,6 +138,7 @@ | |||
352 | 129 | 138 | ||
353 | 130 | connect(core, SIGNAL(locationChanged(StelLocation)), this, SLOT(updateFromProgram(StelLocation))); | 139 | connect(core, SIGNAL(locationChanged(StelLocation)), this, SLOT(updateFromProgram(StelLocation))); |
354 | 131 | 140 | ||
355 | 141 | if (StelApp::getInstance().getSettings()->value("gui/flag_enable_touch_keyboard", false).toBool() == false) | ||
356 | 132 | ui->citySearchLineEdit->setFocus(); | 142 | ui->citySearchLineEdit->setFocus(); |
357 | 133 | } | 143 | } |
358 | 134 | 144 | ||
359 | @@ -573,3 +583,17 @@ | |||
360 | 573 | connect(ui->citySearchLineEdit, SIGNAL(textChanged(const QString&)), proxyModel, SLOT(setFilterWildcard(const QString&))); | 583 | connect(ui->citySearchLineEdit, SIGNAL(textChanged(const QString&)), proxyModel, SLOT(setFilterWildcard(const QString&))); |
361 | 574 | ui->citySearchLineEdit->setFocus(); | 584 | ui->citySearchLineEdit->setFocus(); |
362 | 575 | } | 585 | } |
363 | 586 | |||
364 | 587 | #ifdef Q_OS_WIN | ||
365 | 588 | bool LocationDialog::eventFilter(QObject *object, QEvent *event) | ||
366 | 589 | { | ||
367 | 590 | if (object == ui->citySearchLineEdit || object == ui->cityNameLineEdit || object == ui->latitudeSpinBox || object == ui->longitudeSpinBox || object == ui->altitudeSpinBox) | ||
368 | 591 | { | ||
369 | 592 | if (event->type() == QEvent::FocusIn) | ||
370 | 593 | showTouchKeyboard(true); | ||
371 | 594 | if (event->type() == QEvent::FocusOut) | ||
372 | 595 | showTouchKeyboard(false); | ||
373 | 596 | } | ||
374 | 597 | return false; | ||
375 | 598 | } | ||
376 | 599 | #endif | ||
377 | 576 | \ No newline at end of file | 600 | \ No newline at end of file |
378 | 577 | 601 | ||
379 | === modified file 'src/gui/LocationDialog.hpp' | |||
380 | --- src/gui/LocationDialog.hpp 2014-09-08 12:47:22 +0000 | |||
381 | +++ src/gui/LocationDialog.hpp 2014-10-07 08:24:37 +0000 | |||
382 | @@ -43,6 +43,10 @@ | |||
383 | 43 | //! Initialize the dialog widgets and connect the signals/slots | 43 | //! Initialize the dialog widgets and connect the signals/slots |
384 | 44 | virtual void createDialogContent(); | 44 | virtual void createDialogContent(); |
385 | 45 | Ui_locationDialogForm* ui; | 45 | Ui_locationDialogForm* ui; |
386 | 46 | |||
387 | 47 | #ifdef Q_OS_WIN | ||
388 | 48 | virtual bool eventFilter(QObject *object, QEvent *event); | ||
389 | 49 | #endif | ||
390 | 46 | 50 | ||
391 | 47 | private: | 51 | private: |
392 | 48 | //! Set the values of all the fields from a location info | 52 | //! Set the values of all the fields from a location info |
393 | 49 | 53 | ||
394 | === modified file 'src/gui/SearchDialog.cpp' | |||
395 | --- src/gui/SearchDialog.cpp 2014-09-16 19:30:26 +0000 | |||
396 | +++ src/gui/SearchDialog.cpp 2014-10-07 08:24:37 +0000 | |||
397 | @@ -299,7 +299,13 @@ | |||
398 | 299 | connect(ui->lineEditSearchSkyObject, SIGNAL(selectionChanged()), this, SLOT(setHasSelectedFlag())); | 299 | connect(ui->lineEditSearchSkyObject, SIGNAL(selectionChanged()), this, SLOT(setHasSelectedFlag())); |
399 | 300 | connect(ui->lineEditSearchSkyObject, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint))); | 300 | connect(ui->lineEditSearchSkyObject, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint))); |
400 | 301 | 301 | ||
402 | 302 | ui->lineEditSearchSkyObject->installEventFilter(this); | 302 | ui->lineEditSearchSkyObject->installEventFilter(this); |
403 | 303 | #ifdef Q_OS_WIN | ||
404 | 304 | // Install the Event Filter to show the touch keyboard | ||
405 | 305 | ui->searchInListLineEdit->installEventFilter(this); | ||
406 | 306 | ui->AxisYSpinBox->installEventFilter(this); | ||
407 | 307 | ui->AxisXSpinBox->installEventFilter(this); | ||
408 | 308 | #endif | ||
409 | 303 | 309 | ||
410 | 304 | //Kinetic scrolling for tablet pc and pc | 310 | //Kinetic scrolling for tablet pc and pc |
411 | 305 | QList<QWidget *> addscroll; | 311 | QList<QWidget *> addscroll; |
412 | @@ -367,7 +373,7 @@ | |||
413 | 367 | updateListTab(); | 373 | updateListTab(); |
414 | 368 | 374 | ||
415 | 369 | // Set the focus directly on the line edit | 375 | // Set the focus directly on the line edit |
417 | 370 | if (ui->lineEditSearchSkyObject->isEnabled()) | 376 | if (ui->lineEditSearchSkyObject->isEnabled() && StelApp::getInstance().getSettings()->value("gui/flag_enable_touch_keyboard", false).toBool() == false) |
418 | 371 | ui->lineEditSearchSkyObject->setFocus(); | 377 | ui->lineEditSearchSkyObject->setFocus(); |
419 | 372 | } | 378 | } |
420 | 373 | 379 | ||
421 | @@ -615,8 +621,19 @@ | |||
422 | 615 | } | 621 | } |
423 | 616 | } | 622 | } |
424 | 617 | 623 | ||
426 | 618 | bool SearchDialog::eventFilter(QObject*, QEvent *event) | 624 | bool SearchDialog::eventFilter(QObject *object, QEvent *event) |
427 | 619 | { | 625 | { |
428 | 626 | #ifdef Q_OS_WIN | ||
429 | 627 | if (object == ui->lineEditSearchSkyObject || object == ui->searchInListLineEdit || object == ui->AxisXSpinBox || object == ui->AxisYSpinBox) | ||
430 | 628 | { | ||
431 | 629 | if (event->type() == QEvent::FocusIn) | ||
432 | 630 | showTouchKeyboard(true); | ||
433 | 631 | if (event->type() == QEvent::FocusOut) | ||
434 | 632 | showTouchKeyboard(false); | ||
435 | 633 | return false; | ||
436 | 634 | } | ||
437 | 635 | #endif | ||
438 | 636 | |||
439 | 620 | if (event->type() == QEvent::KeyRelease) | 637 | if (event->type() == QEvent::KeyRelease) |
440 | 621 | { | 638 | { |
441 | 622 | QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); | 639 | QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); |
442 | 623 | 640 | ||
443 | === modified file 'src/gui/ShortcutsDialog.cpp' | |||
444 | --- src/gui/ShortcutsDialog.cpp 2014-09-08 12:47:22 +0000 | |||
445 | +++ src/gui/ShortcutsDialog.cpp 2014-10-07 08:24:37 +0000 | |||
446 | @@ -296,6 +296,13 @@ | |||
447 | 296 | addscroll << ui->shortcutsTreeView; | 296 | addscroll << ui->shortcutsTreeView; |
448 | 297 | installKineticScrolling(addscroll); | 297 | installKineticScrolling(addscroll); |
449 | 298 | 298 | ||
450 | 299 | #ifdef Q_OS_WIN | ||
451 | 300 | // Install the Event Filter to show the touch keyboard | ||
452 | 301 | ui->primaryShortcutEdit->installEventFilter(this); | ||
453 | 302 | ui->lineEditSearch->installEventFilter(this); | ||
454 | 303 | ui->altShortcutEdit->installEventFilter(this); | ||
455 | 304 | #endif | ||
456 | 305 | |||
457 | 299 | connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); | 306 | connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); |
458 | 300 | connect(ui->shortcutsTreeView->selectionModel(), | 307 | connect(ui->shortcutsTreeView->selectionModel(), |
459 | 301 | SIGNAL(currentChanged(QModelIndex,QModelIndex)), | 308 | SIGNAL(currentChanged(QModelIndex,QModelIndex)), |
460 | @@ -496,3 +503,17 @@ | |||
461 | 496 | << q_("Alternative shortcut"); | 503 | << q_("Alternative shortcut"); |
462 | 497 | mainModel->setHorizontalHeaderLabels(headerLabels); | 504 | mainModel->setHorizontalHeaderLabels(headerLabels); |
463 | 498 | } | 505 | } |
464 | 506 | |||
465 | 507 | #ifdef Q_OS_WIN | ||
466 | 508 | bool ShortcutsDialog::eventFilter(QObject *object, QEvent *event) | ||
467 | 509 | { | ||
468 | 510 | if (object == ui->primaryShortcutEdit || object == ui->lineEditSearch || object == ui->altShortcutEdit) | ||
469 | 511 | { | ||
470 | 512 | if (event->type() == QEvent::FocusIn) | ||
471 | 513 | showTouchKeyboard(true); | ||
472 | 514 | if (event->type() == QEvent::FocusOut) | ||
473 | 515 | showTouchKeyboard(false); | ||
474 | 516 | } | ||
475 | 517 | return false; | ||
476 | 518 | } | ||
477 | 519 | #endif | ||
478 | 499 | \ No newline at end of file | 520 | \ No newline at end of file |
479 | 500 | 521 | ||
480 | === modified file 'src/gui/ShortcutsDialog.hpp' | |||
481 | --- src/gui/ShortcutsDialog.hpp 2014-09-08 12:47:22 +0000 | |||
482 | +++ src/gui/ShortcutsDialog.hpp 2014-10-07 08:24:37 +0000 | |||
483 | @@ -89,6 +89,10 @@ | |||
484 | 89 | //! Initialize the dialog widgets and connect the signals/slots. | 89 | //! Initialize the dialog widgets and connect the signals/slots. |
485 | 90 | virtual void createDialogContent(); | 90 | virtual void createDialogContent(); |
486 | 91 | 91 | ||
487 | 92 | #ifdef Q_OS_WIN | ||
488 | 93 | virtual bool eventFilter(QObject *object, QEvent *event); | ||
489 | 94 | #endif | ||
490 | 95 | |||
491 | 92 | private: | 96 | private: |
492 | 93 | //! checks whether given item can be changed by editors. | 97 | //! checks whether given item can be changed by editors. |
493 | 94 | static bool itemIsEditable(QStandardItem *item); | 98 | static bool itemIsEditable(QStandardItem *item); |
494 | 95 | 99 | ||
495 | === modified file 'src/gui/StelDialog.cpp' | |||
496 | --- src/gui/StelDialog.cpp 2014-09-14 16:45:46 +0000 | |||
497 | +++ src/gui/StelDialog.cpp 2014-10-07 08:24:37 +0000 | |||
498 | @@ -30,6 +30,12 @@ | |||
499 | 30 | #include <QSettings> | 30 | #include <QSettings> |
500 | 31 | #include <QScroller> | 31 | #include <QScroller> |
501 | 32 | 32 | ||
502 | 33 | #ifdef Q_OS_WIN | ||
503 | 34 | #include <windows.h> | ||
504 | 35 | #include <objbase.h> | ||
505 | 36 | #include <Tchar.h> | ||
506 | 37 | #endif | ||
507 | 38 | |||
508 | 33 | class CustomProxy : public QGraphicsProxyWidget | 39 | class CustomProxy : public QGraphicsProxyWidget |
509 | 34 | { | 40 | { |
510 | 35 | public: | 41 | public: |
511 | @@ -170,3 +176,32 @@ | |||
512 | 170 | QScroller::scroller(w); | 176 | QScroller::scroller(w); |
513 | 171 | } | 177 | } |
514 | 172 | } | 178 | } |
515 | 179 | |||
516 | 180 | #ifdef Q_OS_WIN | ||
517 | 181 | void StelDialog::showTouchKeyboard(bool show) | ||
518 | 182 | { | ||
519 | 183 | if (StelApp::getInstance().getSettings()->value("gui/flag_enable_touch_keyboard", false).toBool() == false) | ||
520 | 184 | return; | ||
521 | 185 | |||
522 | 186 | switch (QSysInfo::WindowsVersion){ | ||
523 | 187 | case QSysInfo::WV_6_3: | ||
524 | 188 | case QSysInfo::WV_6_2: | ||
525 | 189 | { | ||
526 | 190 | if (show) | ||
527 | 191 | { | ||
528 | 192 | ShellExecuteA(NULL, "open", "\"C:\\Program Files\\Common Files\\microsoft shared\\ink\\TabTip.exe\"", "", 0, SW_NORMAL); | ||
529 | 193 | } | ||
530 | 194 | else | ||
531 | 195 | { | ||
532 | 196 | HWND wKB = ::FindWindow(_TEXT("IPTip_Main_Window"), NULL); | ||
533 | 197 | if (wKB != NULL && ::IsWindowVisible(wKB)) | ||
534 | 198 | { | ||
535 | 199 | ::PostMessage(wKB, WM_SYSCOMMAND, SC_CLOSE, 0); | ||
536 | 200 | } | ||
537 | 201 | } | ||
538 | 202 | break; | ||
539 | 203 | } | ||
540 | 204 | default: return; | ||
541 | 205 | } | ||
542 | 206 | } | ||
543 | 207 | #endif | ||
544 | 173 | \ No newline at end of file | 208 | \ No newline at end of file |
545 | 174 | 209 | ||
546 | === modified file 'src/gui/StelDialog.hpp' | |||
547 | --- src/gui/StelDialog.hpp 2014-09-08 12:47:22 +0000 | |||
548 | +++ src/gui/StelDialog.hpp 2014-10-07 08:24:37 +0000 | |||
549 | @@ -81,6 +81,11 @@ | |||
550 | 81 | 81 | ||
551 | 82 | //! Kinetic scrolling for lists. | 82 | //! Kinetic scrolling for lists. |
552 | 83 | void installKineticScrolling(QList<QWidget *> addscroll); | 83 | void installKineticScrolling(QList<QWidget *> addscroll); |
553 | 84 | |||
554 | 85 | #ifdef Q_OS_WIN | ||
555 | 86 | //! Show touch Keyboard for tablet pc | ||
556 | 87 | void showTouchKeyboard(bool show); | ||
557 | 88 | #endif | ||
558 | 84 | }; | 89 | }; |
559 | 85 | 90 | ||
560 | 86 | #endif // _STELDIALOG_HPP_ | 91 | #endif // _STELDIALOG_HPP_ |
This code will give crash of Stellarium on Windows without virtual keyboard and/or with non-standard installation.