Merge lp:~alexwolf/stellarium/FOV-plugin into lp:stellarium
- FOV-plugin
- Merge into trunk
Proposed by
Alexander Wolf
Status: | Superseded |
---|---|
Proposed branch: | lp:~alexwolf/stellarium/FOV-plugin |
Merge into: | lp:stellarium |
Diff against target: |
1210 lines (+1121/-0) 12 files modified
CMakeLists.txt (+1/-0) plugins/CMakeLists.txt (+3/-0) plugins/FOV/CMakeLists.txt (+19/-0) plugins/FOV/src/CMakeLists.txt (+30/-0) plugins/FOV/src/FOV.cpp (+179/-0) plugins/FOV/src/FOV.hpp (+87/-0) plugins/FOV/src/gui/FOVWindow.cpp (+164/-0) plugins/FOV/src/gui/FOVWindow.hpp (+71/-0) plugins/FOV/src/gui/fovWindow.ui (+555/-0) po/stellarium/POTFILES.in (+3/-0) src/CMakeLists.txt (+5/-0) src/core/StelApp.cpp (+4/-0) |
To merge this branch: | bzr merge lp:~alexwolf/stellarium/FOV-plugin |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
treaves | Approve | ||
Review via email: mp+200838@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-01-08.
Commit message
Description of the change
I propose for merging the plugin which gives stepwise zooming like in Cartes du Ciel planetarium via keyboard shortcuts. Few users annoying me with constant requests of this feature.
To post a comment you must log in.
- 6443. By Alexander Wolf
-
optimize GUI and requests
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2013-12-22 18:36:36 +0000 |
3 | +++ CMakeLists.txt 2014-01-08 14:57:20 +0000 |
4 | @@ -194,6 +194,7 @@ |
5 | SET(USE_PLUGIN_ANGLEMEASURE 1 CACHE BOOL "Define whether the AngleMeasure plugin should be created.") |
6 | SET(USE_PLUGIN_COMPASSMARKS 1 CACHE BOOL "Define whether the CompassMarks plugin should be created.") |
7 | SET(USE_PLUGIN_EXOPLANETS 1 CACHE BOOL "Define whether the Exoplanets plugin should be created.") |
8 | +SET(USE_PLUGIN_FOV 1 CACHE BOOL "Define whether the FOV plugin should be created.") |
9 | SET(USE_PLUGIN_LOGBOOK 0 CACHE BOOL "Define whether the LogBook plugin should be created.") |
10 | SET(USE_PLUGIN_NOVAE 1 CACHE BOOL "Define whether the Novae plugin should be created.") |
11 | SET(USE_PLUGIN_OBSERVABILITY 1 CACHE BOOL "Define whether the Observability plugin should be created.") |
12 | |
13 | === modified file 'plugins/CMakeLists.txt' |
14 | --- plugins/CMakeLists.txt 2013-09-23 20:24:50 +0000 |
15 | +++ plugins/CMakeLists.txt 2014-01-08 14:57:20 +0000 |
16 | @@ -61,6 +61,9 @@ |
17 | IF (USE_PLUGIN_EXOPLANETS) |
18 | ADD_SUBDIRECTORY( Exoplanets ) |
19 | ENDIF() |
20 | +IF (USE_PLUGIN_FOV) |
21 | + ADD_SUBDIRECTORY( FOV ) |
22 | +ENDIF() |
23 | IF (USE_PLUGIN_VIRGO) |
24 | SET(VIRGO_PROJECT_PATH "../extmodules/VirGO/" CACHE PATH "The location of the VirGO plugin main directory i.e. the one containing the top level CMakeLists.txt") |
25 | ADD_SUBDIRECTORY( ${VIRGO_PROJECT_PATH} VirGO ) |
26 | |
27 | === added directory 'plugins/FOV' |
28 | === added file 'plugins/FOV/CMakeLists.txt' |
29 | --- plugins/FOV/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
30 | +++ plugins/FOV/CMakeLists.txt 2014-01-08 14:57:20 +0000 |
31 | @@ -0,0 +1,19 @@ |
32 | + |
33 | +SET(FOV_MAJOR "0") |
34 | +SET(FOV_MINOR "0") |
35 | +SET(FOV_PATCH "1") |
36 | +SET(FOV_VERSION "${FOV_MAJOR}.${FOV_MINOR}.${FOV_PATCH}") |
37 | + |
38 | +IF(APPLE) |
39 | + SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/Library/Application\ Support/Stellarium) |
40 | +ElSE(APPLE) |
41 | + SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/.stellarium) |
42 | +ENDIF(APPLE) |
43 | + |
44 | +ADD_DEFINITIONS(-DFOV_VERSION="${FOV_VERSION}") |
45 | + |
46 | +ADD_SUBDIRECTORY( src ) |
47 | + |
48 | +INSTALL(FILES DESTINATION "modules/FOV") |
49 | + |
50 | + |
51 | |
52 | === added directory 'plugins/FOV/src' |
53 | === added file 'plugins/FOV/src/CMakeLists.txt' |
54 | --- plugins/FOV/src/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
55 | +++ plugins/FOV/src/CMakeLists.txt 2014-01-08 14:57:20 +0000 |
56 | @@ -0,0 +1,30 @@ |
57 | + |
58 | +INCLUDE_DIRECTORIES( |
59 | + ${CMAKE_BINARY_DIR} |
60 | + ${CMAKE_BINARY_DIR}/plugins/FOV/src |
61 | + ${CMAKE_BINARY_DIR}/plugins/FOV/src/gui |
62 | + . gui) |
63 | + |
64 | +LINK_DIRECTORIES(/src) |
65 | + |
66 | +SET(FOV_SRCS |
67 | + FOV.hpp |
68 | + FOV.cpp |
69 | + gui/FOVWindow.hpp |
70 | + gui/FOVWindow.cpp |
71 | + ) |
72 | + |
73 | +SET(FOV_UIS |
74 | + gui/fovWindow.ui |
75 | +) |
76 | + |
77 | +QT5_WRAP_UI(FOV_UIS_H ${FOV_UIS}) |
78 | + |
79 | +SET(extLinkerOption ${OPENGL_LIBRARIES}) |
80 | + |
81 | +ADD_LIBRARY(FOV-static STATIC ${FOV_SRCS} ${FOV_RES_CXX} ${FOV_UIS_H}) |
82 | +QT5_USE_MODULES(FOV-static Core Declarative Network) |
83 | +SET_TARGET_PROPERTIES(FOV-static PROPERTIES OUTPUT_NAME "FOV") |
84 | +TARGET_LINK_LIBRARIES(FOV-static ${extLinkerOption}) |
85 | +SET_TARGET_PROPERTIES(FOV-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN") |
86 | +ADD_DEPENDENCIES(AllStaticPlugins FOV-static) |
87 | |
88 | === added file 'plugins/FOV/src/FOV.cpp' |
89 | --- plugins/FOV/src/FOV.cpp 1970-01-01 00:00:00 +0000 |
90 | +++ plugins/FOV/src/FOV.cpp 2014-01-08 14:57:20 +0000 |
91 | @@ -0,0 +1,179 @@ |
92 | +/* |
93 | + * FOV plug-in for Stellarium |
94 | + * |
95 | + * Copyright (C) 2014 Alexander Wolf |
96 | + * |
97 | + * This program is free software; you can redistribute it and/or |
98 | + * modify it under the terms of the GNU General Public License |
99 | + * as published by the Free Software Foundation; either version 2 |
100 | + * of the License, or (at your option) any later version. |
101 | + * |
102 | + * This program is distributed in the hope that it will be useful, |
103 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
104 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
105 | + * GNU General Public License for more details. |
106 | + * |
107 | + * You should have received a copy of the GNU General Public License |
108 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
109 | + */ |
110 | + |
111 | +#include "FOV.hpp" |
112 | +#include "FOVWindow.hpp" |
113 | + |
114 | +#include "StelApp.hpp" |
115 | +#include "StelCore.hpp" |
116 | +#include "StelLocaleMgr.hpp" |
117 | +#include "StelModule.hpp" |
118 | +#include "StelMovementMgr.hpp" |
119 | + |
120 | +#include <QSettings> |
121 | + |
122 | +StelModule* FOVStelPluginInterface::getStelModule() const |
123 | +{ |
124 | + return new FOV(); |
125 | +} |
126 | + |
127 | +StelPluginInfo FOVStelPluginInterface::getPluginInfo() const |
128 | +{ |
129 | + StelPluginInfo info; |
130 | + info.id = "FOV"; |
131 | + info.displayedName = N_("Field of View"); |
132 | + info.authors = "Alexander Wolf"; |
133 | + info.contact = "http://stellarium.org"; |
134 | + info.description = N_("This plugin gives stepwise zooming like in <em>Cartes du Ciel</em> planetarium via keyboard shortcuts."); |
135 | + return info; |
136 | +} |
137 | + |
138 | +FOV::FOV() |
139 | +{ |
140 | + setObjectName("FOV"); |
141 | + mainWindow = new FOVWindow(); |
142 | + conf = StelApp::getInstance().getSettings(); |
143 | +} |
144 | + |
145 | +FOV::~FOV() |
146 | +{ |
147 | + delete mainWindow; |
148 | +} |
149 | + |
150 | +void FOV::init() |
151 | +{ |
152 | + FOVitem.clear(); |
153 | + FOVitem << -1 << -1 << -1 << -1 << -1 << -1 << -1 << -1 << -1 << -1; |
154 | + // Default values of FOV (degrees) |
155 | + FOVdefault.clear(); |
156 | + FOVdefault << 0.5 << 180.0 << 90.0 << 60.0 << 45.0 << 20.0 << 10.0 << 5.0 << 2.0 << 1.0; |
157 | + |
158 | + if (!conf->childGroups().contains("fov")) |
159 | + { |
160 | + qDebug() << "FOV::init no fov section exists in main config file - creating with defaults"; |
161 | + restoreDefaultConfigIni(); |
162 | + } |
163 | + |
164 | + // populate settings from main config file. |
165 | + readSettingsFromConfig(); |
166 | + |
167 | + // key bindings |
168 | + QString section = N_("Field of View"); |
169 | + for (int i=0; i<10; i++) |
170 | + { |
171 | + QString name = QString("actionSetFOV%1").arg(i); |
172 | + QString shortcut = QString("Ctrl+Alt+%1").arg(i); |
173 | + QString text = q_("Set FOV in %1%2").arg(getQuickFOV(i)).arg(QChar(0x00B0)); |
174 | + addAction(name, section, text, "setFOV()", shortcut); |
175 | + } |
176 | +} |
177 | + |
178 | +void FOV::deinit() |
179 | +{ |
180 | + // |
181 | +} |
182 | + |
183 | +double FOV::getCallOrder(StelModuleActionName) const |
184 | +{ |
185 | + return 0.; |
186 | +} |
187 | + |
188 | +void FOV::update(double) |
189 | +{ |
190 | + // |
191 | +} |
192 | + |
193 | +bool FOV::configureGui(bool show) |
194 | +{ |
195 | + if (show) |
196 | + { |
197 | + mainWindow->setVisible(true); |
198 | + } |
199 | + |
200 | + return true; |
201 | +} |
202 | + |
203 | +void FOV::restoreDefaults(void) |
204 | +{ |
205 | + restoreDefaultConfigIni(); |
206 | + readSettingsFromConfig(); |
207 | +} |
208 | + |
209 | +void FOV::restoreDefaultConfigIni(void) |
210 | +{ |
211 | + conf->beginGroup("fov"); |
212 | + |
213 | + // delete all existing FOV settings... |
214 | + conf->remove(""); |
215 | + |
216 | + for (int i=0; i<10; i++) |
217 | + { |
218 | + conf->setValue(QString("fov_quick_%1").arg(i), FOVdefault.at(i)); |
219 | + } |
220 | + |
221 | + conf->endGroup(); |
222 | +} |
223 | + |
224 | +void FOV::readSettingsFromConfig(void) |
225 | +{ |
226 | + conf->beginGroup("fov"); |
227 | + |
228 | + for(int i=0; i<10; i++) |
229 | + { |
230 | + setQuickFOV(conf->value(QString("fov_quick_%1").arg(i), FOVdefault.at(i)).toDouble(), i); |
231 | + } |
232 | + |
233 | + conf->endGroup(); |
234 | +} |
235 | + |
236 | +void FOV::saveSettingsToConfig(void) |
237 | +{ |
238 | + conf->beginGroup("fov"); |
239 | + |
240 | + for(int i=0; i<10; i++) |
241 | + { |
242 | + conf->setValue(QString("fov_quick_%1").arg(i), getQuickFOV(i)); |
243 | + } |
244 | + |
245 | + conf->endGroup(); |
246 | +} |
247 | + |
248 | +double FOV::getQuickFOV(int item) |
249 | +{ |
250 | + return FOVitem.at(item); |
251 | +} |
252 | + |
253 | +void FOV::setQuickFOV(double value, int item) |
254 | +{ |
255 | + FOVitem[item] = value; |
256 | +} |
257 | + |
258 | +void FOV::setFOV() |
259 | +{ |
260 | + // Find out for which FOV is the command |
261 | + if (sender() == NULL) |
262 | + { |
263 | + return; |
264 | + } |
265 | + // XXX: we could use a QSignalMapper instead of this trick. |
266 | + int slotNumber = sender()->objectName().right(1).toInt(); |
267 | + |
268 | + StelMovementMgr *movementManager = StelApp::getInstance().getCore()->getMovementMgr(); |
269 | + movementManager->zoomTo(getQuickFOV(slotNumber), 1.f); // One second for zooming |
270 | +} |
271 | |
272 | === added file 'plugins/FOV/src/FOV.hpp' |
273 | --- plugins/FOV/src/FOV.hpp 1970-01-01 00:00:00 +0000 |
274 | +++ plugins/FOV/src/FOV.hpp 2014-01-08 14:57:20 +0000 |
275 | @@ -0,0 +1,87 @@ |
276 | +/* |
277 | + * FOV plug-in for Stellarium |
278 | + * |
279 | + * Copyright (C) 2014 Alexander Wolf |
280 | + * |
281 | + * This program is free software; you can redistribute it and/or |
282 | + * modify it under the terms of the GNU General Public License |
283 | + * as published by the Free Software Foundation; either version 2 |
284 | + * of the License, or (at your option) any later version. |
285 | + * |
286 | + * This program is distributed in the hope that it will be useful, |
287 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
288 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
289 | + * GNU General Public License for more details. |
290 | + * |
291 | + * You should have received a copy of the GNU General Public License |
292 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
293 | + */ |
294 | + |
295 | +#ifndef _FOV_HPP_ |
296 | +#define _FOV_HPP_ |
297 | + |
298 | +#include "StelGui.hpp" |
299 | +#include "StelModule.hpp" |
300 | + |
301 | +#include <QString> |
302 | + |
303 | +class FOVWindow; |
304 | + |
305 | +class FOV : public StelModule |
306 | +{ |
307 | + Q_OBJECT |
308 | + |
309 | +public: |
310 | + FOV(); |
311 | + ~FOV(); |
312 | + |
313 | + virtual void init(); |
314 | + virtual void deinit(); |
315 | + virtual void update(double deltaTime); |
316 | + //virtual void draw(StelCore *core); |
317 | + virtual double getCallOrder(StelModuleActionName actionName) const; |
318 | + virtual bool configureGui(bool show); |
319 | + |
320 | + //! Set up the plugin with default values. This means clearing out the Pulsars section in the |
321 | + //! main config.ini (if one already exists), and populating it with default values. |
322 | + void restoreDefaults(void); |
323 | + |
324 | + //! Read (or re-read) settings from the main config file. This will be called from init and also |
325 | + //! when restoring defaults (i.e. from the configuration dialog / restore defaults button). |
326 | + void readSettingsFromConfig(void); |
327 | + |
328 | + //! Save the settings to the main configuration file. |
329 | + void saveSettingsToConfig(void); |
330 | + |
331 | + void setQuickFOV(double value, int item); |
332 | + double getQuickFOV(int item); |
333 | + |
334 | +public slots: |
335 | + void setFOV(); |
336 | + |
337 | +private: |
338 | + // if existing, delete Satellites section in main config.ini, then create with default values |
339 | + void restoreDefaultConfigIni(void); |
340 | + |
341 | + QList<double> FOVitem, FOVdefault; |
342 | + |
343 | + FOVWindow* mainWindow; |
344 | + QSettings* conf; |
345 | +}; |
346 | + |
347 | + |
348 | +#include <QObject> |
349 | +#include "StelPluginInterface.hpp" |
350 | + |
351 | +//! This class is used by Qt to manage a plug-in interface |
352 | +class FOVStelPluginInterface : public QObject, public StelPluginInterface |
353 | +{ |
354 | + Q_OBJECT |
355 | + Q_PLUGIN_METADATA(IID "stellarium.StelGuiPluginInterface/1.0") |
356 | + Q_INTERFACES(StelPluginInterface) |
357 | +public: |
358 | + virtual StelModule* getStelModule() const; |
359 | + virtual StelPluginInfo getPluginInfo() const; |
360 | +}; |
361 | + |
362 | +#endif /* _FOV_HPP_ */ |
363 | |
364 | === added directory 'plugins/FOV/src/gui' |
365 | === added file 'plugins/FOV/src/gui/FOVWindow.cpp' |
366 | --- plugins/FOV/src/gui/FOVWindow.cpp 1970-01-01 00:00:00 +0000 |
367 | +++ plugins/FOV/src/gui/FOVWindow.cpp 2014-01-08 14:57:20 +0000 |
368 | @@ -0,0 +1,164 @@ |
369 | +/* |
370 | + * FOV plug-in for Stellarium |
371 | + * |
372 | + * Copyright (C) 2014 Alexander Wolf |
373 | + * |
374 | + * This program is free software; you can redistribute it and/or |
375 | + * modify it under the terms of the GNU General Public License |
376 | + * as published by the Free Software Foundation; either version 2 |
377 | + * of the License, or (at your option) any later version. |
378 | + * |
379 | + * This program is distributed in the hope that it will be useful, |
380 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
381 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
382 | + * GNU General Public License for more details. |
383 | + * |
384 | + * You should have received a copy of the GNU General Public License |
385 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
386 | + */ |
387 | + |
388 | +#include "FOV.hpp" |
389 | +#include "FOVWindow.hpp" |
390 | +#include "ui_fovWindow.h" |
391 | + |
392 | +#include "StelApp.hpp" |
393 | +#include "StelLocaleMgr.hpp" |
394 | +#include "StelModule.hpp" |
395 | +#include "StelModuleMgr.hpp" |
396 | + |
397 | +FOVWindow::FOVWindow() |
398 | +{ |
399 | + ui = new Ui_fovWindowForm(); |
400 | +} |
401 | + |
402 | +FOVWindow::~FOVWindow() |
403 | +{ |
404 | + delete ui; |
405 | +} |
406 | + |
407 | +void FOVWindow::retranslate() |
408 | +{ |
409 | + if (dialog) |
410 | + { |
411 | + ui->retranslateUi(dialog); |
412 | + updateAboutText(); |
413 | + updateInfoText(); |
414 | + } |
415 | +} |
416 | + |
417 | +void FOVWindow::createDialogContent() |
418 | +{ |
419 | + fov = GETSTELMODULE(FOV); |
420 | + ui->setupUi(dialog); |
421 | + |
422 | + connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); |
423 | + connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); |
424 | + |
425 | + populateFOV(); |
426 | + |
427 | + connect(ui->doubleSpinBoxFOV0, SIGNAL(valueChanged(double)), this, SLOT(updateFOV0(double))); |
428 | + connect(ui->doubleSpinBoxFOV1, SIGNAL(valueChanged(double)), this, SLOT(updateFOV1(double))); |
429 | + connect(ui->doubleSpinBoxFOV2, SIGNAL(valueChanged(double)), this, SLOT(updateFOV2(double))); |
430 | + connect(ui->doubleSpinBoxFOV3, SIGNAL(valueChanged(double)), this, SLOT(updateFOV3(double))); |
431 | + connect(ui->doubleSpinBoxFOV4, SIGNAL(valueChanged(double)), this, SLOT(updateFOV4(double))); |
432 | + connect(ui->doubleSpinBoxFOV5, SIGNAL(valueChanged(double)), this, SLOT(updateFOV5(double))); |
433 | + connect(ui->doubleSpinBoxFOV6, SIGNAL(valueChanged(double)), this, SLOT(updateFOV6(double))); |
434 | + connect(ui->doubleSpinBoxFOV7, SIGNAL(valueChanged(double)), this, SLOT(updateFOV7(double))); |
435 | + connect(ui->doubleSpinBoxFOV8, SIGNAL(valueChanged(double)), this, SLOT(updateFOV8(double))); |
436 | + connect(ui->doubleSpinBoxFOV9, SIGNAL(valueChanged(double)), this, SLOT(updateFOV9(double))); |
437 | + |
438 | + connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(saveFOVSettings())); |
439 | + connect(ui->pushButtonReset, SIGNAL(clicked()), this, SLOT(resetFOVSettings())); |
440 | + |
441 | + updateAboutText(); |
442 | + updateInfoText(); |
443 | +} |
444 | + |
445 | +void FOVWindow::updateAboutText() |
446 | +{ |
447 | + ui->labelTitle->setText(q_("Field of View plug-in")); |
448 | + QString version = QString(q_("Version %1")).arg(FOV_VERSION); |
449 | + ui->labelVersion->setText(version); |
450 | +} |
451 | + |
452 | +void FOVWindow::updateInfoText() |
453 | +{ |
454 | + // Regexp to replace {text} with an HTML link. |
455 | + QRegExp a_rx = QRegExp("[{]([^{]*)[}]"); |
456 | + ui->labelFOVInfo->setText(q_("By default Stellarium use smooth zooming via mouse wheel or keyboard shortcuts. Some users want stepwise zooming like in <em>{Cartes du Ciel}</em> planetarium and this plugin give this feature. You can edit values and use keyboard for quick set FOV. All values in degrees.").replace(a_rx, "<a href=\"http://www.ap-i.net/skychart/start\">\\1</a>")); |
457 | +} |
458 | + |
459 | +void FOVWindow::saveFOVSettings() |
460 | +{ |
461 | + fov->saveSettingsToConfig(); |
462 | +} |
463 | + |
464 | +void FOVWindow::resetFOVSettings() |
465 | +{ |
466 | + fov->restoreDefaults(); |
467 | + populateFOV(); |
468 | +} |
469 | + |
470 | +void FOVWindow::updateFOV0(double value) |
471 | +{ |
472 | + fov->setQuickFOV(value, 0); |
473 | +} |
474 | + |
475 | +void FOVWindow::updateFOV1(double value) |
476 | +{ |
477 | + fov->setQuickFOV(value, 1); |
478 | +} |
479 | + |
480 | +void FOVWindow::updateFOV2(double value) |
481 | +{ |
482 | + fov->setQuickFOV(value, 2); |
483 | +} |
484 | + |
485 | +void FOVWindow::updateFOV3(double value) |
486 | +{ |
487 | + fov->setQuickFOV(value, 3); |
488 | +} |
489 | + |
490 | +void FOVWindow::updateFOV4(double value) |
491 | +{ |
492 | + fov->setQuickFOV(value, 4); |
493 | +} |
494 | + |
495 | +void FOVWindow::updateFOV5(double value) |
496 | +{ |
497 | + fov->setQuickFOV(value, 5); |
498 | +} |
499 | + |
500 | +void FOVWindow::updateFOV6(double value) |
501 | +{ |
502 | + fov->setQuickFOV(value, 6); |
503 | +} |
504 | + |
505 | +void FOVWindow::updateFOV7(double value) |
506 | +{ |
507 | + fov->setQuickFOV(value, 7); |
508 | +} |
509 | + |
510 | +void FOVWindow::updateFOV8(double value) |
511 | +{ |
512 | + fov->setQuickFOV(value, 8); |
513 | +} |
514 | + |
515 | +void FOVWindow::updateFOV9(double value) |
516 | +{ |
517 | + fov->setQuickFOV(value, 9); |
518 | +} |
519 | + |
520 | +void FOVWindow::populateFOV() |
521 | +{ |
522 | + ui->doubleSpinBoxFOV0->setValue(fov->getQuickFOV(0)); |
523 | + ui->doubleSpinBoxFOV1->setValue(fov->getQuickFOV(1)); |
524 | + ui->doubleSpinBoxFOV2->setValue(fov->getQuickFOV(2)); |
525 | + ui->doubleSpinBoxFOV3->setValue(fov->getQuickFOV(3)); |
526 | + ui->doubleSpinBoxFOV4->setValue(fov->getQuickFOV(4)); |
527 | + ui->doubleSpinBoxFOV5->setValue(fov->getQuickFOV(5)); |
528 | + ui->doubleSpinBoxFOV6->setValue(fov->getQuickFOV(6)); |
529 | + ui->doubleSpinBoxFOV7->setValue(fov->getQuickFOV(7)); |
530 | + ui->doubleSpinBoxFOV8->setValue(fov->getQuickFOV(8)); |
531 | + ui->doubleSpinBoxFOV9->setValue(fov->getQuickFOV(9)); |
532 | +} |
533 | |
534 | === added file 'plugins/FOV/src/gui/FOVWindow.hpp' |
535 | --- plugins/FOV/src/gui/FOVWindow.hpp 1970-01-01 00:00:00 +0000 |
536 | +++ plugins/FOV/src/gui/FOVWindow.hpp 2014-01-08 14:57:20 +0000 |
537 | @@ -0,0 +1,71 @@ |
538 | +/* |
539 | + * FOV plug-in for Stellarium |
540 | + * |
541 | + * Copyright (C) 2014 Alexander Wolf |
542 | + * |
543 | + * This program is free software; you can redistribute it and/or |
544 | + * modify it under the terms of the GNU General Public License |
545 | + * as published by the Free Software Foundation; either version 2 |
546 | + * of the License, or (at your option) any later version. |
547 | + * |
548 | + * This program is distributed in the hope that it will be useful, |
549 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
550 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
551 | + * GNU General Public License for more details. |
552 | + * |
553 | + * You should have received a copy of the GNU General Public License |
554 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
555 | + */ |
556 | + |
557 | +#ifndef _FOV_WINDOW_HPP_ |
558 | +#define _FOV_WINDOW_HPP_ |
559 | + |
560 | +#include "StelDialog.hpp" |
561 | + |
562 | +#include <QString> |
563 | +#include <QDoubleSpinBox> |
564 | + |
565 | +class Ui_fovWindowForm; |
566 | +class FOV; |
567 | + |
568 | +//! Main window of the FOV plug-in. |
569 | +class FOVWindow : public StelDialog |
570 | +{ |
571 | + Q_OBJECT |
572 | + |
573 | +public: |
574 | + FOVWindow(); |
575 | + ~FOVWindow(); |
576 | + |
577 | +public slots: |
578 | + void retranslate(); |
579 | + |
580 | +protected: |
581 | + void createDialogContent(); |
582 | + |
583 | +private: |
584 | + Ui_fovWindowForm* ui; |
585 | + FOV* fov; |
586 | + |
587 | + void updateAboutText(); |
588 | + void updateInfoText(); |
589 | + void populateFOV(); |
590 | + |
591 | +private slots: |
592 | + void saveFOVSettings(); |
593 | + void resetFOVSettings(); |
594 | + void updateFOV0(double value); |
595 | + void updateFOV1(double value); |
596 | + void updateFOV2(double value); |
597 | + void updateFOV3(double value); |
598 | + void updateFOV4(double value); |
599 | + void updateFOV5(double value); |
600 | + void updateFOV6(double value); |
601 | + void updateFOV7(double value); |
602 | + void updateFOV8(double value); |
603 | + void updateFOV9(double value); |
604 | + |
605 | +}; |
606 | + |
607 | + |
608 | +#endif /* _FOV_WINDOW_HPP_ */ |
609 | |
610 | === added file 'plugins/FOV/src/gui/fovWindow.ui' |
611 | --- plugins/FOV/src/gui/fovWindow.ui 1970-01-01 00:00:00 +0000 |
612 | +++ plugins/FOV/src/gui/fovWindow.ui 2014-01-08 14:57:20 +0000 |
613 | @@ -0,0 +1,555 @@ |
614 | +<?xml version="1.0" encoding="UTF-8"?> |
615 | +<ui version="4.0"> |
616 | + <class>fovWindowForm</class> |
617 | + <widget class="QWidget" name="fovWindowForm"> |
618 | + <property name="geometry"> |
619 | + <rect> |
620 | + <x>0</x> |
621 | + <y>0</y> |
622 | + <width>448</width> |
623 | + <height>461</height> |
624 | + </rect> |
625 | + </property> |
626 | + <layout class="QVBoxLayout" name="verticalLayout"> |
627 | + <property name="spacing"> |
628 | + <number>0</number> |
629 | + </property> |
630 | + <property name="leftMargin"> |
631 | + <number>0</number> |
632 | + </property> |
633 | + <property name="topMargin"> |
634 | + <number>0</number> |
635 | + </property> |
636 | + <property name="rightMargin"> |
637 | + <number>0</number> |
638 | + </property> |
639 | + <property name="bottomMargin"> |
640 | + <number>0</number> |
641 | + </property> |
642 | + <item> |
643 | + <widget class="BarFrame" name="TitleBar"> |
644 | + <property name="sizePolicy"> |
645 | + <sizepolicy hsizetype="Expanding" vsizetype="Minimum"> |
646 | + <horstretch>0</horstretch> |
647 | + <verstretch>0</verstretch> |
648 | + </sizepolicy> |
649 | + </property> |
650 | + <property name="minimumSize"> |
651 | + <size> |
652 | + <width>0</width> |
653 | + <height>25</height> |
654 | + </size> |
655 | + </property> |
656 | + <property name="maximumSize"> |
657 | + <size> |
658 | + <width>16777215</width> |
659 | + <height>30</height> |
660 | + </size> |
661 | + </property> |
662 | + <property name="focusPolicy"> |
663 | + <enum>Qt::NoFocus</enum> |
664 | + </property> |
665 | + <property name="autoFillBackground"> |
666 | + <bool>false</bool> |
667 | + </property> |
668 | + <property name="frameShape"> |
669 | + <enum>QFrame::StyledPanel</enum> |
670 | + </property> |
671 | + <layout class="QHBoxLayout"> |
672 | + <property name="spacing"> |
673 | + <number>6</number> |
674 | + </property> |
675 | + <property name="leftMargin"> |
676 | + <number>0</number> |
677 | + </property> |
678 | + <property name="topMargin"> |
679 | + <number>0</number> |
680 | + </property> |
681 | + <property name="rightMargin"> |
682 | + <number>4</number> |
683 | + </property> |
684 | + <property name="bottomMargin"> |
685 | + <number>0</number> |
686 | + </property> |
687 | + <item> |
688 | + <spacer name="leftSpacer"> |
689 | + <property name="orientation"> |
690 | + <enum>Qt::Horizontal</enum> |
691 | + </property> |
692 | + <property name="sizeHint" stdset="0"> |
693 | + <size> |
694 | + <width>40</width> |
695 | + <height>20</height> |
696 | + </size> |
697 | + </property> |
698 | + </spacer> |
699 | + </item> |
700 | + <item> |
701 | + <widget class="QLabel" name="stelWindowTitle"> |
702 | + <property name="text"> |
703 | + <string>Field of View</string> |
704 | + </property> |
705 | + </widget> |
706 | + </item> |
707 | + <item> |
708 | + <spacer name="rightSpacer"> |
709 | + <property name="orientation"> |
710 | + <enum>Qt::Horizontal</enum> |
711 | + </property> |
712 | + <property name="sizeHint" stdset="0"> |
713 | + <size> |
714 | + <width>40</width> |
715 | + <height>20</height> |
716 | + </size> |
717 | + </property> |
718 | + </spacer> |
719 | + </item> |
720 | + <item> |
721 | + <widget class="QPushButton" name="closeStelWindow"> |
722 | + <property name="minimumSize"> |
723 | + <size> |
724 | + <width>16</width> |
725 | + <height>16</height> |
726 | + </size> |
727 | + </property> |
728 | + <property name="maximumSize"> |
729 | + <size> |
730 | + <width>16</width> |
731 | + <height>16</height> |
732 | + </size> |
733 | + </property> |
734 | + <property name="focusPolicy"> |
735 | + <enum>Qt::NoFocus</enum> |
736 | + </property> |
737 | + <property name="text"> |
738 | + <string/> |
739 | + </property> |
740 | + </widget> |
741 | + </item> |
742 | + </layout> |
743 | + </widget> |
744 | + </item> |
745 | + <item> |
746 | + <widget class="QTabWidget" name="tabWidget"> |
747 | + <property name="currentIndex"> |
748 | + <number>0</number> |
749 | + </property> |
750 | + <widget class="QWidget" name="tabFOV"> |
751 | + <attribute name="title"> |
752 | + <string>Field of View</string> |
753 | + </attribute> |
754 | + <layout class="QVBoxLayout" name="verticalLayoutTimeZone"> |
755 | + <property name="spacing"> |
756 | + <number>0</number> |
757 | + </property> |
758 | + <property name="leftMargin"> |
759 | + <number>0</number> |
760 | + </property> |
761 | + <property name="topMargin"> |
762 | + <number>0</number> |
763 | + </property> |
764 | + <property name="rightMargin"> |
765 | + <number>0</number> |
766 | + </property> |
767 | + <property name="bottomMargin"> |
768 | + <number>0</number> |
769 | + </property> |
770 | + <item> |
771 | + <widget class="QGroupBox" name="groupBoxFOV"> |
772 | + <property name="minimumSize"> |
773 | + <size> |
774 | + <width>0</width> |
775 | + <height>400</height> |
776 | + </size> |
777 | + </property> |
778 | + <property name="title"> |
779 | + <string>Field of View</string> |
780 | + </property> |
781 | + <property name="alignment"> |
782 | + <set>Qt::AlignCenter</set> |
783 | + </property> |
784 | + <layout class="QGridLayout" name="gridLayoutCurrent"> |
785 | + <property name="leftMargin"> |
786 | + <number>0</number> |
787 | + </property> |
788 | + <property name="topMargin"> |
789 | + <number>0</number> |
790 | + </property> |
791 | + <property name="rightMargin"> |
792 | + <number>0</number> |
793 | + </property> |
794 | + <property name="bottomMargin"> |
795 | + <number>0</number> |
796 | + </property> |
797 | + <property name="verticalSpacing"> |
798 | + <number>8</number> |
799 | + </property> |
800 | + <item row="11" column="0" colspan="4"> |
801 | + <spacer name="verticalSpacerTimeZone"> |
802 | + <property name="orientation"> |
803 | + <enum>Qt::Vertical</enum> |
804 | + </property> |
805 | + <property name="sizeHint" stdset="0"> |
806 | + <size> |
807 | + <width>0</width> |
808 | + <height>0</height> |
809 | + </size> |
810 | + </property> |
811 | + </spacer> |
812 | + </item> |
813 | + <item row="5" column="0" alignment="Qt::AlignRight"> |
814 | + <widget class="QLabel" name="labelFOV5"> |
815 | + <property name="text"> |
816 | + <string>Ctrl+Alt+5</string> |
817 | + </property> |
818 | + </widget> |
819 | + </item> |
820 | + <item row="5" column="2" alignment="Qt::AlignRight"> |
821 | + <widget class="QLabel" name="labelFOV0"> |
822 | + <property name="text"> |
823 | + <string>Ctrl+Alt+0</string> |
824 | + </property> |
825 | + </widget> |
826 | + </item> |
827 | + <item row="3" column="2" alignment="Qt::AlignRight"> |
828 | + <widget class="QLabel" name="labelFOV8"> |
829 | + <property name="text"> |
830 | + <string>Ctrl+Alt+8</string> |
831 | + </property> |
832 | + </widget> |
833 | + </item> |
834 | + <item row="10" column="2" colspan="2"> |
835 | + <widget class="QPushButton" name="pushButtonReset"> |
836 | + <property name="text"> |
837 | + <string>Restore defaults</string> |
838 | + </property> |
839 | + </widget> |
840 | + </item> |
841 | + <item row="3" column="0" alignment="Qt::AlignRight"> |
842 | + <widget class="QLabel" name="labelFOV3"> |
843 | + <property name="text"> |
844 | + <string>Ctrl+Alt+3</string> |
845 | + </property> |
846 | + </widget> |
847 | + </item> |
848 | + <item row="1" column="2" alignment="Qt::AlignRight"> |
849 | + <widget class="QLabel" name="labelFOV6"> |
850 | + <property name="text"> |
851 | + <string>Ctrl+Alt+6</string> |
852 | + </property> |
853 | + </widget> |
854 | + </item> |
855 | + <item row="5" column="1"> |
856 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV5"> |
857 | + <property name="decimals"> |
858 | + <number>1</number> |
859 | + </property> |
860 | + <property name="maximum"> |
861 | + <double>360.000000000000000</double> |
862 | + </property> |
863 | + <property name="singleStep"> |
864 | + <double>0.100000000000000</double> |
865 | + </property> |
866 | + <property name="value"> |
867 | + <double>20.000000000000000</double> |
868 | + </property> |
869 | + </widget> |
870 | + </item> |
871 | + <item row="2" column="0" alignment="Qt::AlignRight"> |
872 | + <widget class="QLabel" name="labelFOV2"> |
873 | + <property name="text"> |
874 | + <string>Ctrl+Alt+2</string> |
875 | + </property> |
876 | + </widget> |
877 | + </item> |
878 | + <item row="2" column="1"> |
879 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV2"> |
880 | + <property name="decimals"> |
881 | + <number>1</number> |
882 | + </property> |
883 | + <property name="maximum"> |
884 | + <double>360.000000000000000</double> |
885 | + </property> |
886 | + <property name="singleStep"> |
887 | + <double>0.100000000000000</double> |
888 | + </property> |
889 | + <property name="value"> |
890 | + <double>180.000000000000000</double> |
891 | + </property> |
892 | + </widget> |
893 | + </item> |
894 | + <item row="4" column="1"> |
895 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV4"> |
896 | + <property name="decimals"> |
897 | + <number>1</number> |
898 | + </property> |
899 | + <property name="maximum"> |
900 | + <double>360.000000000000000</double> |
901 | + </property> |
902 | + <property name="singleStep"> |
903 | + <double>0.100000000000000</double> |
904 | + </property> |
905 | + <property name="value"> |
906 | + <double>45.000000000000000</double> |
907 | + </property> |
908 | + </widget> |
909 | + </item> |
910 | + <item row="10" column="0" colspan="2"> |
911 | + <widget class="QPushButton" name="pushButtonSave"> |
912 | + <property name="text"> |
913 | + <string>Save settings</string> |
914 | + </property> |
915 | + </widget> |
916 | + </item> |
917 | + <item row="3" column="3"> |
918 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV8"> |
919 | + <property name="decimals"> |
920 | + <number>1</number> |
921 | + </property> |
922 | + <property name="maximum"> |
923 | + <double>360.000000000000000</double> |
924 | + </property> |
925 | + <property name="singleStep"> |
926 | + <double>0.100000000000000</double> |
927 | + </property> |
928 | + <property name="value"> |
929 | + <double>2.000000000000000</double> |
930 | + </property> |
931 | + </widget> |
932 | + </item> |
933 | + <item row="1" column="3"> |
934 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV6"> |
935 | + <property name="decimals"> |
936 | + <number>1</number> |
937 | + </property> |
938 | + <property name="maximum"> |
939 | + <double>360.000000000000000</double> |
940 | + </property> |
941 | + <property name="singleStep"> |
942 | + <double>0.100000000000000</double> |
943 | + </property> |
944 | + <property name="value"> |
945 | + <double>10.000000000000000</double> |
946 | + </property> |
947 | + </widget> |
948 | + </item> |
949 | + <item row="2" column="3"> |
950 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV7"> |
951 | + <property name="decimals"> |
952 | + <number>1</number> |
953 | + </property> |
954 | + <property name="maximum"> |
955 | + <double>360.000000000000000</double> |
956 | + </property> |
957 | + <property name="singleStep"> |
958 | + <double>0.100000000000000</double> |
959 | + </property> |
960 | + <property name="value"> |
961 | + <double>5.000000000000000</double> |
962 | + </property> |
963 | + </widget> |
964 | + </item> |
965 | + <item row="3" column="1"> |
966 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV3"> |
967 | + <property name="decimals"> |
968 | + <number>1</number> |
969 | + </property> |
970 | + <property name="maximum"> |
971 | + <double>360.000000000000000</double> |
972 | + </property> |
973 | + <property name="singleStep"> |
974 | + <double>0.100000000000000</double> |
975 | + </property> |
976 | + <property name="value"> |
977 | + <double>90.000000000000000</double> |
978 | + </property> |
979 | + </widget> |
980 | + </item> |
981 | + <item row="1" column="1"> |
982 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV1"> |
983 | + <property name="wrapping"> |
984 | + <bool>true</bool> |
985 | + </property> |
986 | + <property name="decimals"> |
987 | + <number>1</number> |
988 | + </property> |
989 | + <property name="minimum"> |
990 | + <double>0.000000000000000</double> |
991 | + </property> |
992 | + <property name="maximum"> |
993 | + <double>360.000000000000000</double> |
994 | + </property> |
995 | + <property name="singleStep"> |
996 | + <double>0.100000000000000</double> |
997 | + </property> |
998 | + <property name="value"> |
999 | + <double>310.000000000000000</double> |
1000 | + </property> |
1001 | + </widget> |
1002 | + </item> |
1003 | + <item row="4" column="0" alignment="Qt::AlignRight"> |
1004 | + <widget class="QLabel" name="labelFOV4"> |
1005 | + <property name="text"> |
1006 | + <string>Ctrl+Alt+4</string> |
1007 | + </property> |
1008 | + </widget> |
1009 | + </item> |
1010 | + <item row="5" column="3"> |
1011 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV0"> |
1012 | + <property name="decimals"> |
1013 | + <number>1</number> |
1014 | + </property> |
1015 | + <property name="maximum"> |
1016 | + <double>360.000000000000000</double> |
1017 | + </property> |
1018 | + <property name="singleStep"> |
1019 | + <double>0.100000000000000</double> |
1020 | + </property> |
1021 | + <property name="value"> |
1022 | + <double>0.500000000000000</double> |
1023 | + </property> |
1024 | + </widget> |
1025 | + </item> |
1026 | + <item row="0" column="0" colspan="4"> |
1027 | + <widget class="QLabel" name="labelFOVInfo"> |
1028 | + <property name="text"> |
1029 | + <string/> |
1030 | + </property> |
1031 | + <property name="textFormat"> |
1032 | + <enum>Qt::RichText</enum> |
1033 | + </property> |
1034 | + <property name="wordWrap"> |
1035 | + <bool>true</bool> |
1036 | + </property> |
1037 | + <property name="margin"> |
1038 | + <number>5</number> |
1039 | + </property> |
1040 | + <property name="openExternalLinks"> |
1041 | + <bool>true</bool> |
1042 | + </property> |
1043 | + </widget> |
1044 | + </item> |
1045 | + <item row="4" column="3"> |
1046 | + <widget class="QDoubleSpinBox" name="doubleSpinBoxFOV9"> |
1047 | + <property name="decimals"> |
1048 | + <number>1</number> |
1049 | + </property> |
1050 | + <property name="maximum"> |
1051 | + <double>360.000000000000000</double> |
1052 | + </property> |
1053 | + <property name="singleStep"> |
1054 | + <double>0.100000000000000</double> |
1055 | + </property> |
1056 | + <property name="value"> |
1057 | + <double>1.000000000000000</double> |
1058 | + </property> |
1059 | + </widget> |
1060 | + </item> |
1061 | + <item row="1" column="0" alignment="Qt::AlignRight"> |
1062 | + <widget class="QLabel" name="labelFOV1"> |
1063 | + <property name="text"> |
1064 | + <string>Ctrl+Alt+1</string> |
1065 | + </property> |
1066 | + </widget> |
1067 | + </item> |
1068 | + <item row="2" column="2" alignment="Qt::AlignRight"> |
1069 | + <widget class="QLabel" name="labelFOV7"> |
1070 | + <property name="text"> |
1071 | + <string>Ctrl+Alt+7</string> |
1072 | + </property> |
1073 | + </widget> |
1074 | + </item> |
1075 | + <item row="4" column="2" alignment="Qt::AlignRight"> |
1076 | + <widget class="QLabel" name="labelFOV9"> |
1077 | + <property name="text"> |
1078 | + <string>Ctrl+Alt+9</string> |
1079 | + </property> |
1080 | + </widget> |
1081 | + </item> |
1082 | + </layout> |
1083 | + </widget> |
1084 | + </item> |
1085 | + </layout> |
1086 | + </widget> |
1087 | + <widget class="QWidget" name="tabAbout"> |
1088 | + <attribute name="title"> |
1089 | + <string comment="tab in plugin windows">About</string> |
1090 | + </attribute> |
1091 | + <layout class="QVBoxLayout" name="verticalLayout_3"> |
1092 | + <item> |
1093 | + <widget class="QLabel" name="labelTitle"> |
1094 | + <property name="styleSheet"> |
1095 | + <string notr="true">QLabel { |
1096 | + font: bold 18pt ; |
1097 | +}</string> |
1098 | + </property> |
1099 | + <property name="text"> |
1100 | + <string notr="true">Field of View plug-in</string> |
1101 | + </property> |
1102 | + </widget> |
1103 | + </item> |
1104 | + <item> |
1105 | + <widget class="QLabel" name="labelVersion"> |
1106 | + <property name="text"> |
1107 | + <string notr="true">Version %1</string> |
1108 | + </property> |
1109 | + </widget> |
1110 | + </item> |
1111 | + <item> |
1112 | + <widget class="QLabel" name="labelCopyright"> |
1113 | + <property name="text"> |
1114 | + <string notr="true">Copyright &copy; 2014 Alexander Wolf</string> |
1115 | + </property> |
1116 | + <property name="textFormat"> |
1117 | + <enum>Qt::RichText</enum> |
1118 | + </property> |
1119 | + </widget> |
1120 | + </item> |
1121 | + <item> |
1122 | + <widget class="QLabel" name="labelLicense"> |
1123 | + <property name="sizePolicy"> |
1124 | + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> |
1125 | + <horstretch>0</horstretch> |
1126 | + <verstretch>0</verstretch> |
1127 | + </sizepolicy> |
1128 | + </property> |
1129 | + <property name="text"> |
1130 | + <string notr="true">This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
1131 | + |
1132 | +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
1133 | + |
1134 | +You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.</string> |
1135 | + </property> |
1136 | + <property name="alignment"> |
1137 | + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> |
1138 | + </property> |
1139 | + <property name="wordWrap"> |
1140 | + <bool>true</bool> |
1141 | + </property> |
1142 | + <property name="textInteractionFlags"> |
1143 | + <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> |
1144 | + </property> |
1145 | + </widget> |
1146 | + </item> |
1147 | + </layout> |
1148 | + </widget> |
1149 | + </widget> |
1150 | + </item> |
1151 | + </layout> |
1152 | + </widget> |
1153 | + <customwidgets> |
1154 | + <customwidget> |
1155 | + <class>BarFrame</class> |
1156 | + <extends>QFrame</extends> |
1157 | + <header>Dialog.hpp</header> |
1158 | + <container>1</container> |
1159 | + </customwidget> |
1160 | + </customwidgets> |
1161 | + <tabstops> |
1162 | + <tabstop>tabWidget</tabstop> |
1163 | + <tabstop>doubleSpinBoxFOV1</tabstop> |
1164 | + <tabstop>pushButtonSave</tabstop> |
1165 | + </tabstops> |
1166 | + <resources/> |
1167 | + <connections/> |
1168 | +</ui> |
1169 | |
1170 | === modified file 'po/stellarium/POTFILES.in' |
1171 | --- po/stellarium/POTFILES.in 2013-10-26 09:16:43 +0000 |
1172 | +++ po/stellarium/POTFILES.in 2014-01-08 14:57:20 +0000 |
1173 | @@ -107,3 +107,6 @@ |
1174 | plugins/Observability/src/Observability.cpp |
1175 | plugins/Observability/src/gui/ObservabilityDialog.cpp |
1176 | plugins/Observability/src/ui_ObservabilityDialog.h |
1177 | +plugins/FOV/src/FOV.cpp |
1178 | +plugins/FOV/src/gui/FOVWindow.cpp |
1179 | +plugins/FOV/src/ui_fovWindow.h |
1180 | |
1181 | === modified file 'src/CMakeLists.txt' |
1182 | --- src/CMakeLists.txt 2013-12-06 15:43:53 +0000 |
1183 | +++ src/CMakeLists.txt 2014-01-08 14:57:20 +0000 |
1184 | @@ -466,6 +466,11 @@ |
1185 | ADD_DEFINITIONS(-DUSE_STATIC_PLUGIN_EXOPLANETS) |
1186 | ENDIF() |
1187 | |
1188 | +IF (USE_PLUGIN_FOV) |
1189 | + SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS_LIBRARIES} "${CMAKE_BINARY_DIR}/plugins/FOV/src/${CMAKE_CFG_INTDIR}/libFOV.a") |
1190 | + ADD_DEFINITIONS(-DUSE_STATIC_PLUGIN_FOV) |
1191 | +ENDIF() |
1192 | + |
1193 | IF (USE_PLUGIN_LOGBOOK) |
1194 | SET(STELLARIUM_STATIC_PLUGINS_LIBRARIES ${STELLARIUM_STATIC_PLUGINS_LIBRARIES} "${CMAKE_BINARY_DIR}/plugins/LogBook/src/${CMAKE_CFG_INTDIR}/libLogBook.a") |
1195 | ADD_DEFINITIONS(-DUSE_STATIC_PLUGIN_LOGBOOK) |
1196 | |
1197 | === modified file 'src/core/StelApp.cpp' |
1198 | --- src/core/StelApp.cpp 2013-12-11 14:23:40 +0000 |
1199 | +++ src/core/StelApp.cpp 2014-01-08 14:57:20 +0000 |
1200 | @@ -147,6 +147,10 @@ |
1201 | Q_IMPORT_PLUGIN(ExoplanetsStelPluginInterface) |
1202 | #endif |
1203 | |
1204 | +#ifdef USE_STATIC_PLUGIN_FOV |
1205 | +Q_IMPORT_PLUGIN(FOVStelPluginInterface) |
1206 | +#endif |
1207 | + |
1208 | #ifdef USE_STATIC_PLUGIN_OBSERVABILITY |
1209 | Q_IMPORT_PLUGIN(ObservabilityStelPluginInterface) |
1210 | #endif |
line 196 & 259 in FOV.cpp use braces for the conditionals.
In FOVWindow.cpp, don't do "GETSTELMODULE( FOV)->setQuickF OV(value, 1);" use signals/slots.