Merge lp:~alexwolf/stellarium/GRS into lp:stellarium
- GRS
- Merge into trunk
Proposed by
Alexander Wolf
Status: | Merged |
---|---|
Merged at revision: | 8259 |
Proposed branch: | lp:~alexwolf/stellarium/GRS |
Merge into: | lp:stellarium |
Diff against target: |
777 lines (+536/-9) 13 files modified
po/stellarium/POTFILES.in (+1/-0) src/CMakeLists.txt (+3/-0) src/core/modules/Planet.cpp (+11/-2) src/core/modules/Planet.hpp (+5/-0) src/core/modules/SolarSystem.cpp (+56/-2) src/core/modules/SolarSystem.hpp (+25/-0) src/gui/ConfigurationDialog.cpp (+4/-0) src/gui/GreatRedSpotDialog.cpp (+68/-0) src/gui/GreatRedSpotDialog.hpp (+51/-0) src/gui/ViewDialog.cpp (+22/-0) src/gui/ViewDialog.hpp (+4/-0) src/gui/greatRedSpotDialog.ui (+263/-0) src/gui/viewDialog.ui (+23/-5) |
To merge this branch: | bzr merge lp:~alexwolf/stellarium/GRS |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
gzotti | Approve | ||
Review via email: mp+291127@code.launchpad.net |
Commit message
Description of the change
Added a tool for fill custom settings of position of Great Red Spot on Jupiter
To post a comment you must log in.
Revision history for this message
Alexander Wolf (alexwolf) wrote : | # |
The dialog is not enabled when checkbox is not checked.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'po/stellarium/POTFILES.in' |
2 | --- po/stellarium/POTFILES.in 2015-08-22 22:20:20 +0000 |
3 | +++ po/stellarium/POTFILES.in 2016-04-06 14:27:06 +0000 |
4 | @@ -50,6 +50,7 @@ |
5 | src/ui_addRemoveLandscapesDialog.h |
6 | src/ui_shortcutsDialog.h |
7 | src/ui_atmosphereDialog.h |
8 | +src/ui_greatRedSpotDialog.h |
9 | src/ui_scriptConsole.h |
10 | src/ui_astroCalcDialog.h |
11 | |
12 | |
13 | === modified file 'src/CMakeLists.txt' |
14 | --- src/CMakeLists.txt 2016-01-30 18:35:25 +0000 |
15 | +++ src/CMakeLists.txt 2016-04-06 14:27:06 +0000 |
16 | @@ -330,6 +330,8 @@ |
17 | gui/AddRemoveLandscapesDialog.cpp |
18 | gui/AtmosphereDialog.hpp |
19 | gui/AtmosphereDialog.cpp |
20 | + gui/GreatRedSpotDialog.hpp |
21 | + gui/GreatRedSpotDialog.cpp |
22 | gui/CustomDeltaTEquationDialog.hpp |
23 | gui/CustomDeltaTEquationDialog.cpp |
24 | gui/AstroCalcDialog.hpp |
25 | @@ -348,6 +350,7 @@ |
26 | gui/searchDialogGui.ui |
27 | gui/configurationDialog.ui |
28 | gui/atmosphereDialog.ui |
29 | + gui/greatRedSpotDialog.ui |
30 | gui/customDeltaTEquationDialog.ui |
31 | gui/astroCalcDialog.ui |
32 | gui/addRemoveLandscapesDialog.ui |
33 | |
34 | === modified file 'src/core/modules/Planet.cpp' |
35 | --- src/core/modules/Planet.cpp 2016-04-02 10:07:12 +0000 |
36 | +++ src/core/modules/Planet.cpp 2016-04-06 14:27:06 +0000 |
37 | @@ -54,6 +54,11 @@ |
38 | |
39 | bool Planet::permanentDrawingOrbits = false; |
40 | |
41 | +bool Planet::flagCustomGrsSettings = false; |
42 | +double Planet::customGrsJD = 2456908.; |
43 | +double Planet::customGrsDrift = 15.21875; |
44 | +int Planet::customGrsLongitude = 216; |
45 | + |
46 | QOpenGLShaderProgram* Planet::planetShaderProgram=NULL; |
47 | Planet::PlanetShaderVars Planet::planetShaderVars; |
48 | QOpenGLShaderProgram* Planet::ringPlanetShaderProgram=NULL; |
49 | @@ -709,7 +714,7 @@ |
50 | double wholeRotations = floor(rotations); |
51 | double remainder = rotations - wholeRotations; |
52 | |
53 | - if (englishName=="Jupiter" && re.offset < 0.0) |
54 | + if (englishName=="Jupiter") |
55 | { |
56 | // http://www.projectpluto.com/grs_form.htm |
57 | // CM( System II) = 181.62 + 870.1869147 * jd + correction [870d rotation every day] |
58 | @@ -724,7 +729,11 @@ |
59 | // http://www.skyandtelescope.com/observing/transit-times-of-jupiters-great-red-spot/ writes: |
60 | // The predictions assume the Red Spot was at Jovian System II longitude 216° in September 2014 and continues to drift 1.25° per month, based on historical trends noted by JUPOS. |
61 | // GRS longitude was at 2014-09-08 216d with a drift of 1.25d every month |
62 | - double longitudeGRS=216+1.25*( JDE - 2456908)/30; |
63 | + double longitudeGRS = 0.; |
64 | + if (flagCustomGrsSettings) |
65 | + longitudeGRS = customGrsLongitude + customGrsDrift*(JDE - customGrsJD)/365.25; |
66 | + else |
67 | + longitudeGRS=216+1.25*( JDE - 2456908)/30; |
68 | // qDebug() << "Jupiter: CM2 = " << cm2 << " longitudeGRS = " << longitudeGRS << " --> rotation = " << (cm2 - longitudeGRS); |
69 | return cm2 - longitudeGRS + 25.; // + 25 = Jupiter Texture not 0d |
70 | // To verify: |
71 | |
72 | === modified file 'src/core/modules/Planet.hpp' |
73 | --- src/core/modules/Planet.hpp 2016-03-08 20:10:54 +0000 |
74 | +++ src/core/modules/Planet.hpp 2016-04-06 14:27:06 +0000 |
75 | @@ -362,6 +362,11 @@ |
76 | static StelTextureSP hintCircleTex; |
77 | static QMap<PlanetType, QString> pTypeMap; // Maps fast type to english name. |
78 | static QMap<ApparentMagnitudeAlgorithm, QString> vMagAlgorithmMap; |
79 | + |
80 | + static bool flagCustomGrsSettings; // Is enabled usage of custom settings for calculation of position of Great Red Spot? |
81 | + static double customGrsJD; // Initial JD for calculation of position of Great Red Spot |
82 | + static int customGrsLongitude; // Longitude of Great Red Spot (System II, degrees) |
83 | + static double customGrsDrift; // Annual drift of Great Red Spot position (degrees) |
84 | |
85 | // Shader-related variables |
86 | struct PlanetShaderVars { |
87 | |
88 | === modified file 'src/core/modules/SolarSystem.cpp' |
89 | --- src/core/modules/SolarSystem.cpp 2016-03-12 16:59:32 +0000 |
90 | +++ src/core/modules/SolarSystem.cpp 2016-04-06 14:27:06 +0000 |
91 | @@ -133,7 +133,7 @@ |
92 | // Init and load the solar system data |
93 | void SolarSystem::init() |
94 | { |
95 | - QSettings* conf = StelApp::getInstance().getSettings(); |
96 | + conf = StelApp::getInstance().getSettings(); |
97 | Q_ASSERT(conf); |
98 | |
99 | Planet::init(); |
100 | @@ -162,6 +162,12 @@ |
101 | setFlagIsolatedOrbits(conf->value("viewing/flag_isolated_orbits", true).toBool()); |
102 | setFlagPermanentOrbits(conf->value("astro/flag_permanent_orbits", false).toBool()); |
103 | |
104 | + // Settings for calculation of position of Great Red Spot on Jupiter |
105 | + setFlagCustomGrsSettings(conf->value("astro/flag_grs_custom", false).toBool()); |
106 | + setCustomGrsLongitude(conf->value("astro/grs_longitude", 216).toInt()); |
107 | + setCustomGrsDrift(conf->value("astro/grs_drift", 1.25).toDouble()); |
108 | + setCustomGrsJD(conf->value("astro/grs_jd", 2456908.).toDouble()); |
109 | + |
110 | recreateTrails(); |
111 | |
112 | setFlagTrails(conf->value("astro/flag_object_trails", false).toBool()); |
113 | @@ -1787,7 +1793,55 @@ |
114 | |
115 | void SolarSystem::setFlagPermanentOrbits(bool b) |
116 | { |
117 | - Planet::permanentDrawingOrbits=b; |
118 | + Planet::permanentDrawingOrbits=b; |
119 | +} |
120 | + |
121 | +void SolarSystem::setFlagCustomGrsSettings(bool b) |
122 | +{ |
123 | + Planet::flagCustomGrsSettings=b; |
124 | + // automatic saving of the setting |
125 | + conf->setValue("astro/flag_grs_custom", b); |
126 | +} |
127 | + |
128 | +bool SolarSystem::getFlagCustomGrsSettings() |
129 | +{ |
130 | + return Planet::flagCustomGrsSettings; |
131 | +} |
132 | + |
133 | +void SolarSystem::setCustomGrsLongitude(int longitude) |
134 | +{ |
135 | + Planet::customGrsLongitude = longitude; |
136 | + // automatic saving of the setting |
137 | + conf->setValue("astro/grs_longitude", longitude); |
138 | +} |
139 | + |
140 | +int SolarSystem::getCustomGrsLongitude() |
141 | +{ |
142 | + return Planet::customGrsLongitude; |
143 | +} |
144 | + |
145 | +void SolarSystem::setCustomGrsDrift(double drift) |
146 | +{ |
147 | + Planet::customGrsDrift = drift; |
148 | + // automatic saving of the setting |
149 | + conf->setValue("astro/grs_drift", drift); |
150 | +} |
151 | + |
152 | +double SolarSystem::getCustomGrsDrift() |
153 | +{ |
154 | + return Planet::customGrsDrift; |
155 | +} |
156 | + |
157 | +void SolarSystem::setCustomGrsJD(double JD) |
158 | +{ |
159 | + Planet::customGrsJD = JD; |
160 | + // automatic saving of the setting |
161 | + conf->setValue("astro/grs_jd", JD); |
162 | +} |
163 | + |
164 | +double SolarSystem::getCustomGrsJD() |
165 | +{ |
166 | + return Planet::customGrsJD; |
167 | } |
168 | |
169 | double SolarSystem::getEclipseFactor(const StelCore* core) const |
170 | |
171 | === modified file 'src/core/modules/SolarSystem.hpp' |
172 | --- src/core/modules/SolarSystem.hpp 2016-02-06 13:58:54 +0000 |
173 | +++ src/core/modules/SolarSystem.hpp 2016-04-06 14:27:06 +0000 |
174 | @@ -303,6 +303,30 @@ |
175 | //! Get the current value of the flag which enables showing of isolated orbits for selected objects only or not. |
176 | bool getFlagIsolatedOrbits(void) const; |
177 | |
178 | + //! Set flag which determines if custom settings is using for Great Red Spot on Jupiter |
179 | + void setFlagCustomGrsSettings(bool b); |
180 | + //! Get the current value of the flag which determines if custom settings for Great Red Spot on Jupiter is used or not. |
181 | + bool getFlagCustomGrsSettings(); |
182 | + |
183 | + //! Set longitude of Great Red Spot (System II is used) |
184 | + //! @param longitude (degrees) |
185 | + void setCustomGrsLongitude(int longitude); |
186 | + //! Get longitude of Great Red Spot (System II is used) |
187 | + //! @return a longitude (degrees) |
188 | + int getCustomGrsLongitude(); |
189 | + |
190 | + //! Set speed of annual drift for Great Red Spot (System II is used) |
191 | + //! @param annual drift (degrees) |
192 | + void setCustomGrsDrift(double drift); |
193 | + //! Get speed of annual drift for Great Red Spot (System II is used) |
194 | + double getCustomGrsDrift(); |
195 | + |
196 | + //! Set initial JD for calculation of position of Great Red Spot |
197 | + //! @param JD |
198 | + void setCustomGrsJD(double JD); |
199 | + //! Get initial JD for calculation of position of Great Red Spot |
200 | + double getCustomGrsJD(); |
201 | + |
202 | public: |
203 | /////////////////////////////////////////////////////////////////////////// |
204 | // Other public methods |
205 | @@ -440,6 +464,7 @@ |
206 | |
207 | class TrailGroup* allTrails; |
208 | StelGui* gui; |
209 | + QSettings* conf; |
210 | LinearFader trailFader; |
211 | Vec3f trailColor; |
212 | Vec3f pointerColor; |
213 | |
214 | === modified file 'src/gui/ConfigurationDialog.cpp' |
215 | --- src/gui/ConfigurationDialog.cpp 2016-03-16 05:40:56 +0000 |
216 | +++ src/gui/ConfigurationDialog.cpp 2016-04-06 14:27:06 +0000 |
217 | @@ -582,6 +582,10 @@ |
218 | conf->setValue("astro/meteor_rate", mmgr->getZHR()); |
219 | conf->setValue("astro/milky_way_intensity", GETSTELMODULE(MilkyWay)->getIntensity()); |
220 | conf->setValue("astro/zodiacal_light_intensity", GETSTELMODULE(ZodiacalLight)->getIntensity()); |
221 | + conf->setValue("astro/flag_grs_custom", ssmgr->getFlagCustomGrsSettings()); |
222 | + conf->setValue("astro/grs_longitude", ssmgr->getCustomGrsLongitude()); |
223 | + conf->setValue("astro/grs_drift", ssmgr->getCustomGrsDrift()); |
224 | + conf->setValue("astro/grs_jd", ssmgr->getCustomGrsJD()); |
225 | |
226 | // view dialog / markings tab settings |
227 | conf->setValue("viewing/flag_azimuthal_grid", glmgr->getFlagAzimuthalGrid()); |
228 | |
229 | === added file 'src/gui/GreatRedSpotDialog.cpp' |
230 | --- src/gui/GreatRedSpotDialog.cpp 1970-01-01 00:00:00 +0000 |
231 | +++ src/gui/GreatRedSpotDialog.cpp 2016-04-06 14:27:06 +0000 |
232 | @@ -0,0 +1,68 @@ |
233 | +/* |
234 | + * Stellarium |
235 | + * Copyright (C) 2016 Alexander Wolf |
236 | + * |
237 | + * This program is free software; you can redistribute it and/or |
238 | + * modify it under the terms of the GNU General Public License |
239 | + * as published by the Free Software Foundation; either version 2 |
240 | + * of the License, or (at your option) any later version. |
241 | + * |
242 | + * This program is distributed in the hope that it will be useful, |
243 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
244 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
245 | + * GNU General Public License for more details. |
246 | + * You should have received a copy of the GNU General Public License |
247 | + * along with this program; if not, write to the Free Software |
248 | + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. |
249 | +*/ |
250 | + |
251 | +#include "StelApp.hpp" |
252 | +#include "StelModuleMgr.hpp" |
253 | +#include "StelUtils.hpp" |
254 | +#include "GreatRedSpotDialog.hpp" |
255 | +#include "ui_greatRedSpotDialog.h" |
256 | + |
257 | +GreatRedSpotDialog::GreatRedSpotDialog() |
258 | +{ |
259 | + dialogName = "GreatRedSpot"; |
260 | + ui = new Ui_GreatRedSpotDialogForm; |
261 | +} |
262 | + |
263 | +GreatRedSpotDialog::~GreatRedSpotDialog() |
264 | +{ |
265 | + delete ui; |
266 | +} |
267 | + |
268 | +void GreatRedSpotDialog::retranslate() |
269 | +{ |
270 | + if (dialog) |
271 | + ui->retranslateUi(dialog); |
272 | +} |
273 | + |
274 | + |
275 | +void GreatRedSpotDialog::createDialogContent() |
276 | +{ |
277 | + ui->setupUi(dialog); |
278 | + |
279 | + //Signals and slots |
280 | + connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); |
281 | + connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); |
282 | + connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint))); |
283 | + |
284 | + SolarSystem* ss = GETSTELMODULE(SolarSystem); |
285 | + ui->longitudeSpinBox->setValue(ss->getCustomGrsLongitude()); |
286 | + connect(ui->longitudeSpinBox, SIGNAL(valueChanged(int)), ss, SLOT(setCustomGrsLongitude(int))); |
287 | + |
288 | + ui->driftDoubleSpinBox->setValue(ss->getCustomGrsDrift()); |
289 | + connect(ui->driftDoubleSpinBox, SIGNAL(valueChanged(double)), ss, SLOT(setCustomGrsDrift(double))); |
290 | + |
291 | + //TODO: sync format with the main date and time format |
292 | + ui->jdDateTimeEdit->setDisplayFormat("yyyy.MM.dd hh:mm"); |
293 | + ui->jdDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(ss->getCustomGrsJD())); |
294 | + connect(ui->jdDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(setGrsJD(QDateTime))); |
295 | +} |
296 | + |
297 | +void GreatRedSpotDialog::setGrsJD(QDateTime dt) |
298 | +{ |
299 | + GETSTELMODULE(SolarSystem)->setCustomGrsJD(StelUtils::qDateTimeToJd(dt)); |
300 | +} |
301 | |
302 | === added file 'src/gui/GreatRedSpotDialog.hpp' |
303 | --- src/gui/GreatRedSpotDialog.hpp 1970-01-01 00:00:00 +0000 |
304 | +++ src/gui/GreatRedSpotDialog.hpp 2016-04-06 14:27:06 +0000 |
305 | @@ -0,0 +1,51 @@ |
306 | +/* |
307 | + * Stellarium |
308 | + * |
309 | + * Copyright (C) 2016 Alexander Wolf |
310 | + * |
311 | + * This program is free software; you can redistribute it and/or |
312 | + * modify it under the terms of the GNU General Public License |
313 | + * as published by the Free Software Foundation; either version 2 |
314 | + * of the License, or (at your option) any later version. |
315 | + * |
316 | + * This program is distributed in the hope that it will be useful, |
317 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
318 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
319 | + * GNU General Public License for more details. |
320 | + * You should have received a copy of the GNU General Public License |
321 | + * along with this program; if not, write to the Free Software |
322 | + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. |
323 | +*/ |
324 | + |
325 | +#ifndef _GREATREDSPOTDIALOG_HPP_ |
326 | +#define _GREATREDSPOTDIALOG_HPP_ |
327 | + |
328 | +#include <QObject> |
329 | +#include <QDateTime> |
330 | +#include "StelDialog.hpp" |
331 | +#include "SolarSystem.hpp" |
332 | + |
333 | +class Ui_GreatRedSpotDialogForm; |
334 | + |
335 | +class GreatRedSpotDialog : public StelDialog |
336 | +{ |
337 | + Q_OBJECT |
338 | + |
339 | +public: |
340 | + GreatRedSpotDialog(); |
341 | + virtual ~GreatRedSpotDialog(); |
342 | + |
343 | +public slots: |
344 | + void retranslate(); |
345 | + |
346 | +private slots: |
347 | + void setGrsJD(QDateTime dt); |
348 | + |
349 | +protected: |
350 | + //! Initialize the dialog widgets and connect the signals/slots. |
351 | + virtual void createDialogContent(); |
352 | + Ui_GreatRedSpotDialogForm *ui; |
353 | + |
354 | +}; |
355 | + |
356 | +#endif // _GREATREDSPOTDIALOG_HPP_ |
357 | |
358 | === modified file 'src/gui/ViewDialog.cpp' |
359 | --- src/gui/ViewDialog.cpp 2016-03-16 07:21:37 +0000 |
360 | +++ src/gui/ViewDialog.cpp 2016-04-06 14:27:06 +0000 |
361 | @@ -23,6 +23,7 @@ |
362 | #include "ui_viewDialog.h" |
363 | #include "AddRemoveLandscapesDialog.hpp" |
364 | #include "AtmosphereDialog.hpp" |
365 | +#include "GreatRedSpotDialog.hpp" |
366 | #include "StelApp.hpp" |
367 | #include "StelCore.hpp" |
368 | #include "StelSkyCultureMgr.hpp" |
369 | @@ -62,6 +63,7 @@ |
370 | ui = new Ui_viewDialogForm; |
371 | addRemoveLandscapesDialog = NULL; |
372 | atmosphereDialog=NULL; |
373 | + greatRedSpotDialog=NULL; |
374 | } |
375 | |
376 | ViewDialog::~ViewDialog() |
377 | @@ -72,6 +74,8 @@ |
378 | addRemoveLandscapesDialog = NULL; |
379 | delete atmosphereDialog; |
380 | atmosphereDialog = NULL; |
381 | + delete greatRedSpotDialog; |
382 | + greatRedSpotDialog = NULL; |
383 | } |
384 | |
385 | void ViewDialog::retranslate() |
386 | @@ -220,6 +224,11 @@ |
387 | connect(ui->planetLimitMagnitudeDoubleSpinBox, SIGNAL(valueChanged(double)), drawer, SLOT(setCustomPlanetMagnitudeLimit(double))); |
388 | ui->planetsLabelsHorizontalSlider->setValue((int)(ssmgr->getLabelsAmount()*10.f)); |
389 | connect(ui->planetsLabelsHorizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(planetsLabelsValueChanged(int))); |
390 | + bool grsFlag = ssmgr->getFlagCustomGrsSettings(); |
391 | + ui->customGrsSettingsCheckBox->setChecked(grsFlag); |
392 | + connect(ui->customGrsSettingsCheckBox, SIGNAL(toggled(bool)), this, SLOT(setFlagCustomGrsSettings(bool))); |
393 | + ui->pushButtonGrsDetails->setEnabled(grsFlag); |
394 | + connect(ui->pushButtonGrsDetails, SIGNAL(clicked()), this, SLOT(showGreatRedSpotDialog())); |
395 | |
396 | // Shooting stars section |
397 | connect(mmgr, SIGNAL(zhrChanged(int)), this, SLOT(setZHR(int))); |
398 | @@ -504,6 +513,12 @@ |
399 | populateLandscapeMinimalBrightness(); |
400 | } |
401 | |
402 | +void ViewDialog::setFlagCustomGrsSettings(bool b) |
403 | +{ |
404 | + GETSTELMODULE(SolarSystem)->setFlagCustomGrsSettings(b); |
405 | + ui->pushButtonGrsDetails->setEnabled(b); |
406 | +} |
407 | + |
408 | void ViewDialog::populateLandscapeMinimalBrightness() |
409 | { |
410 | if (ui->landscapeBrightnessCheckBox->isChecked()) |
411 | @@ -793,6 +808,13 @@ |
412 | atmosphereDialog->setVisible(true); |
413 | } |
414 | |
415 | +void ViewDialog::showGreatRedSpotDialog() |
416 | +{ |
417 | + if(greatRedSpotDialog == NULL) |
418 | + greatRedSpotDialog = new GreatRedSpotDialog(); |
419 | + |
420 | + greatRedSpotDialog->setVisible(true); |
421 | +} |
422 | |
423 | void ViewDialog::setZHR(int zhr) |
424 | { |
425 | |
426 | === modified file 'src/gui/ViewDialog.hpp' |
427 | --- src/gui/ViewDialog.hpp 2015-10-22 03:01:15 +0000 |
428 | +++ src/gui/ViewDialog.hpp 2016-04-06 14:27:06 +0000 |
429 | @@ -29,6 +29,7 @@ |
430 | |
431 | class AddRemoveLandscapesDialog; |
432 | class AtmosphereDialog; |
433 | +class GreatRedSpotDialog; |
434 | |
435 | class ViewDialog : public StelDialog |
436 | { |
437 | @@ -62,12 +63,14 @@ |
438 | void setCurrentLandscapeAsDefault(void); |
439 | void setCurrentCultureAsDefault(void); |
440 | void setFlagLandscapeUseMinimalBrightness(bool b); |
441 | + void setFlagCustomGrsSettings(bool b); |
442 | //! Update the widget to make sure it is synchrone if a value was changed programmatically |
443 | //! This function should be called repeatidly with e.g. a timer |
444 | void updateFromProgram(); |
445 | |
446 | void showAddRemoveLandscapesDialog(); |
447 | void showAtmosphereDialog(); |
448 | + void showGreatRedSpotDialog(); |
449 | |
450 | void populateLightPollution(); |
451 | void populateLandscapeMinimalBrightness(); |
452 | @@ -95,6 +98,7 @@ |
453 | |
454 | AddRemoveLandscapesDialog * addRemoveLandscapesDialog; |
455 | AtmosphereDialog * atmosphereDialog; |
456 | + GreatRedSpotDialog * greatRedSpotDialog; |
457 | }; |
458 | |
459 | #endif // _VIEWDIALOG_HPP_ |
460 | |
461 | === added file 'src/gui/greatRedSpotDialog.ui' |
462 | --- src/gui/greatRedSpotDialog.ui 1970-01-01 00:00:00 +0000 |
463 | +++ src/gui/greatRedSpotDialog.ui 2016-04-06 14:27:06 +0000 |
464 | @@ -0,0 +1,263 @@ |
465 | +<?xml version="1.0" encoding="UTF-8"?> |
466 | +<ui version="4.0"> |
467 | + <class>GreatRedSpotDialogForm</class> |
468 | + <widget class="QWidget" name="GreatRedSpotDialogForm"> |
469 | + <property name="geometry"> |
470 | + <rect> |
471 | + <x>0</x> |
472 | + <y>0</y> |
473 | + <width>378</width> |
474 | + <height>190</height> |
475 | + </rect> |
476 | + </property> |
477 | + <layout class="QVBoxLayout" name="verticalLayout"> |
478 | + <property name="spacing"> |
479 | + <number>0</number> |
480 | + </property> |
481 | + <property name="leftMargin"> |
482 | + <number>0</number> |
483 | + </property> |
484 | + <property name="topMargin"> |
485 | + <number>0</number> |
486 | + </property> |
487 | + <property name="rightMargin"> |
488 | + <number>0</number> |
489 | + </property> |
490 | + <property name="bottomMargin"> |
491 | + <number>0</number> |
492 | + </property> |
493 | + <item> |
494 | + <widget class="BarFrame" name="TitleBar"> |
495 | + <property name="minimumSize"> |
496 | + <size> |
497 | + <width>16</width> |
498 | + <height>25</height> |
499 | + </size> |
500 | + </property> |
501 | + <property name="maximumSize"> |
502 | + <size> |
503 | + <width>16777215</width> |
504 | + <height>25</height> |
505 | + </size> |
506 | + </property> |
507 | + <property name="frameShape"> |
508 | + <enum>QFrame::StyledPanel</enum> |
509 | + </property> |
510 | + <layout class="QHBoxLayout"> |
511 | + <property name="leftMargin"> |
512 | + <number>0</number> |
513 | + </property> |
514 | + <property name="topMargin"> |
515 | + <number>0</number> |
516 | + </property> |
517 | + <property name="rightMargin"> |
518 | + <number>4</number> |
519 | + </property> |
520 | + <property name="bottomMargin"> |
521 | + <number>0</number> |
522 | + </property> |
523 | + <item> |
524 | + <spacer> |
525 | + <property name="orientation"> |
526 | + <enum>Qt::Horizontal</enum> |
527 | + </property> |
528 | + <property name="sizeHint" stdset="0"> |
529 | + <size> |
530 | + <width>40</width> |
531 | + <height>20</height> |
532 | + </size> |
533 | + </property> |
534 | + </spacer> |
535 | + </item> |
536 | + <item> |
537 | + <widget class="QLabel" name="stelWindowTitle"> |
538 | + <property name="palette"> |
539 | + <palette> |
540 | + <active/> |
541 | + <inactive/> |
542 | + <disabled/> |
543 | + </palette> |
544 | + </property> |
545 | + <property name="font"> |
546 | + <font/> |
547 | + </property> |
548 | + <property name="text"> |
549 | + <string>Great Red Spot Details</string> |
550 | + </property> |
551 | + </widget> |
552 | + </item> |
553 | + <item> |
554 | + <spacer> |
555 | + <property name="orientation"> |
556 | + <enum>Qt::Horizontal</enum> |
557 | + </property> |
558 | + <property name="sizeHint" stdset="0"> |
559 | + <size> |
560 | + <width>40</width> |
561 | + <height>20</height> |
562 | + </size> |
563 | + </property> |
564 | + </spacer> |
565 | + </item> |
566 | + <item> |
567 | + <widget class="QPushButton" name="closeStelWindow"> |
568 | + <property name="minimumSize"> |
569 | + <size> |
570 | + <width>16</width> |
571 | + <height>16</height> |
572 | + </size> |
573 | + </property> |
574 | + <property name="maximumSize"> |
575 | + <size> |
576 | + <width>16</width> |
577 | + <height>16</height> |
578 | + </size> |
579 | + </property> |
580 | + <property name="focusPolicy"> |
581 | + <enum>Qt::NoFocus</enum> |
582 | + </property> |
583 | + <property name="text"> |
584 | + <string/> |
585 | + </property> |
586 | + </widget> |
587 | + </item> |
588 | + </layout> |
589 | + </widget> |
590 | + </item> |
591 | + <item> |
592 | + <widget class="QGroupBox" name="greatRedSpotGroupBox"> |
593 | + <property name="enabled"> |
594 | + <bool>true</bool> |
595 | + </property> |
596 | + <property name="title"> |
597 | + <string>Custom settings for position of GRS on Jupiter</string> |
598 | + </property> |
599 | + <layout class="QGridLayout" name="gridLayout"> |
600 | + <property name="leftMargin"> |
601 | + <number>0</number> |
602 | + </property> |
603 | + <property name="topMargin"> |
604 | + <number>0</number> |
605 | + </property> |
606 | + <property name="rightMargin"> |
607 | + <number>0</number> |
608 | + </property> |
609 | + <property name="bottomMargin"> |
610 | + <number>0</number> |
611 | + </property> |
612 | + <item row="1" column="1"> |
613 | + <widget class="QDoubleSpinBox" name="driftDoubleSpinBox"> |
614 | + <property name="alignment"> |
615 | + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
616 | + </property> |
617 | + <property name="decimals"> |
618 | + <number>5</number> |
619 | + </property> |
620 | + <property name="minimum"> |
621 | + <double>-90.000000000000000</double> |
622 | + </property> |
623 | + <property name="maximum"> |
624 | + <double>90.000000000000000</double> |
625 | + </property> |
626 | + <property name="singleStep"> |
627 | + <double>0.000100000000000</double> |
628 | + </property> |
629 | + <property name="value"> |
630 | + <double>15.218750000000000</double> |
631 | + </property> |
632 | + </widget> |
633 | + </item> |
634 | + <item row="2" column="0"> |
635 | + <widget class="QLabel" name="jdLabel"> |
636 | + <property name="toolTip"> |
637 | + <string/> |
638 | + </property> |
639 | + <property name="whatsThis"> |
640 | + <string>Extinction is the loss of star brightness due to Earth's atmosphere. It is given in mag/airmass, where airmass is number of atmospheres light has to pass. (zenith: 1; horizon: about 40)</string> |
641 | + </property> |
642 | + <property name="text"> |
643 | + <string>Date and Time (UTC):</string> |
644 | + </property> |
645 | + </widget> |
646 | + </item> |
647 | + <item row="2" column="1"> |
648 | + <widget class="QDateTimeEdit" name="jdDateTimeEdit"> |
649 | + <property name="inputMethodHints"> |
650 | + <set>Qt::ImhDate|Qt::ImhPreferNumbers|Qt::ImhTime</set> |
651 | + </property> |
652 | + <property name="alignment"> |
653 | + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
654 | + </property> |
655 | + <property name="displayFormat"> |
656 | + <string>yyyy.MM.dd hh:mm</string> |
657 | + </property> |
658 | + <property name="calendarPopup"> |
659 | + <bool>true</bool> |
660 | + </property> |
661 | + </widget> |
662 | + </item> |
663 | + <item row="1" column="0"> |
664 | + <widget class="QLabel" name="driftLabel"> |
665 | + <property name="inputMethodHints"> |
666 | + <set>Qt::ImhNone</set> |
667 | + </property> |
668 | + <property name="text"> |
669 | + <string>Annual drift (degrees):</string> |
670 | + </property> |
671 | + <property name="alignment"> |
672 | + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> |
673 | + </property> |
674 | + </widget> |
675 | + </item> |
676 | + <item row="3" column="0"> |
677 | + <spacer name="verticalSpacer_2"> |
678 | + <property name="orientation"> |
679 | + <enum>Qt::Vertical</enum> |
680 | + </property> |
681 | + <property name="sizeType"> |
682 | + <enum>QSizePolicy::Expanding</enum> |
683 | + </property> |
684 | + <property name="sizeHint" stdset="0"> |
685 | + <size> |
686 | + <width>0</width> |
687 | + <height>0</height> |
688 | + </size> |
689 | + </property> |
690 | + </spacer> |
691 | + </item> |
692 | + <item row="0" column="0"> |
693 | + <widget class="QLabel" name="longitudeLabel"> |
694 | + <property name="text"> |
695 | + <string>Longitude of GRS (degrees):</string> |
696 | + </property> |
697 | + </widget> |
698 | + </item> |
699 | + <item row="0" column="1"> |
700 | + <widget class="QSpinBox" name="longitudeSpinBox"> |
701 | + <property name="alignment"> |
702 | + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
703 | + </property> |
704 | + <property name="maximum"> |
705 | + <number>359</number> |
706 | + </property> |
707 | + <property name="value"> |
708 | + <number>216</number> |
709 | + </property> |
710 | + </widget> |
711 | + </item> |
712 | + </layout> |
713 | + </widget> |
714 | + </item> |
715 | + </layout> |
716 | + </widget> |
717 | + <customwidgets> |
718 | + <customwidget> |
719 | + <class>BarFrame</class> |
720 | + <extends>QFrame</extends> |
721 | + <header>Dialog.hpp</header> |
722 | + <container>1</container> |
723 | + </customwidget> |
724 | + </customwidgets> |
725 | + <resources/> |
726 | + <connections/> |
727 | +</ui> |
728 | |
729 | === modified file 'src/gui/viewDialog.ui' |
730 | --- src/gui/viewDialog.ui 2016-03-17 14:58:14 +0000 |
731 | +++ src/gui/viewDialog.ui 2016-04-06 14:27:06 +0000 |
732 | @@ -792,6 +792,24 @@ |
733 | </widget> |
734 | </item> |
735 | <item> |
736 | + <layout class="QHBoxLayout" name="horizontalLayout_15"> |
737 | + <item> |
738 | + <widget class="QCheckBox" name="customGrsSettingsCheckBox"> |
739 | + <property name="text"> |
740 | + <string>Use custom settings of GRS:</string> |
741 | + </property> |
742 | + </widget> |
743 | + </item> |
744 | + <item> |
745 | + <widget class="QPushButton" name="pushButtonGrsDetails"> |
746 | + <property name="text"> |
747 | + <string>GRS details...</string> |
748 | + </property> |
749 | + </widget> |
750 | + </item> |
751 | + </layout> |
752 | + </item> |
753 | + <item> |
754 | <layout class="QHBoxLayout" name="planetLimMagHorizontalLayout"> |
755 | <item> |
756 | <widget class="QCheckBox" name="planetLimitMagnitudeCheckBox"> |
757 | @@ -2624,15 +2642,15 @@ |
758 | <resources/> |
759 | <connections/> |
760 | <buttongroups> |
761 | + <buttongroup name="buttonGroupDisplayedDSOTypes"> |
762 | + <property name="exclusive"> |
763 | + <bool>false</bool> |
764 | + </property> |
765 | + </buttongroup> |
766 | <buttongroup name="buttonGroupDisplayedDSOCatalogs"> |
767 | <property name="exclusive"> |
768 | <bool>false</bool> |
769 | </property> |
770 | </buttongroup> |
771 | - <buttongroup name="buttonGroupDisplayedDSOTypes"> |
772 | - <property name="exclusive"> |
773 | - <bool>false</bool> |
774 | - </property> |
775 | - </buttongroup> |
776 | </buttongroups> |
777 | </ui> |
Maybe hide dialog when user unchecks the custom GRS option?
Else, looks good, go for it!