Merge lp:~alexwolf/stellarium/info into lp:stellarium

Proposed by Alexander Wolf
Status: Superseded
Proposed branch: lp:~alexwolf/stellarium/info
Merge into: lp:stellarium
Diff against target: 1838 lines (+1136/-125)
15 files modified
data/default_config.ini (+15/-0)
po/stellarium/POTFILES.in (+1/-0)
po/stellarium/stellarium.pot (+194/-85)
src/CMakeLists.txt (+4/-0)
src/core/StelObject.cpp (+2/-1)
src/core/StelObjectMgr.cpp (+154/-0)
src/core/StelObjectMgr.hpp (+2/-0)
src/core/StelUtils.hpp (+4/-4)
src/gui/ConfigurationDialog.cpp (+49/-5)
src/gui/ConfigurationDialog.hpp (+6/-0)
src/gui/CustomInfoDialog.cpp (+249/-0)
src/gui/CustomInfoDialog.hpp (+96/-0)
src/gui/CustomInfoDialog.ui (+286/-0)
src/gui/SkyGui.cpp (+12/-0)
src/gui/configurationDialog.ui (+62/-30)
To merge this branch: bzr merge lp:~alexwolf/stellarium/info
Reviewer Review Type Date Requested Status
Alexander Wolf Needs Resubmitting
gzotti Pending
treaves code Pending
Bogdan Marinov Pending
Matthew Gates Pending
Review via email: mp+101937@code.launchpad.net

This proposal supersedes a proposal from 2012-04-04.

This proposal has been superseded by a proposal from 2012-04-13.

Description of the change

I'm implemented of opportunity to freely choose the object's information to display. This code maybe improved but right now I don't have a nice ideas for this.

Comments?

To post a comment you must log in.
Revision history for this message
gzotti (georg-zotti) wrote : Posted in a previous version of this proposal

I did not build the branch, but from the code it seems to be a good addition. Some users may want to avoid "all those numbers", others will want even more, this is a good step.

review: Approve
Revision history for this message
Bogdan Marinov (daggerstab) wrote : Posted in a previous version of this proposal

> I did not build the branch, but from the code it seems to be a good addition.
> Some users may want to avoid "all those numbers", others will want even more,
> this is a good step.

Not building the branch is a really bad idea for a number of reasons. At the very least, this Launchpad feature is intended mainly for code review, not voting on the appropriateness of the feature.

Revision history for this message
Bogdan Marinov (daggerstab) wrote : Posted in a previous version of this proposal

Segmentation fault on pressing the "..." button.

There is also a number of other issues, but I am too tired now to bother listing them.

review: Needs Fixing
Revision history for this message
treaves (treaves) wrote : Posted in a previous version of this proposal

Why can't getCustomInfoString(void) be in StelObject, instead of StelCore?

Please use braces on all conditionals.

review: Needs Fixing (code)
Revision history for this message
treaves (treaves) wrote : Posted in a previous version of this proposal

> Why can't getCustomInfoString(void) be in StelObject, instead of StelCore?
>
> Please use braces on all conditionals.

I too get the segfault.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

I'm made a refactoring of code

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Oops... sometimes code get segfaults :(

review: Needs Fixing
lp:~alexwolf/stellarium/info updated
5261. By Alexander Wolf

fixed segfaults

Revision history for this message
Alexander Wolf (alexwolf) wrote :

O.K. segfault has been fixed

review: Needs Resubmitting
lp:~alexwolf/stellarium/info updated
5262. By Alexander Wolf

drop unused include QSettings

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/default_config.ini'
2--- data/default_config.ini 2012-03-14 14:18:10 +0000
3+++ data/default_config.ini 2012-04-13 18:05:24 +0000
4@@ -85,6 +85,21 @@
5 labels_amount = 3.0
6 init_bortle_scale = 3
7
8+[custom_selected_info]
9+flag_show_absolutemagnitude = false
10+flag_show_altaz = false
11+flag_show_catalognumber = false
12+flag_show_distance = false
13+flag_show_extra1 = false
14+flag_show_extra2 = false
15+flag_show_extra3 = false
16+flag_show_hourangle = false
17+flag_show_magnitude = false
18+flag_show_name = false
19+flag_show_radecj2000 = false
20+flag_show_radecofdate = false
21+flag_show_size = false
22+
23 [gui]
24 flag_show_flip_buttons = false
25 flag_show_nebulae_background_button = false
26
27=== modified file 'po/stellarium/POTFILES.in'
28--- po/stellarium/POTFILES.in 2012-03-10 10:35:22 +0000
29+++ po/stellarium/POTFILES.in 2012-04-13 18:05:24 +0000
30@@ -37,6 +37,7 @@
31 src/ui_configurationDialog.h
32 src/ui_addRemoveLandscapesDialog.h
33 src/ui_AtmosphereDialog.h
34+src/ui_CustomInfoDialog.h
35 src/ui_scriptConsole.h
36
37 # Plug-in translations
38
39=== modified file 'po/stellarium/stellarium.pot'
40--- po/stellarium/stellarium.pot 2012-04-11 09:32:09 +0000
41+++ po/stellarium/stellarium.pot 2012-04-13 18:05:24 +0000
42@@ -8,7 +8,7 @@
43 msgstr ""
44 "Project-Id-Version: PACKAGE VERSION\n"
45 "Report-Msgid-Bugs-To: \n"
46-"POT-Creation-Date: 2012-04-11 16:29+0700\n"
47+"POT-Creation-Date: 2012-04-13 23:56+0700\n"
48 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
49 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
50 "Language-Team: LANGUAGE <LL@li.org>\n"
51@@ -323,68 +323,68 @@
52 msgid "Az/Alt: %1/%2"
53 msgstr ""
54
55-#: src/gui/ConfigurationDialog.cpp:312
56+#: src/gui/ConfigurationDialog.cpp:342
57 msgid "Select screenshot directory"
58 msgstr ""
59
60-#: src/gui/ConfigurationDialog.cpp:487
61+#: src/gui/ConfigurationDialog.cpp:519
62 #, qt-format
63 msgid "Startup FOV: %1%2"
64 msgstr ""
65
66-#: src/gui/ConfigurationDialog.cpp:495
67+#: src/gui/ConfigurationDialog.cpp:527
68 #, qt-format
69 msgid "Startup direction of view Az/Alt: %1/%2"
70 msgstr ""
71
72-#: src/gui/ConfigurationDialog.cpp:534
73+#: src/gui/ConfigurationDialog.cpp:566
74 #: plugins/Satellites/src/gui/SatellitesDialog.cpp:260
75 msgid "Authors"
76 msgstr ""
77
78-#: src/gui/ConfigurationDialog.cpp:538 src/gui/ViewDialog.cpp:393
79+#: src/gui/ConfigurationDialog.cpp:570 src/gui/ViewDialog.cpp:393
80 msgid "Contact"
81 msgstr ""
82
83-#: src/gui/ConfigurationDialog.cpp:616
84+#: src/gui/ConfigurationDialog.cpp:648
85 msgid "Author"
86 msgstr ""
87
88-#: src/gui/ConfigurationDialog.cpp:620
89+#: src/gui/ConfigurationDialog.cpp:652
90 msgid "License"
91 msgstr ""
92
93-#: src/gui/ConfigurationDialog.cpp:650
94+#: src/gui/ConfigurationDialog.cpp:682
95 msgid "Running script: "
96 msgstr ""
97
98-#: src/gui/ConfigurationDialog.cpp:657
99+#: src/gui/ConfigurationDialog.cpp:689
100 msgid "Running script: [none]"
101 msgstr ""
102
103-#: src/gui/ConfigurationDialog.cpp:727
104+#: src/gui/ConfigurationDialog.cpp:759
105 msgid ""
106 "Finished downloading new star catalogs!\n"
107 "Restart Stellarium to display them."
108 msgstr ""
109
110-#: src/gui/ConfigurationDialog.cpp:731
111+#: src/gui/ConfigurationDialog.cpp:763
112 msgid "All available star catalogs have been installed."
113 msgstr ""
114
115-#: src/gui/ConfigurationDialog.cpp:736
116+#: src/gui/ConfigurationDialog.cpp:768
117 #, qt-format
118 msgid "Get catalog %1 of %2"
119 msgstr ""
120
121-#: src/gui/ConfigurationDialog.cpp:743
122+#: src/gui/ConfigurationDialog.cpp:775
123 #, qt-format
124 msgid ""
125 "Downloading %1...\n"
126 "(You can close this window.)"
127 msgstr ""
128
129-#: src/gui/ConfigurationDialog.cpp:750
130+#: src/gui/ConfigurationDialog.cpp:782
131 #, qt-format
132 msgid ""
133 "Download size: %1MB\n"
134@@ -392,18 +392,18 @@
135 "Magnitude range: %3 - %4"
136 msgstr ""
137
138-#: src/gui/ConfigurationDialog.cpp:793 src/gui/ConfigurationDialog.cpp:829
139+#: src/gui/ConfigurationDialog.cpp:825 src/gui/ConfigurationDialog.cpp:861
140 #, qt-format
141 msgid ""
142 "Error downloading %1:\n"
143 "%2"
144 msgstr ""
145
146-#: src/gui/ConfigurationDialog.cpp:881
147+#: src/gui/ConfigurationDialog.cpp:913
148 msgid "Verifying file integrity..."
149 msgstr ""
150
151-#: src/gui/ConfigurationDialog.cpp:885
152+#: src/gui/ConfigurationDialog.cpp:917
153 #, qt-format
154 msgid ""
155 "Error downloading %1:\n"
156@@ -2723,7 +2723,7 @@
157
158 #: src/ui_searchDialogGui.h:589 src/ui_viewDialog.h:1137
159 #: src/ui_viewDialog.h:1142 src/ui_viewDialog.h:1144
160-#: src/ui_configurationDialog.h:855 src/ui_configurationDialog.h:866
161+#: src/ui_configurationDialog.h:891 src/ui_configurationDialog.h:902
162 #: plugins/TelescopeControl/src/ui_telescopeDialog.h:421
163 msgid "Options"
164 msgstr ""
165@@ -2917,282 +2917,290 @@
166 msgid "Visible"
167 msgstr ""
168
169-#: src/ui_configurationDialog.h:753
170+#: src/ui_configurationDialog.h:785
171 msgid "Configuration"
172 msgstr ""
173
174-#: src/ui_configurationDialog.h:755
175+#: src/ui_configurationDialog.h:787
176 msgid "Program language"
177 msgstr ""
178
179-#: src/ui_configurationDialog.h:756
180+#: src/ui_configurationDialog.h:788 src/ui_CustomInfoDialog.h:192
181 msgid "Selected object information"
182 msgstr ""
183
184-#: src/ui_configurationDialog.h:758
185+#: src/ui_configurationDialog.h:790
186 msgid "Display all information available"
187 msgstr ""
188
189-#: src/ui_configurationDialog.h:760
190+#: src/ui_configurationDialog.h:792
191 msgid "All available"
192 msgstr ""
193
194-#: src/ui_configurationDialog.h:762
195+#: src/ui_configurationDialog.h:794
196 msgid "Display less information"
197 msgstr ""
198
199-#: src/ui_configurationDialog.h:764
200+#: src/ui_configurationDialog.h:796
201 msgid "Short"
202 msgstr ""
203
204-#: src/ui_configurationDialog.h:766
205+#: src/ui_configurationDialog.h:798
206+msgid "Display user settings information"
207+msgstr ""
208+
209+#: src/ui_configurationDialog.h:800
210+msgid "Customized"
211+msgstr ""
212+
213+#: src/ui_configurationDialog.h:802
214 msgid "Display no information"
215 msgstr ""
216
217-#: src/ui_configurationDialog.h:768
218+#: src/ui_configurationDialog.h:804
219 msgid "None"
220 msgstr ""
221
222-#: src/ui_configurationDialog.h:769
223+#: src/ui_configurationDialog.h:805
224 msgid "Default options"
225 msgstr ""
226
227-#: src/ui_configurationDialog.h:771
228+#: src/ui_configurationDialog.h:807
229 msgid ""
230 "Save the settings you've changed this session to be the same the next time "
231 "you start Stellarium"
232 msgstr ""
233
234-#: src/ui_configurationDialog.h:773
235+#: src/ui_configurationDialog.h:809
236 #: plugins/TimeZoneConfiguration/src/ui_timeZoneConfigurationWindow.h:393
237 msgid "Save settings"
238 msgstr ""
239
240-#: src/ui_configurationDialog.h:775
241+#: src/ui_configurationDialog.h:811
242 msgid "Restore the default settings that came with Stellarium"
243 msgstr ""
244
245-#: src/ui_configurationDialog.h:777
246+#: src/ui_configurationDialog.h:813
247 msgid "Restore defaults"
248 msgstr ""
249
250-#: src/ui_configurationDialog.h:778
251+#: src/ui_configurationDialog.h:814
252 msgid ""
253 "Restoring default settings requires a restart of Stellarium. Saving all the "
254 "current options includes the current FOV and direction of view for use at "
255 "next startup."
256 msgstr ""
257
258-#: src/ui_configurationDialog.h:780
259+#: src/ui_configurationDialog.h:816
260 msgid "The width of your view when Stellarium starts"
261 msgstr ""
262
263-#: src/ui_configurationDialog.h:783
264+#: src/ui_configurationDialog.h:819
265 msgid "The direction you're looking when Stellarium starts"
266 msgstr ""
267
268-#: src/ui_configurationDialog.h:785
269+#: src/ui_configurationDialog.h:821
270 msgid "Control"
271 msgstr ""
272
273-#: src/ui_configurationDialog.h:787
274+#: src/ui_configurationDialog.h:823
275 msgid "Allow keyboard to pan and zoom"
276 msgstr ""
277
278-#: src/ui_configurationDialog.h:789
279+#: src/ui_configurationDialog.h:825
280 msgid "Enable keyboard navigation"
281 msgstr ""
282
283-#: src/ui_configurationDialog.h:791
284+#: src/ui_configurationDialog.h:827
285 msgid "Allow mouse to pan (drag) and zoom (mousewheel)"
286 msgstr ""
287
288-#: src/ui_configurationDialog.h:793
289+#: src/ui_configurationDialog.h:829
290 msgid "Enable mouse navigation"
291 msgstr ""
292
293-#: src/ui_configurationDialog.h:794
294+#: src/ui_configurationDialog.h:830
295 #: plugins/TextUserInterface/src/TextUserInterface.cpp:180
296 msgid "Startup date and time"
297 msgstr ""
298
299-#: src/ui_configurationDialog.h:796
300+#: src/ui_configurationDialog.h:832
301 msgid "Starts Stellarium at system clock date and time"
302 msgstr ""
303
304-#: src/ui_configurationDialog.h:798
305+#: src/ui_configurationDialog.h:834
306 msgid "System date and time"
307 msgstr ""
308
309-#: src/ui_configurationDialog.h:800
310+#: src/ui_configurationDialog.h:836
311 msgid ""
312 "Sets the simulation time to the next instance of this time of day when "
313 "Stellarium starts"
314 msgstr ""
315
316-#: src/ui_configurationDialog.h:802
317+#: src/ui_configurationDialog.h:838
318 msgid "System date at:"
319 msgstr ""
320
321-#: src/ui_configurationDialog.h:804
322+#: src/ui_configurationDialog.h:840
323 msgid "Use a specific date and time when Stellarium starts up"
324 msgstr ""
325
326-#: src/ui_configurationDialog.h:806
327+#: src/ui_configurationDialog.h:842
328 msgid "Other:"
329 msgstr ""
330
331-#: src/ui_configurationDialog.h:807
332+#: src/ui_configurationDialog.h:843
333 msgid "use current"
334 msgstr ""
335
336-#: src/ui_configurationDialog.h:808
337+#: src/ui_configurationDialog.h:844
338 msgid "Other"
339 msgstr ""
340
341-#: src/ui_configurationDialog.h:810
342+#: src/ui_configurationDialog.h:846
343 msgid "Hides the mouse cursor when inactive"
344 msgstr ""
345
346-#: src/ui_configurationDialog.h:812
347+#: src/ui_configurationDialog.h:848
348 msgid "Mouse cursor timeout (seconds):"
349 msgstr ""
350
351-#: src/ui_configurationDialog.h:814
352+#: src/ui_configurationDialog.h:850
353 msgid "Toggle vertical and horizontal image flip buttons."
354 msgstr ""
355
356-#: src/ui_configurationDialog.h:816
357+#: src/ui_configurationDialog.h:852
358 msgid "Show flip buttons"
359 msgstr ""
360
361-#: src/ui_configurationDialog.h:817
362+#: src/ui_configurationDialog.h:853
363 msgid "Planetarium options"
364 msgstr ""
365
366-#: src/ui_configurationDialog.h:819
367+#: src/ui_configurationDialog.h:855
368 msgid ""
369 "Spheric mirror distortion is used when projecting Stellarium onto a spheric "
370 "mirror for low-cost planetarium systems."
371 msgstr ""
372
373-#: src/ui_configurationDialog.h:821
374+#: src/ui_configurationDialog.h:857
375 msgid "Spheric mirror distortion"
376 msgstr ""
377
378-#: src/ui_configurationDialog.h:823
379+#: src/ui_configurationDialog.h:859
380 msgid "Align labels with the horizon"
381 msgstr ""
382
383-#: src/ui_configurationDialog.h:825
384+#: src/ui_configurationDialog.h:861
385 msgid "Gravity labels"
386 msgstr ""
387
388-#: src/ui_configurationDialog.h:827
389+#: src/ui_configurationDialog.h:863
390 msgid ""
391 "When enabled, the \"auto zoom out\" key will also set the initial viewing "
392 "direction"
393 msgstr ""
394
395-#: src/ui_configurationDialog.h:829
396+#: src/ui_configurationDialog.h:865
397 msgid "Auto zoom out returns to initial direction of view"
398 msgstr ""
399
400-#: src/ui_configurationDialog.h:831
401+#: src/ui_configurationDialog.h:867
402 msgid "Mask out everything outside a central circle in the main view"
403 msgstr ""
404
405-#: src/ui_configurationDialog.h:833
406+#: src/ui_configurationDialog.h:869
407 msgid "Disc viewport"
408 msgstr ""
409
410-#: src/ui_configurationDialog.h:835
411+#: src/ui_configurationDialog.h:871
412 msgid "Hide other constellations when you click one"
413 msgstr ""
414
415-#: src/ui_configurationDialog.h:837
416+#: src/ui_configurationDialog.h:873
417 msgid "Select single constellation"
418 msgstr ""
419
420-#: src/ui_configurationDialog.h:838
421+#: src/ui_configurationDialog.h:874
422 msgid "Screenshots"
423 msgstr ""
424
425-#: src/ui_configurationDialog.h:839
426+#: src/ui_configurationDialog.h:875
427 msgid "Screenshot Directory"
428 msgstr ""
429
430-#: src/ui_configurationDialog.h:841
431+#: src/ui_configurationDialog.h:877
432 msgid "Invert colors"
433 msgstr ""
434
435-#: src/ui_configurationDialog.h:842
436+#: src/ui_configurationDialog.h:878
437 msgid "Star catalog updates"
438 msgstr ""
439
440-#: src/ui_configurationDialog.h:844
441+#: src/ui_configurationDialog.h:880
442 msgid "Click here to start downloading"
443 msgstr ""
444
445-#: src/ui_configurationDialog.h:846
446+#: src/ui_configurationDialog.h:882
447 msgid "Download this file to view even more stars"
448 msgstr ""
449
450-#: src/ui_configurationDialog.h:848
451+#: src/ui_configurationDialog.h:884
452 msgid "Restart the download"
453 msgstr ""
454
455-#: src/ui_configurationDialog.h:850
456+#: src/ui_configurationDialog.h:886
457 msgid "Retry"
458 msgstr ""
459
460-#: src/ui_configurationDialog.h:852
461+#: src/ui_configurationDialog.h:888
462 msgid "Stop the download. You can always restart it later"
463 msgstr ""
464
465-#: src/ui_configurationDialog.h:854
466+#: src/ui_configurationDialog.h:890
467 #: plugins/TelescopeControl/src/ui_telescopeConfigurationDialog.h:518
468 msgid "Cancel"
469 msgstr ""
470
471-#: src/ui_configurationDialog.h:857
472+#: src/ui_configurationDialog.h:893
473 msgid "Close window when script runs"
474 msgstr ""
475
476-#: src/ui_configurationDialog.h:859
477+#: src/ui_configurationDialog.h:895
478 msgid "Run the selected script"
479 msgstr ""
480
481-#: src/ui_configurationDialog.h:863
482+#: src/ui_configurationDialog.h:899
483 msgid "Stop a running script"
484 msgstr ""
485
486-#: src/ui_configurationDialog.h:867
487+#: src/ui_configurationDialog.h:903
488 msgid "Load at startup"
489 msgstr ""
490
491-#: src/ui_configurationDialog.h:868
492+#: src/ui_configurationDialog.h:904
493 msgid "configure"
494 msgstr ""
495
496-#: src/ui_configurationDialog.h:873
497+#: src/ui_configurationDialog.h:909
498 msgid "Main"
499 msgstr ""
500
501-#: src/ui_configurationDialog.h:875
502+#: src/ui_configurationDialog.h:911
503 msgid "Navigation"
504 msgstr ""
505
506-#: src/ui_configurationDialog.h:877
507+#: src/ui_configurationDialog.h:913
508 msgid "Tools"
509 msgstr ""
510
511-#: src/ui_configurationDialog.h:879
512+#: src/ui_configurationDialog.h:915
513 #: plugins/TextUserInterface/src/TextUserInterface.cpp:441
514 msgid "Scripts"
515 msgstr ""
516
517-#: src/ui_configurationDialog.h:881
518+#: src/ui_configurationDialog.h:917
519 msgid "Plugins"
520 msgstr ""
521
522@@ -3261,6 +3269,107 @@
523 "for murky conditions."
524 msgstr ""
525
526+#: src/ui_CustomInfoDialog.h:194
527+msgid "Custom Info Settings"
528+msgstr ""
529+
530+#: src/ui_CustomInfoDialog.h:196
531+msgid "Display info about an object's name"
532+msgstr ""
533+
534+#: src/ui_CustomInfoDialog.h:198
535+msgid "An object's name"
536+msgstr ""
537+
538+#: src/ui_CustomInfoDialog.h:200
539+msgid "Display info about a catalog numbers"
540+msgstr ""
541+
542+#: src/ui_CustomInfoDialog.h:202
543+msgid "Catalog numbers"
544+msgstr ""
545+
546+#: src/ui_CustomInfoDialog.h:204
547+msgid "Display info about a visual magnitude"
548+msgstr ""
549+
550+#: src/ui_CustomInfoDialog.h:206
551+msgid "Visual magnitude"
552+msgstr ""
553+
554+#: src/ui_CustomInfoDialog.h:208
555+msgid "Display info about an absolute magnitude"
556+msgstr ""
557+
558+#: src/ui_CustomInfoDialog.h:210
559+msgid "Absolute magnitude"
560+msgstr ""
561+
562+#: src/ui_CustomInfoDialog.h:212
563+msgid "Display the equatorial position (J2000 ref)"
564+msgstr ""
565+
566+#: src/ui_CustomInfoDialog.h:214
567+msgid "The equatorial coordinates (J2000 ref)"
568+msgstr ""
569+
570+#: src/ui_CustomInfoDialog.h:216
571+msgid "Display the equatorial position (of date)"
572+msgstr ""
573+
574+#: src/ui_CustomInfoDialog.h:218
575+msgid "The equatorial coordinates (of date)"
576+msgstr ""
577+
578+#: src/ui_CustomInfoDialog.h:220
579+msgid "Display the altitude and azimuth position"
580+msgstr ""
581+
582+#: src/ui_CustomInfoDialog.h:222
583+msgid "The alt-azimuthal coordinates"
584+msgstr ""
585+
586+#: src/ui_CustomInfoDialog.h:224
587+msgid "Display the hour angle + DE (of date)"
588+msgstr ""
589+
590+#: src/ui_CustomInfoDialog.h:226
591+msgid "The hour angle"
592+msgstr ""
593+
594+#: src/ui_CustomInfoDialog.h:228
595+msgid "Display info about an object's distance"
596+msgstr ""
597+
598+#: src/ui_CustomInfoDialog.h:230
599+msgid "Object's distance"
600+msgstr ""
601+
602+#: src/ui_CustomInfoDialog.h:232
603+msgid "Display info about an object's size"
604+msgstr ""
605+
606+#: src/ui_CustomInfoDialog.h:234
607+msgid "Object's size"
608+msgstr ""
609+
610+#: src/ui_CustomInfoDialog.h:236 src/ui_CustomInfoDialog.h:240
611+#: src/ui_CustomInfoDialog.h:244
612+msgid "Display a derived class-specific extra fields"
613+msgstr ""
614+
615+#: src/ui_CustomInfoDialog.h:238
616+msgid "Additional info (Extra 1)"
617+msgstr ""
618+
619+#: src/ui_CustomInfoDialog.h:242
620+msgid "Additional info (Extra 2)"
621+msgstr ""
622+
623+#: src/ui_CustomInfoDialog.h:246
624+msgid "Additional info (Extra 3)"
625+msgstr ""
626+
627 #: src/ui_scriptConsole.h:341
628 msgid "Script console"
629 msgstr ""
630
631=== modified file 'src/CMakeLists.txt'
632--- src/CMakeLists.txt 2012-04-12 17:45:18 +0000
633+++ src/CMakeLists.txt 2012-04-13 18:05:24 +0000
634@@ -414,6 +414,8 @@
635 gui/AddRemoveLandscapesDialog.cpp
636 gui/AtmosphereDialog.hpp
637 gui/AtmosphereDialog.cpp
638+ gui/CustomInfoDialog.hpp
639+ gui/CustomInfoDialog.cpp
640 gui/StelDialog.hpp
641 gui/StelDialog.cpp)
642
643@@ -433,6 +435,7 @@
644 gui/ConfigurationDialog.hpp
645 gui/AddRemoveLandscapesDialog.hpp
646 gui/AtmosphereDialog.hpp
647+ gui/CustomInfoDialog.hpp
648 gui/StelDialog.hpp)
649
650 ################# compiles .ui files ############
651@@ -444,6 +447,7 @@
652 gui/searchDialogGui.ui
653 gui/configurationDialog.ui
654 gui/AtmosphereDialog.ui
655+ gui/CustomInfoDialog.ui
656 gui/addRemoveLandscapesDialog.ui)
657
658 IF(ENABLE_SCRIPT_CONSOLE)
659
660=== modified file 'src/core/StelObject.cpp'
661--- src/core/StelObject.cpp 2012-01-11 10:50:37 +0000
662+++ src/core/StelObject.cpp 2012-04-13 18:05:24 +0000
663@@ -27,11 +27,11 @@
664 #include "StelSkyDrawer.hpp"
665 #include "RefractionExtinction.hpp"
666 #include "StelLocation.hpp"
667+#include "QSettings"
668
669 #include <QRegExp>
670 #include <QDebug>
671
672-
673 Vec3d StelObject::getEquinoxEquatorialPos(const StelCore* core) const
674 {
675 return core->j2000ToEquinoxEqu(getJ2000EquatorialPos(core));
676@@ -154,3 +154,4 @@
677 str.append(QString("</font>"));
678 }
679 }
680+
681
682=== modified file 'src/core/StelObjectMgr.cpp'
683--- src/core/StelObjectMgr.cpp 2012-01-11 10:50:37 +0000
684+++ src/core/StelObjectMgr.cpp 2012-04-13 18:05:24 +0000
685@@ -32,6 +32,7 @@
686 #include <QString>
687 #include <QDebug>
688 #include <QStringList>
689+#include <QSettings>
690
691 StelObjectMgr::StelObjectMgr() : searchRadiusPixel(30.f), distanceWeight(1.f)
692 {
693@@ -244,3 +245,156 @@
694 result.sort();
695 return result;
696 }
697+
698+int StelObjectMgr::getCustomInfoString(void)
699+{
700+ QSettings* conf = StelApp::getInstance().getSettings();
701+
702+ bool Name = conf->value("custom_selected_info/flag_show_name", false).toBool();
703+ bool CatalogNumber = conf->value("custom_selected_info/flag_show_catalognumber", false).toBool();
704+ bool Magnitude = conf->value("custom_selected_info/flag_show_magnitude", false).toBool();
705+ bool RaDecJ2000 = conf->value("custom_selected_info/flag_show_radecj2000", false).toBool();
706+ bool RaDecOfDate = conf->value("custom_selected_info/flag_show_radecofdate", false).toBool();
707+ bool AltAz = conf->value("custom_selected_info/flag_show_altaz", false).toBool();
708+ bool Distance = conf->value("custom_selected_info/flag_show_distance", false).toBool();
709+ bool Size = conf->value("custom_selected_info/flag_show_size", false).toBool();
710+ bool Extra1 = conf->value("custom_selected_info/flag_show_extra1", false).toBool();
711+ bool Extra2 = conf->value("custom_selected_info/flag_show_extra2", false).toBool();
712+ bool Extra3 = conf->value("custom_selected_info/flag_show_extra3", false).toBool();
713+ bool HourAngle = conf->value("custom_selected_info/flag_show_hourangle", false).toBool();
714+ bool AbsoluteMagnitude = conf->value("custom_selected_info/flag_show_absolutemagnitude", false).toBool();
715+
716+ int OctZero = 0x00000000;
717+
718+ int NameOct;
719+ if (Name)
720+ {
721+ NameOct = StelObject::Name;
722+ }
723+ else
724+ {
725+ NameOct = OctZero;
726+ }
727+
728+ int CatalogNumberOct;
729+ if (CatalogNumber)
730+ {
731+ CatalogNumberOct = StelObject::CatalogNumber;
732+ }
733+ else
734+ {
735+ CatalogNumberOct = OctZero;
736+ }
737+
738+ int MagnitudeOct;
739+ if (Magnitude)
740+ {
741+ MagnitudeOct = StelObject::Magnitude;
742+ }
743+ else
744+ {
745+ MagnitudeOct = OctZero;
746+ }
747+
748+ int RaDecJ2000Oct;
749+ if (RaDecJ2000)
750+ {
751+ RaDecJ2000Oct = StelObject::RaDecJ2000;
752+ }
753+ else
754+ {
755+ RaDecJ2000Oct = OctZero;
756+ }
757+
758+ int RaDecOfDateOct;
759+ if (RaDecOfDate)
760+ {
761+ RaDecOfDateOct = StelObject::RaDecOfDate;
762+ }
763+ else
764+ {
765+ RaDecOfDateOct = OctZero;
766+ }
767+
768+ int AltAzOct;
769+ if (AltAz)
770+ {
771+ AltAzOct = StelObject::AltAzi;
772+ }
773+ else
774+ {
775+ AltAzOct = OctZero;
776+ }
777+
778+ int DistanceOct;
779+ if (Distance)
780+ {
781+ DistanceOct = StelObject::Distance;
782+ }
783+ else
784+ {
785+ DistanceOct = OctZero;
786+ }
787+
788+ int SizeOct;
789+ if (Size)
790+ {
791+ SizeOct = StelObject::Size;
792+ }
793+ else
794+ {
795+ SizeOct = OctZero;
796+ }
797+
798+ int Extra1Oct;
799+ if (Extra1)
800+ {
801+ Extra1Oct = StelObject::Extra1;
802+ }
803+ else
804+ {
805+ Extra1Oct = OctZero;
806+ }
807+
808+ int Extra2Oct;
809+ if (Extra2)
810+ {
811+ Extra2Oct = StelObject::Extra2;
812+ }
813+ else
814+ {
815+ Extra2Oct = OctZero;
816+ }
817+
818+ int Extra3Oct;
819+ if (Extra3)
820+ {
821+ Extra3Oct = StelObject::Extra3;
822+ }
823+ else
824+ {
825+ Extra3Oct = OctZero;
826+ }
827+
828+ int HourAngleOct;
829+ if (HourAngle)
830+ {
831+ HourAngleOct = StelObject::HourAngle;
832+ }
833+ else
834+ {
835+ HourAngleOct = OctZero;
836+ }
837+
838+ int AbsoluteMagnitudeOct;
839+ if (AbsoluteMagnitude)
840+ {
841+ AbsoluteMagnitudeOct = StelObject::AbsoluteMagnitude;
842+ }
843+ else
844+ {
845+ AbsoluteMagnitudeOct = OctZero;
846+ }
847+
848+ return (NameOct|CatalogNumberOct|MagnitudeOct|RaDecJ2000Oct|RaDecOfDateOct|AltAzOct|DistanceOct|SizeOct|Extra1Oct|Extra2Oct|Extra3Oct|HourAngleOct|AbsoluteMagnitudeOct);
849+}
850
851=== modified file 'src/core/StelObjectMgr.hpp'
852--- src/core/StelObjectMgr.hpp 2012-01-11 10:50:37 +0000
853+++ src/core/StelObjectMgr.hpp 2012-04-13 18:05:24 +0000
854@@ -126,6 +126,8 @@
855 //! Default to 1.
856 void setDistanceWeight(float newDistanceWeight) {distanceWeight=newDistanceWeight;}
857
858+ int getCustomInfoString(void);
859+
860 signals:
861 //! Indicate that the selected StelObjects has changed.
862 //! @param action define if the user requested that the objects are added to the selection or just replace it
863
864=== modified file 'src/core/StelUtils.hpp'
865--- src/core/StelUtils.hpp 2012-01-11 10:50:37 +0000
866+++ src/core/StelUtils.hpp 2012-04-13 18:05:24 +0000
867@@ -143,10 +143,10 @@
868 //! @param v the input 3D vector
869 void rectToSphe(float *lng, float *lat, const Vec3f& v);
870
871- // GZ: some additions. I need those just for quick conversions for text display.
872- //! Coordinate Transformation from equatorial to ecliptical
873- void ctRadec2Ecl(const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad);
874- // GZ: done
875+ // GZ: some additions. I need those just for quick conversions for text display.
876+ //! Coordinate Transformation from equatorial to ecliptical
877+ void ctRadec2Ecl(const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad);
878+ // GZ: done
879
880 //! Convert a string longitude, latitude, RA or Declination angle
881 //! to radians.
882
883=== modified file 'src/gui/ConfigurationDialog.cpp'
884--- src/gui/ConfigurationDialog.cpp 2012-04-06 09:11:50 +0000
885+++ src/gui/ConfigurationDialog.cpp 2012-04-13 18:05:24 +0000
886@@ -20,6 +20,7 @@
887
888 #include "Dialog.hpp"
889 #include "ConfigurationDialog.hpp"
890+#include "CustomInfoDialog.hpp"
891 #include "StelMainGraphicsView.hpp"
892 #include "StelMainWindow.hpp"
893 #include "ui_configurationDialog.h"
894@@ -29,6 +30,7 @@
895 #include "StelCore.hpp"
896 #include "StelLocaleMgr.hpp"
897 #include "StelProjector.hpp"
898+#include "StelObjectMgr.hpp"
899
900 #include "StelCore.hpp"
901 #include "StelMovementMgr.hpp"
902@@ -62,14 +64,18 @@
903 ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NULL), gui(agui)
904 {
905 ui = new Ui_configurationDialogForm;
906+ customInfoDialog = NULL;
907 hasDownloadedStarCatalog = false;
908 isDownloadingStarCatalog = false;
909- savedProjectionType = StelApp::getInstance().getCore()->getCurrentProjectionType();
910+ savedProjectionType = StelApp::getInstance().getCore()->getCurrentProjectionType();
911 }
912
913 ConfigurationDialog::~ConfigurationDialog()
914 {
915 delete ui;
916+ ui=NULL;
917+ delete customInfoDialog;
918+ customInfoDialog = NULL;
919 }
920
921 void ConfigurationDialog::retranslate()
922@@ -145,14 +151,32 @@
923
924 // Selected object info
925 if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0)
926+ {
927 ui->noSelectedInfoRadio->setChecked(true);
928+ ui->pushButtonCustomInfoDialog->setEnabled(false);
929+ }
930 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))
931- ui->briefSelectedInfoRadio->setChecked(true);
932- else
933+ {
934+ ui->briefSelectedInfoRadio->setChecked(true);
935+ ui->pushButtonCustomInfoDialog->setEnabled(false);
936+ }
937+ else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::AllInfo))
938+ {
939 ui->allSelectedInfoRadio->setChecked(true);
940+ ui->pushButtonCustomInfoDialog->setEnabled(false);
941+ }
942+ else
943+ {
944+ ui->customSelectedInfoRadio->setChecked(true);
945+ ui->pushButtonCustomInfoDialog->setEnabled(true);
946+ }
947+
948 connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo()));
949 connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo()));
950 connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo()));
951+ connect(ui->customSelectedInfoRadio, SIGNAL(released()), this, SLOT(setCustomSelectedInfo()));
952+
953+ connect(ui->pushButtonCustomInfoDialog, SIGNAL(clicked()), this, SLOT(showCustomInfoDialog()));
954
955 // Navigation tab
956 // Startup time
957@@ -288,17 +312,27 @@
958 void ConfigurationDialog::setNoSelectedInfo(void)
959 {
960 gui->setInfoTextFilters(StelObject::InfoStringGroup(0));
961+ ui->pushButtonCustomInfoDialog->setEnabled(false);
962 }
963
964 void ConfigurationDialog::setAllSelectedInfo(void)
965 {
966 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::AllInfo));
967+ ui->pushButtonCustomInfoDialog->setEnabled(false);
968 }
969
970 void ConfigurationDialog::setBriefSelectedInfo(void)
971 {
972 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::ShortInfo));
973-}
974+ ui->pushButtonCustomInfoDialog->setEnabled(false);
975+}
976+
977+void ConfigurationDialog::setCustomSelectedInfo(void)
978+{
979+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
980+ ui->pushButtonCustomInfoDialog->setEnabled(true);
981+}
982+
983
984 void ConfigurationDialog::cursorTimeOutChanged()
985 {
986@@ -429,8 +463,10 @@
987 conf->setValue("gui/selected_object_info", "none");
988 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))
989 conf->setValue("gui/selected_object_info", "short");
990- else
991+ else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::AllInfo))
992 conf->setValue("gui/selected_object_info", "all");
993+ else
994+ conf->setValue("gui/selected_object_info", "custom");
995
996 // toolbar auto-hide status
997 conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideHorizontalButtonBar());
998@@ -893,3 +929,11 @@
999
1000 resetStarCatalogControls();
1001 }
1002+
1003+void ConfigurationDialog::showCustomInfoDialog()
1004+{
1005+ if(customInfoDialog == NULL)
1006+ customInfoDialog = new CustomInfoDialog();
1007+
1008+ customInfoDialog->setVisible(true);
1009+}
1010
1011=== modified file 'src/gui/ConfigurationDialog.hpp'
1012--- src/gui/ConfigurationDialog.hpp 2012-02-13 18:59:16 +0000
1013+++ src/gui/ConfigurationDialog.hpp 2012-04-13 18:05:24 +0000
1014@@ -32,6 +32,7 @@
1015 class QNetworkAccessManager;
1016 class QListWidgetItem;
1017 class StelGui;
1018+class CustomInfoDialog;
1019
1020 class ConfigurationDialog : public StelDialog
1021 {
1022@@ -76,6 +77,7 @@
1023 void setNoSelectedInfo(void);
1024 void setAllSelectedInfo(void);
1025 void setBriefSelectedInfo(void);
1026+ void setCustomSelectedInfo(void);
1027 void selectLanguage(const QString& languageCode);
1028 void setStartupTimeMode();
1029 void setDiskViewport(bool);
1030@@ -131,10 +133,14 @@
1031
1032 void changePage(QListWidgetItem *current, QListWidgetItem *previous);
1033
1034+ void showCustomInfoDialog();
1035+
1036 private:
1037 StelGui* gui;
1038
1039 int savedProjectionType;
1040+
1041+ CustomInfoDialog* customInfoDialog;
1042 };
1043
1044 #endif // _CONFIGURATIONDIALOG_HPP_
1045
1046=== added file 'src/gui/CustomInfoDialog.cpp'
1047--- src/gui/CustomInfoDialog.cpp 1970-01-01 00:00:00 +0000
1048+++ src/gui/CustomInfoDialog.cpp 2012-04-13 18:05:24 +0000
1049@@ -0,0 +1,249 @@
1050+/*
1051+ * This program is distributed in the hope that it will be useful,
1052+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1053+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1054+ * GNU General Public License for more details.
1055+ * You should have received a copy of the GNU General Public License
1056+ * along with this program; if not, write to the Free Software
1057+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
1058+*/
1059+
1060+#include "CustomInfoDialog.hpp"
1061+#include "ui_CustomInfoDialog.h"
1062+
1063+#include "Dialog.hpp"
1064+#include "StelApp.hpp"
1065+#include "StelObjectMgr.hpp"
1066+
1067+#include <QDebug>
1068+
1069+CustomInfoDialog::CustomInfoDialog()
1070+{
1071+ ui = new Ui_CustomInfoDialogForm;
1072+ conf = StelApp::getInstance().getSettings();
1073+ gui = StelApp::getInstance().getGui();
1074+}
1075+
1076+CustomInfoDialog::~CustomInfoDialog()
1077+{
1078+ delete ui;
1079+ ui=NULL;
1080+}
1081+
1082+void CustomInfoDialog::retranslate()
1083+{
1084+ if (dialog)
1085+ ui->retranslateUi(dialog);
1086+}
1087+
1088+
1089+void CustomInfoDialog::createDialogContent()
1090+{
1091+ ui->setupUi(dialog);
1092+
1093+ //Signals and slots
1094+ connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
1095+ connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
1096+
1097+ //An object's name
1098+ ui->nameCheckBox->setChecked(getNameCustomInfoFlag());
1099+ connect(ui->nameCheckBox, SIGNAL(toggled(bool)), this, SLOT(setNameCustomInfoFlag(bool)));
1100+
1101+ //Catalog numbers
1102+ ui->catalogNumberCheckBox->setChecked(getCatalogNumberCustomInfoFlag());
1103+ connect(ui->catalogNumberCheckBox, SIGNAL(toggled(bool)), this, SLOT(setCatalogNumberCustomInfoFlag(bool)));
1104+
1105+ //Magnitude related data
1106+ ui->magnitudeCheckBox->setChecked(getMagnitudeCustomInfoFlag());
1107+ connect(ui->magnitudeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setMagnitudeCustomInfoFlag(bool)));
1108+
1109+ //The equatorial position (J2000 ref)
1110+ ui->raDecJ2000CheckBox->setChecked(getRaDecJ2000CustomInfoFlag());
1111+ connect(ui->raDecJ2000CheckBox, SIGNAL(toggled(bool)), this, SLOT(setRaDecJ2000CustomInfoFlag(bool)));
1112+
1113+ //The equatorial position (of date)
1114+ ui->raDecOfDateCheckBox->setChecked(getRaDecOfDateCustomInfoFlag());
1115+ connect(ui->raDecOfDateCheckBox, SIGNAL(toggled(bool)), this, SLOT(setRaDecOfDateCustomInfoFlag(bool)));
1116+
1117+ //The position (Altitude/Azimuth)
1118+ ui->altAzCheckBox->setChecked(getAltAzCustomInfoFlag());
1119+ connect(ui->altAzCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAltAzCustomInfoFlag(bool)));
1120+
1121+ //Info about an object's distance
1122+ ui->distanceCheckBox->setChecked(getDistanceCustomInfoFlag());
1123+ connect(ui->distanceCheckBox, SIGNAL(toggled(bool)), this, SLOT(setDistanceCustomInfoFlag(bool)));
1124+
1125+ //Info about an object's size
1126+ ui->sizeCheckBox->setChecked(getSizeCustomInfoFlag());
1127+ connect(ui->sizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setSizeCustomInfoFlag(bool)));
1128+
1129+ //Derived class-specific extra fields
1130+ ui->extra1CheckBox->setChecked(getExtra1CustomInfoFlag());
1131+ connect(ui->extra1CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra1CustomInfoFlag(bool)));
1132+
1133+ //Derived class-specific extra fields
1134+ ui->extra2CheckBox->setChecked(getExtra2CustomInfoFlag());
1135+ connect(ui->extra2CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra2CustomInfoFlag(bool)));
1136+
1137+ //Derived class-specific extra fields
1138+ ui->extra3CheckBox->setChecked(getExtra3CustomInfoFlag());
1139+ connect(ui->extra3CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra3CustomInfoFlag(bool)));
1140+
1141+ //The hour angle + DE (of date)
1142+ ui->hourAngleCheckBox->setChecked(getHourAngleCustomInfoFlag());
1143+ connect(ui->hourAngleCheckBox, SIGNAL(toggled(bool)), this, SLOT(setHourAngleCustomInfoFlag(bool)));
1144+
1145+ //The absolute magnitude
1146+ ui->absoluteMagnitudeCheckBox->setChecked(getAbsoluteMagnitudeCustomInfoFlag());
1147+ connect(ui->absoluteMagnitudeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAbsoluteMagnitudeCustomInfoFlag(bool)));
1148+
1149+}
1150+
1151+void CustomInfoDialog::setVisible(bool v)
1152+{
1153+ StelDialog::setVisible(v);
1154+}
1155+
1156+bool CustomInfoDialog::getNameCustomInfoFlag()
1157+{
1158+ return conf->value("custom_selected_info/flag_show_name", false).toBool();
1159+}
1160+
1161+void CustomInfoDialog::setNameCustomInfoFlag(bool flag)
1162+{
1163+ conf->setValue("custom_selected_info/flag_show_name", flag);
1164+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1165+}
1166+
1167+bool CustomInfoDialog::getCatalogNumberCustomInfoFlag()
1168+{
1169+ return conf->value("custom_selected_info/flag_show_catalognumber", false).toBool();
1170+}
1171+
1172+void CustomInfoDialog::setCatalogNumberCustomInfoFlag(bool flag)
1173+{
1174+ conf->setValue("custom_selected_info/flag_show_catalognumber", flag);
1175+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1176+}
1177+
1178+bool CustomInfoDialog::getMagnitudeCustomInfoFlag()
1179+{
1180+ return conf->value("custom_selected_info/flag_show_magnitude", false).toBool();
1181+}
1182+
1183+void CustomInfoDialog::setMagnitudeCustomInfoFlag(bool flag)
1184+{
1185+ conf->setValue("custom_selected_info/flag_show_magnitude", flag);
1186+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1187+}
1188+
1189+bool CustomInfoDialog::getRaDecJ2000CustomInfoFlag()
1190+{
1191+ return conf->value("custom_selected_info/flag_show_radecj2000", false).toBool();
1192+}
1193+
1194+void CustomInfoDialog::setRaDecJ2000CustomInfoFlag(bool flag)
1195+{
1196+ conf->setValue("custom_selected_info/flag_show_radecj2000", flag);
1197+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1198+}
1199+
1200+bool CustomInfoDialog::getRaDecOfDateCustomInfoFlag()
1201+{
1202+ return conf->value("custom_selected_info/flag_show_radecofdate", false).toBool();
1203+}
1204+
1205+void CustomInfoDialog::setRaDecOfDateCustomInfoFlag(bool flag)
1206+{
1207+ conf->setValue("custom_selected_info/flag_show_radecofdate", flag);
1208+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1209+}
1210+
1211+bool CustomInfoDialog::getAltAzCustomInfoFlag()
1212+{
1213+ return conf->value("custom_selected_info/flag_show_altaz", false).toBool();
1214+}
1215+
1216+void CustomInfoDialog::setAltAzCustomInfoFlag(bool flag)
1217+{
1218+ conf->setValue("custom_selected_info/flag_show_altaz", flag);
1219+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1220+}
1221+
1222+bool CustomInfoDialog::getDistanceCustomInfoFlag()
1223+{
1224+ return conf->value("custom_selected_info/flag_show_distance", false).toBool();
1225+}
1226+
1227+void CustomInfoDialog::setDistanceCustomInfoFlag(bool flag)
1228+{
1229+ conf->setValue("custom_selected_info/flag_show_distance", flag);
1230+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1231+}
1232+
1233+bool CustomInfoDialog::getSizeCustomInfoFlag()
1234+{
1235+ return conf->value("custom_selected_info/flag_show_size", false).toBool();
1236+}
1237+
1238+void CustomInfoDialog::setSizeCustomInfoFlag(bool flag)
1239+{
1240+ conf->setValue("custom_selected_info/flag_show_size", flag);
1241+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1242+}
1243+
1244+bool CustomInfoDialog::getExtra1CustomInfoFlag()
1245+{
1246+ return conf->value("custom_selected_info/flag_show_extra1", false).toBool();
1247+}
1248+
1249+void CustomInfoDialog::setExtra1CustomInfoFlag(bool flag)
1250+{
1251+ conf->setValue("custom_selected_info/flag_show_extra1", flag);
1252+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1253+}
1254+
1255+bool CustomInfoDialog::getExtra2CustomInfoFlag()
1256+{
1257+ return conf->value("custom_selected_info/flag_show_extra2", false).toBool();
1258+}
1259+
1260+void CustomInfoDialog::setExtra2CustomInfoFlag(bool flag)
1261+{
1262+ conf->setValue("custom_selected_info/flag_show_extra2", flag);
1263+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1264+}
1265+
1266+bool CustomInfoDialog::getExtra3CustomInfoFlag()
1267+{
1268+ return conf->value("custom_selected_info/flag_show_extra3", false).toBool();
1269+}
1270+
1271+void CustomInfoDialog::setExtra3CustomInfoFlag(bool flag)
1272+{
1273+ conf->setValue("custom_selected_info/flag_show_extra3", flag);
1274+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1275+}
1276+
1277+bool CustomInfoDialog::getHourAngleCustomInfoFlag()
1278+{
1279+ return conf->value("custom_selected_info/flag_show_hourangle", false).toBool();
1280+}
1281+
1282+void CustomInfoDialog::setHourAngleCustomInfoFlag(bool flag)
1283+{
1284+ conf->setValue("custom_selected_info/flag_show_hourangle", flag);
1285+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1286+}
1287+
1288+bool CustomInfoDialog::getAbsoluteMagnitudeCustomInfoFlag()
1289+{
1290+ return conf->value("custom_selected_info/flag_show_absolutemagnitude", false).toBool();
1291+}
1292+
1293+void CustomInfoDialog::setAbsoluteMagnitudeCustomInfoFlag(bool flag)
1294+{
1295+ conf->setValue("custom_selected_info/flag_show_absolutemagnitude", flag);
1296+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1297+}
1298+
1299
1300=== added file 'src/gui/CustomInfoDialog.hpp'
1301--- src/gui/CustomInfoDialog.hpp 1970-01-01 00:00:00 +0000
1302+++ src/gui/CustomInfoDialog.hpp 2012-04-13 18:05:24 +0000
1303@@ -0,0 +1,96 @@
1304+/*
1305+ * Stellarium
1306+ *
1307+ * Copyright (C) 2012 Alexander Wolf
1308+ *
1309+ * This program is free software; you can redistribute it and/or
1310+ * modify it under the terms of the GNU General Public License
1311+ * as published by the Free Software Foundation; either version 2
1312+ * of the License, or (at your option) any later version.
1313+ *
1314+ * This program is distributed in the hope that it will be useful,
1315+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1316+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1317+ * GNU General Public License for more details.
1318+ * You should have received a copy of the GNU General Public License
1319+ * along with this program; if not, write to the Free Software
1320+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
1321+*/
1322+
1323+// AW: Methods copied largely from AddRemoveLandscapesDialog
1324+
1325+#ifndef _CUSTOMINFODIALOG_HPP_
1326+#define _CUSTOMINFODIALOG_HPP_
1327+
1328+#include <QObject>
1329+#include <QSettings>
1330+#include "StelDialog.hpp"
1331+#include "StelGui.hpp"
1332+
1333+class Ui_CustomInfoDialogForm;
1334+
1335+//! @class CustomInfoDialog
1336+class CustomInfoDialog : public StelDialog
1337+{
1338+ Q_OBJECT
1339+
1340+public:
1341+ CustomInfoDialog();
1342+ virtual ~CustomInfoDialog();
1343+
1344+public slots:
1345+ void retranslate();
1346+ void setVisible(bool);
1347+
1348+protected:
1349+ //! Initialize the dialog widgets and connect the signals/slots.
1350+ virtual void createDialogContent();
1351+ Ui_CustomInfoDialogForm *ui;
1352+
1353+private slots:
1354+ bool getNameCustomInfoFlag();
1355+ void setNameCustomInfoFlag(bool flag);
1356+
1357+ bool getCatalogNumberCustomInfoFlag();
1358+ void setCatalogNumberCustomInfoFlag(bool flag);
1359+
1360+ bool getMagnitudeCustomInfoFlag();
1361+ void setMagnitudeCustomInfoFlag(bool flag);
1362+
1363+ bool getRaDecJ2000CustomInfoFlag();
1364+ void setRaDecJ2000CustomInfoFlag(bool flag);
1365+
1366+ bool getRaDecOfDateCustomInfoFlag();
1367+ void setRaDecOfDateCustomInfoFlag(bool flag);
1368+
1369+ bool getAltAzCustomInfoFlag();
1370+ void setAltAzCustomInfoFlag(bool flag);
1371+
1372+ bool getDistanceCustomInfoFlag();
1373+ void setDistanceCustomInfoFlag(bool flag);
1374+
1375+ bool getSizeCustomInfoFlag();
1376+ void setSizeCustomInfoFlag(bool flag);
1377+
1378+ bool getExtra1CustomInfoFlag();
1379+ void setExtra1CustomInfoFlag(bool flag);
1380+
1381+ bool getExtra2CustomInfoFlag();
1382+ void setExtra2CustomInfoFlag(bool flag);
1383+
1384+ bool getExtra3CustomInfoFlag();
1385+ void setExtra3CustomInfoFlag(bool flag);
1386+
1387+ bool getHourAngleCustomInfoFlag();
1388+ void setHourAngleCustomInfoFlag(bool flag);
1389+
1390+ bool getAbsoluteMagnitudeCustomInfoFlag();
1391+ void setAbsoluteMagnitudeCustomInfoFlag(bool flag);
1392+
1393+private:
1394+ StelGuiBase* gui;
1395+ QSettings* conf;
1396+
1397+};
1398+
1399+#endif // _CUSTOMINFODIALOG_HPP_
1400
1401=== added file 'src/gui/CustomInfoDialog.ui'
1402--- src/gui/CustomInfoDialog.ui 1970-01-01 00:00:00 +0000
1403+++ src/gui/CustomInfoDialog.ui 2012-04-13 18:05:24 +0000
1404@@ -0,0 +1,286 @@
1405+<?xml version="1.0" encoding="UTF-8"?>
1406+<ui version="4.0">
1407+ <class>CustomInfoDialogForm</class>
1408+ <widget class="QWidget" name="CustomInfoDialogForm">
1409+ <property name="sizePolicy">
1410+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
1411+ <horstretch>0</horstretch>
1412+ <verstretch>0</verstretch>
1413+ </sizepolicy>
1414+ </property>
1415+ <layout class="QVBoxLayout" name="verticalLayout">
1416+ <property name="spacing">
1417+ <number>0</number>
1418+ </property>
1419+ <property name="margin">
1420+ <number>0</number>
1421+ </property>
1422+ <item>
1423+ <widget class="BarFrame" name="TitleBar">
1424+ <property name="minimumSize">
1425+ <size>
1426+ <width>16</width>
1427+ <height>25</height>
1428+ </size>
1429+ </property>
1430+ <property name="maximumSize">
1431+ <size>
1432+ <width>16777215</width>
1433+ <height>25</height>
1434+ </size>
1435+ </property>
1436+ <property name="frameShape">
1437+ <enum>QFrame::StyledPanel</enum>
1438+ </property>
1439+ <layout class="QHBoxLayout">
1440+ <property name="leftMargin">
1441+ <number>0</number>
1442+ </property>
1443+ <property name="topMargin">
1444+ <number>0</number>
1445+ </property>
1446+ <property name="rightMargin">
1447+ <number>4</number>
1448+ </property>
1449+ <property name="bottomMargin">
1450+ <number>0</number>
1451+ </property>
1452+ <item>
1453+ <spacer>
1454+ <property name="orientation">
1455+ <enum>Qt::Horizontal</enum>
1456+ </property>
1457+ <property name="sizeHint" stdset="0">
1458+ <size>
1459+ <width>40</width>
1460+ <height>20</height>
1461+ </size>
1462+ </property>
1463+ </spacer>
1464+ </item>
1465+ <item>
1466+ <widget class="QLabel" name="stelWindowTitle">
1467+ <property name="palette">
1468+ <palette>
1469+ <active/>
1470+ <inactive/>
1471+ <disabled/>
1472+ </palette>
1473+ </property>
1474+ <property name="font">
1475+ <font/>
1476+ </property>
1477+ <property name="text">
1478+ <string>Selected object information</string>
1479+ </property>
1480+ </widget>
1481+ </item>
1482+ <item>
1483+ <spacer>
1484+ <property name="orientation">
1485+ <enum>Qt::Horizontal</enum>
1486+ </property>
1487+ <property name="sizeHint" stdset="0">
1488+ <size>
1489+ <width>40</width>
1490+ <height>20</height>
1491+ </size>
1492+ </property>
1493+ </spacer>
1494+ </item>
1495+ <item>
1496+ <widget class="QPushButton" name="closeStelWindow">
1497+ <property name="minimumSize">
1498+ <size>
1499+ <width>16</width>
1500+ <height>16</height>
1501+ </size>
1502+ </property>
1503+ <property name="maximumSize">
1504+ <size>
1505+ <width>16</width>
1506+ <height>16</height>
1507+ </size>
1508+ </property>
1509+ <property name="focusPolicy">
1510+ <enum>Qt::NoFocus</enum>
1511+ </property>
1512+ <property name="text">
1513+ <string/>
1514+ </property>
1515+ </widget>
1516+ </item>
1517+ </layout>
1518+ </widget>
1519+ </item>
1520+ <item>
1521+ <widget class="QGroupBox" name="customInfoGroupBox">
1522+ <property name="title">
1523+ <string>Custom Info Settings</string>
1524+ </property>
1525+ <property name="alignment">
1526+ <set>Qt::AlignCenter</set>
1527+ </property>
1528+ <layout class="QVBoxLayout" name="verticalLayout_3">
1529+ <property name="margin">
1530+ <number>0</number>
1531+ </property>
1532+ <item>
1533+ <widget class="QCheckBox" name="nameCheckBox">
1534+ <property name="toolTip">
1535+ <string>Display info about an object's name</string>
1536+ </property>
1537+ <property name="text">
1538+ <string>An object's name</string>
1539+ </property>
1540+ </widget>
1541+ </item>
1542+ <item>
1543+ <widget class="QCheckBox" name="catalogNumberCheckBox">
1544+ <property name="toolTip">
1545+ <string>Display info about a catalog numbers</string>
1546+ </property>
1547+ <property name="text">
1548+ <string>Catalog numbers</string>
1549+ </property>
1550+ </widget>
1551+ </item>
1552+ <item>
1553+ <widget class="QCheckBox" name="magnitudeCheckBox">
1554+ <property name="toolTip">
1555+ <string>Display info about a visual magnitude</string>
1556+ </property>
1557+ <property name="text">
1558+ <string>Visual magnitude</string>
1559+ </property>
1560+ </widget>
1561+ </item>
1562+ <item>
1563+ <widget class="QCheckBox" name="absoluteMagnitudeCheckBox">
1564+ <property name="toolTip">
1565+ <string>Display info about an absolute magnitude</string>
1566+ </property>
1567+ <property name="text">
1568+ <string>Absolute magnitude</string>
1569+ </property>
1570+ </widget>
1571+ </item>
1572+ <item>
1573+ <widget class="QCheckBox" name="raDecJ2000CheckBox">
1574+ <property name="toolTip">
1575+ <string>Display the equatorial position (J2000 ref)</string>
1576+ </property>
1577+ <property name="text">
1578+ <string>The equatorial coordinates (J2000 ref)</string>
1579+ </property>
1580+ </widget>
1581+ </item>
1582+ <item>
1583+ <widget class="QCheckBox" name="raDecOfDateCheckBox">
1584+ <property name="toolTip">
1585+ <string>Display the equatorial position (of date)</string>
1586+ </property>
1587+ <property name="text">
1588+ <string>The equatorial coordinates (of date)</string>
1589+ </property>
1590+ </widget>
1591+ </item>
1592+ <item>
1593+ <widget class="QCheckBox" name="altAzCheckBox">
1594+ <property name="toolTip">
1595+ <string>Display the altitude and azimuth position</string>
1596+ </property>
1597+ <property name="text">
1598+ <string>The alt-azimuthal coordinates</string>
1599+ </property>
1600+ </widget>
1601+ </item>
1602+ <item>
1603+ <widget class="QCheckBox" name="hourAngleCheckBox">
1604+ <property name="toolTip">
1605+ <string>Display the hour angle + DE (of date)</string>
1606+ </property>
1607+ <property name="text">
1608+ <string>The hour angle</string>
1609+ </property>
1610+ </widget>
1611+ </item>
1612+ <item>
1613+ <widget class="QCheckBox" name="distanceCheckBox">
1614+ <property name="toolTip">
1615+ <string>Display info about an object's distance</string>
1616+ </property>
1617+ <property name="text">
1618+ <string>Object's distance</string>
1619+ </property>
1620+ </widget>
1621+ </item>
1622+ <item>
1623+ <widget class="QCheckBox" name="sizeCheckBox">
1624+ <property name="toolTip">
1625+ <string>Display info about an object's size</string>
1626+ </property>
1627+ <property name="text">
1628+ <string>Object's size</string>
1629+ </property>
1630+ </widget>
1631+ </item>
1632+ <item>
1633+ <widget class="QCheckBox" name="extra1CheckBox">
1634+ <property name="toolTip">
1635+ <string>Display a derived class-specific extra fields</string>
1636+ </property>
1637+ <property name="text">
1638+ <string>Additional info (Extra 1)</string>
1639+ </property>
1640+ </widget>
1641+ </item>
1642+ <item>
1643+ <widget class="QCheckBox" name="extra2CheckBox">
1644+ <property name="toolTip">
1645+ <string>Display a derived class-specific extra fields</string>
1646+ </property>
1647+ <property name="text">
1648+ <string>Additional info (Extra 2)</string>
1649+ </property>
1650+ </widget>
1651+ </item>
1652+ <item>
1653+ <widget class="QCheckBox" name="extra3CheckBox">
1654+ <property name="toolTip">
1655+ <string>Display a derived class-specific extra fields</string>
1656+ </property>
1657+ <property name="text">
1658+ <string>Additional info (Extra 3)</string>
1659+ </property>
1660+ </widget>
1661+ </item>
1662+ <item>
1663+ <spacer name="verticalSpacer">
1664+ <property name="orientation">
1665+ <enum>Qt::Vertical</enum>
1666+ </property>
1667+ <property name="sizeHint" stdset="0">
1668+ <size>
1669+ <width>20</width>
1670+ <height>40</height>
1671+ </size>
1672+ </property>
1673+ </spacer>
1674+ </item>
1675+ </layout>
1676+ </widget>
1677+ </item>
1678+ </layout>
1679+ </widget>
1680+ <customwidgets>
1681+ <customwidget>
1682+ <class>BarFrame</class>
1683+ <extends>QFrame</extends>
1684+ <header>Dialog.hpp</header>
1685+ <container>1</container>
1686+ </customwidget>
1687+ </customwidgets>
1688+ <resources/>
1689+ <connections/>
1690+</ui>
1691
1692=== modified file 'src/gui/SkyGui.cpp'
1693--- src/gui/SkyGui.cpp 2012-02-19 00:21:59 +0000
1694+++ src/gui/SkyGui.cpp 2012-04-13 18:05:24 +0000
1695@@ -18,9 +18,11 @@
1696 */
1697
1698 #include "SkyGui.hpp"
1699+#include "StelObjectMgr.hpp"
1700 #include "StelGuiItems.hpp"
1701 #include "StelApp.hpp"
1702 #include "StelGui.hpp"
1703+#include "StelCore.hpp"
1704 #include <QGraphicsView>
1705 #include <QDebug>
1706 #include <QTimeLine>
1707@@ -34,11 +36,21 @@
1708 Q_ASSERT(conf);
1709 QString objectInfo = conf->value("gui/selected_object_info", "all").toString();
1710 if (objectInfo == "all")
1711+ {
1712 infoTextFilters = StelObject::InfoStringGroup(StelObject::AllInfo);
1713+ }
1714 else if (objectInfo == "short")
1715+ {
1716 infoTextFilters = StelObject::InfoStringGroup(StelObject::ShortInfo);
1717+ }
1718 else if (objectInfo == "none")
1719+ {
1720 infoTextFilters = StelObject::InfoStringGroup(0);
1721+ }
1722+ else if (objectInfo == "custom")
1723+ {
1724+ infoTextFilters = StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString());
1725+ }
1726 else
1727 {
1728 qWarning() << "config.ini option gui/selected_object_info is invalid, using \"all\"";
1729
1730=== modified file 'src/gui/configurationDialog.ui'
1731--- src/gui/configurationDialog.ui 2012-02-11 18:53:11 +0000
1732+++ src/gui/configurationDialog.ui 2012-04-13 18:05:24 +0000
1733@@ -6,8 +6,8 @@
1734 <rect>
1735 <x>0</x>
1736 <y>0</y>
1737- <width>440</width>
1738- <height>460</height>
1739+ <width>428</width>
1740+ <height>467</height>
1741 </rect>
1742 </property>
1743 <property name="styleSheet">
1744@@ -212,34 +212,66 @@
1745 <number>0</number>
1746 </property>
1747 <item>
1748- <widget class="QRadioButton" name="allSelectedInfoRadio">
1749- <property name="toolTip">
1750- <string>Display all information available</string>
1751- </property>
1752- <property name="text">
1753- <string>All available</string>
1754- </property>
1755- </widget>
1756- </item>
1757- <item>
1758- <widget class="QRadioButton" name="briefSelectedInfoRadio">
1759- <property name="toolTip">
1760- <string>Display less information</string>
1761- </property>
1762- <property name="text">
1763- <string>Short</string>
1764- </property>
1765- </widget>
1766- </item>
1767- <item>
1768- <widget class="QRadioButton" name="noSelectedInfoRadio">
1769- <property name="toolTip">
1770- <string>Display no information</string>
1771- </property>
1772- <property name="text">
1773- <string>None</string>
1774- </property>
1775- </widget>
1776+ <layout class="QHBoxLayout" name="horizontalLayout_13">
1777+ <item>
1778+ <widget class="QRadioButton" name="allSelectedInfoRadio">
1779+ <property name="toolTip">
1780+ <string>Display all information available</string>
1781+ </property>
1782+ <property name="text">
1783+ <string>All available</string>
1784+ </property>
1785+ </widget>
1786+ </item>
1787+ <item>
1788+ <widget class="QRadioButton" name="briefSelectedInfoRadio">
1789+ <property name="toolTip">
1790+ <string>Display less information</string>
1791+ </property>
1792+ <property name="text">
1793+ <string>Short</string>
1794+ </property>
1795+ </widget>
1796+ </item>
1797+ </layout>
1798+ </item>
1799+ <item>
1800+ <layout class="QHBoxLayout" name="horizontalLayout_14">
1801+ <item>
1802+ <layout class="QHBoxLayout" name="horizontalLayout_16">
1803+ <item>
1804+ <widget class="QRadioButton" name="customSelectedInfoRadio">
1805+ <property name="toolTip">
1806+ <string>Display user settings information</string>
1807+ </property>
1808+ <property name="text">
1809+ <string>Customized</string>
1810+ </property>
1811+ </widget>
1812+ </item>
1813+ <item>
1814+ <widget class="QPushButton" name="pushButtonCustomInfoDialog">
1815+ <property name="enabled">
1816+ <bool>true</bool>
1817+ </property>
1818+ <property name="text">
1819+ <string notr="true">...</string>
1820+ </property>
1821+ </widget>
1822+ </item>
1823+ </layout>
1824+ </item>
1825+ <item>
1826+ <widget class="QRadioButton" name="noSelectedInfoRadio">
1827+ <property name="toolTip">
1828+ <string>Display no information</string>
1829+ </property>
1830+ <property name="text">
1831+ <string>None</string>
1832+ </property>
1833+ </widget>
1834+ </item>
1835+ </layout>
1836 </item>
1837 </layout>
1838 </widget>