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

Proposed by Alexander Wolf
Status: Merged
Merged at revision: 5320
Proposed branch: lp:~alexwolf/stellarium/info
Merge into: lp:stellarium
Diff against target: 1833 lines (+1135/-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 (+1/-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
treaves code Approve
Alexander Wolf Abstain
Bogdan Marinov Pending
Matthew Gates Pending
gzotti Pending
Review via email: mp+101950@code.launchpad.net

This proposal supersedes 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 : Posted in a previous version of this proposal

I'm made a refactoring of code

Revision history for this message
Alexander Wolf (alexwolf) wrote : Posted in a previous version of this proposal

Oops... sometimes code get segfaults :(

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

O.K. segfault has been fixed

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

drop unused include QSettings

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

Looks fine to me.

review: Approve (code)

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:15:25 +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:15:25 +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:15:25 +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:15:25 +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:15:25 +0000
663@@ -31,7 +31,6 @@
664 #include <QRegExp>
665 #include <QDebug>
666
667-
668 Vec3d StelObject::getEquinoxEquatorialPos(const StelCore* core) const
669 {
670 return core->j2000ToEquinoxEqu(getJ2000EquatorialPos(core));
671@@ -154,3 +153,4 @@
672 str.append(QString("</font>"));
673 }
674 }
675+
676
677=== modified file 'src/core/StelObjectMgr.cpp'
678--- src/core/StelObjectMgr.cpp 2012-01-11 10:50:37 +0000
679+++ src/core/StelObjectMgr.cpp 2012-04-13 18:15:25 +0000
680@@ -32,6 +32,7 @@
681 #include <QString>
682 #include <QDebug>
683 #include <QStringList>
684+#include <QSettings>
685
686 StelObjectMgr::StelObjectMgr() : searchRadiusPixel(30.f), distanceWeight(1.f)
687 {
688@@ -244,3 +245,156 @@
689 result.sort();
690 return result;
691 }
692+
693+int StelObjectMgr::getCustomInfoString(void)
694+{
695+ QSettings* conf = StelApp::getInstance().getSettings();
696+
697+ bool Name = conf->value("custom_selected_info/flag_show_name", false).toBool();
698+ bool CatalogNumber = conf->value("custom_selected_info/flag_show_catalognumber", false).toBool();
699+ bool Magnitude = conf->value("custom_selected_info/flag_show_magnitude", false).toBool();
700+ bool RaDecJ2000 = conf->value("custom_selected_info/flag_show_radecj2000", false).toBool();
701+ bool RaDecOfDate = conf->value("custom_selected_info/flag_show_radecofdate", false).toBool();
702+ bool AltAz = conf->value("custom_selected_info/flag_show_altaz", false).toBool();
703+ bool Distance = conf->value("custom_selected_info/flag_show_distance", false).toBool();
704+ bool Size = conf->value("custom_selected_info/flag_show_size", false).toBool();
705+ bool Extra1 = conf->value("custom_selected_info/flag_show_extra1", false).toBool();
706+ bool Extra2 = conf->value("custom_selected_info/flag_show_extra2", false).toBool();
707+ bool Extra3 = conf->value("custom_selected_info/flag_show_extra3", false).toBool();
708+ bool HourAngle = conf->value("custom_selected_info/flag_show_hourangle", false).toBool();
709+ bool AbsoluteMagnitude = conf->value("custom_selected_info/flag_show_absolutemagnitude", false).toBool();
710+
711+ int OctZero = 0x00000000;
712+
713+ int NameOct;
714+ if (Name)
715+ {
716+ NameOct = StelObject::Name;
717+ }
718+ else
719+ {
720+ NameOct = OctZero;
721+ }
722+
723+ int CatalogNumberOct;
724+ if (CatalogNumber)
725+ {
726+ CatalogNumberOct = StelObject::CatalogNumber;
727+ }
728+ else
729+ {
730+ CatalogNumberOct = OctZero;
731+ }
732+
733+ int MagnitudeOct;
734+ if (Magnitude)
735+ {
736+ MagnitudeOct = StelObject::Magnitude;
737+ }
738+ else
739+ {
740+ MagnitudeOct = OctZero;
741+ }
742+
743+ int RaDecJ2000Oct;
744+ if (RaDecJ2000)
745+ {
746+ RaDecJ2000Oct = StelObject::RaDecJ2000;
747+ }
748+ else
749+ {
750+ RaDecJ2000Oct = OctZero;
751+ }
752+
753+ int RaDecOfDateOct;
754+ if (RaDecOfDate)
755+ {
756+ RaDecOfDateOct = StelObject::RaDecOfDate;
757+ }
758+ else
759+ {
760+ RaDecOfDateOct = OctZero;
761+ }
762+
763+ int AltAzOct;
764+ if (AltAz)
765+ {
766+ AltAzOct = StelObject::AltAzi;
767+ }
768+ else
769+ {
770+ AltAzOct = OctZero;
771+ }
772+
773+ int DistanceOct;
774+ if (Distance)
775+ {
776+ DistanceOct = StelObject::Distance;
777+ }
778+ else
779+ {
780+ DistanceOct = OctZero;
781+ }
782+
783+ int SizeOct;
784+ if (Size)
785+ {
786+ SizeOct = StelObject::Size;
787+ }
788+ else
789+ {
790+ SizeOct = OctZero;
791+ }
792+
793+ int Extra1Oct;
794+ if (Extra1)
795+ {
796+ Extra1Oct = StelObject::Extra1;
797+ }
798+ else
799+ {
800+ Extra1Oct = OctZero;
801+ }
802+
803+ int Extra2Oct;
804+ if (Extra2)
805+ {
806+ Extra2Oct = StelObject::Extra2;
807+ }
808+ else
809+ {
810+ Extra2Oct = OctZero;
811+ }
812+
813+ int Extra3Oct;
814+ if (Extra3)
815+ {
816+ Extra3Oct = StelObject::Extra3;
817+ }
818+ else
819+ {
820+ Extra3Oct = OctZero;
821+ }
822+
823+ int HourAngleOct;
824+ if (HourAngle)
825+ {
826+ HourAngleOct = StelObject::HourAngle;
827+ }
828+ else
829+ {
830+ HourAngleOct = OctZero;
831+ }
832+
833+ int AbsoluteMagnitudeOct;
834+ if (AbsoluteMagnitude)
835+ {
836+ AbsoluteMagnitudeOct = StelObject::AbsoluteMagnitude;
837+ }
838+ else
839+ {
840+ AbsoluteMagnitudeOct = OctZero;
841+ }
842+
843+ return (NameOct|CatalogNumberOct|MagnitudeOct|RaDecJ2000Oct|RaDecOfDateOct|AltAzOct|DistanceOct|SizeOct|Extra1Oct|Extra2Oct|Extra3Oct|HourAngleOct|AbsoluteMagnitudeOct);
844+}
845
846=== modified file 'src/core/StelObjectMgr.hpp'
847--- src/core/StelObjectMgr.hpp 2012-01-11 10:50:37 +0000
848+++ src/core/StelObjectMgr.hpp 2012-04-13 18:15:25 +0000
849@@ -126,6 +126,8 @@
850 //! Default to 1.
851 void setDistanceWeight(float newDistanceWeight) {distanceWeight=newDistanceWeight;}
852
853+ int getCustomInfoString(void);
854+
855 signals:
856 //! Indicate that the selected StelObjects has changed.
857 //! @param action define if the user requested that the objects are added to the selection or just replace it
858
859=== modified file 'src/core/StelUtils.hpp'
860--- src/core/StelUtils.hpp 2012-01-11 10:50:37 +0000
861+++ src/core/StelUtils.hpp 2012-04-13 18:15:25 +0000
862@@ -143,10 +143,10 @@
863 //! @param v the input 3D vector
864 void rectToSphe(float *lng, float *lat, const Vec3f& v);
865
866- // GZ: some additions. I need those just for quick conversions for text display.
867- //! Coordinate Transformation from equatorial to ecliptical
868- void ctRadec2Ecl(const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad);
869- // GZ: done
870+ // GZ: some additions. I need those just for quick conversions for text display.
871+ //! Coordinate Transformation from equatorial to ecliptical
872+ void ctRadec2Ecl(const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad);
873+ // GZ: done
874
875 //! Convert a string longitude, latitude, RA or Declination angle
876 //! to radians.
877
878=== modified file 'src/gui/ConfigurationDialog.cpp'
879--- src/gui/ConfigurationDialog.cpp 2012-04-06 09:11:50 +0000
880+++ src/gui/ConfigurationDialog.cpp 2012-04-13 18:15:25 +0000
881@@ -20,6 +20,7 @@
882
883 #include "Dialog.hpp"
884 #include "ConfigurationDialog.hpp"
885+#include "CustomInfoDialog.hpp"
886 #include "StelMainGraphicsView.hpp"
887 #include "StelMainWindow.hpp"
888 #include "ui_configurationDialog.h"
889@@ -29,6 +30,7 @@
890 #include "StelCore.hpp"
891 #include "StelLocaleMgr.hpp"
892 #include "StelProjector.hpp"
893+#include "StelObjectMgr.hpp"
894
895 #include "StelCore.hpp"
896 #include "StelMovementMgr.hpp"
897@@ -62,14 +64,18 @@
898 ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NULL), gui(agui)
899 {
900 ui = new Ui_configurationDialogForm;
901+ customInfoDialog = NULL;
902 hasDownloadedStarCatalog = false;
903 isDownloadingStarCatalog = false;
904- savedProjectionType = StelApp::getInstance().getCore()->getCurrentProjectionType();
905+ savedProjectionType = StelApp::getInstance().getCore()->getCurrentProjectionType();
906 }
907
908 ConfigurationDialog::~ConfigurationDialog()
909 {
910 delete ui;
911+ ui=NULL;
912+ delete customInfoDialog;
913+ customInfoDialog = NULL;
914 }
915
916 void ConfigurationDialog::retranslate()
917@@ -145,14 +151,32 @@
918
919 // Selected object info
920 if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0)
921+ {
922 ui->noSelectedInfoRadio->setChecked(true);
923+ ui->pushButtonCustomInfoDialog->setEnabled(false);
924+ }
925 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))
926- ui->briefSelectedInfoRadio->setChecked(true);
927- else
928+ {
929+ ui->briefSelectedInfoRadio->setChecked(true);
930+ ui->pushButtonCustomInfoDialog->setEnabled(false);
931+ }
932+ else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::AllInfo))
933+ {
934 ui->allSelectedInfoRadio->setChecked(true);
935+ ui->pushButtonCustomInfoDialog->setEnabled(false);
936+ }
937+ else
938+ {
939+ ui->customSelectedInfoRadio->setChecked(true);
940+ ui->pushButtonCustomInfoDialog->setEnabled(true);
941+ }
942+
943 connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo()));
944 connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo()));
945 connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo()));
946+ connect(ui->customSelectedInfoRadio, SIGNAL(released()), this, SLOT(setCustomSelectedInfo()));
947+
948+ connect(ui->pushButtonCustomInfoDialog, SIGNAL(clicked()), this, SLOT(showCustomInfoDialog()));
949
950 // Navigation tab
951 // Startup time
952@@ -288,17 +312,27 @@
953 void ConfigurationDialog::setNoSelectedInfo(void)
954 {
955 gui->setInfoTextFilters(StelObject::InfoStringGroup(0));
956+ ui->pushButtonCustomInfoDialog->setEnabled(false);
957 }
958
959 void ConfigurationDialog::setAllSelectedInfo(void)
960 {
961 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::AllInfo));
962+ ui->pushButtonCustomInfoDialog->setEnabled(false);
963 }
964
965 void ConfigurationDialog::setBriefSelectedInfo(void)
966 {
967 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::ShortInfo));
968-}
969+ ui->pushButtonCustomInfoDialog->setEnabled(false);
970+}
971+
972+void ConfigurationDialog::setCustomSelectedInfo(void)
973+{
974+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
975+ ui->pushButtonCustomInfoDialog->setEnabled(true);
976+}
977+
978
979 void ConfigurationDialog::cursorTimeOutChanged()
980 {
981@@ -429,8 +463,10 @@
982 conf->setValue("gui/selected_object_info", "none");
983 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))
984 conf->setValue("gui/selected_object_info", "short");
985- else
986+ else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::AllInfo))
987 conf->setValue("gui/selected_object_info", "all");
988+ else
989+ conf->setValue("gui/selected_object_info", "custom");
990
991 // toolbar auto-hide status
992 conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideHorizontalButtonBar());
993@@ -893,3 +929,11 @@
994
995 resetStarCatalogControls();
996 }
997+
998+void ConfigurationDialog::showCustomInfoDialog()
999+{
1000+ if(customInfoDialog == NULL)
1001+ customInfoDialog = new CustomInfoDialog();
1002+
1003+ customInfoDialog->setVisible(true);
1004+}
1005
1006=== modified file 'src/gui/ConfigurationDialog.hpp'
1007--- src/gui/ConfigurationDialog.hpp 2012-02-13 18:59:16 +0000
1008+++ src/gui/ConfigurationDialog.hpp 2012-04-13 18:15:25 +0000
1009@@ -32,6 +32,7 @@
1010 class QNetworkAccessManager;
1011 class QListWidgetItem;
1012 class StelGui;
1013+class CustomInfoDialog;
1014
1015 class ConfigurationDialog : public StelDialog
1016 {
1017@@ -76,6 +77,7 @@
1018 void setNoSelectedInfo(void);
1019 void setAllSelectedInfo(void);
1020 void setBriefSelectedInfo(void);
1021+ void setCustomSelectedInfo(void);
1022 void selectLanguage(const QString& languageCode);
1023 void setStartupTimeMode();
1024 void setDiskViewport(bool);
1025@@ -131,10 +133,14 @@
1026
1027 void changePage(QListWidgetItem *current, QListWidgetItem *previous);
1028
1029+ void showCustomInfoDialog();
1030+
1031 private:
1032 StelGui* gui;
1033
1034 int savedProjectionType;
1035+
1036+ CustomInfoDialog* customInfoDialog;
1037 };
1038
1039 #endif // _CONFIGURATIONDIALOG_HPP_
1040
1041=== added file 'src/gui/CustomInfoDialog.cpp'
1042--- src/gui/CustomInfoDialog.cpp 1970-01-01 00:00:00 +0000
1043+++ src/gui/CustomInfoDialog.cpp 2012-04-13 18:15:25 +0000
1044@@ -0,0 +1,249 @@
1045+/*
1046+ * This program is distributed in the hope that it will be useful,
1047+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1048+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1049+ * GNU General Public License for more details.
1050+ * You should have received a copy of the GNU General Public License
1051+ * along with this program; if not, write to the Free Software
1052+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
1053+*/
1054+
1055+#include "CustomInfoDialog.hpp"
1056+#include "ui_CustomInfoDialog.h"
1057+
1058+#include "Dialog.hpp"
1059+#include "StelApp.hpp"
1060+#include "StelObjectMgr.hpp"
1061+
1062+#include <QDebug>
1063+
1064+CustomInfoDialog::CustomInfoDialog()
1065+{
1066+ ui = new Ui_CustomInfoDialogForm;
1067+ conf = StelApp::getInstance().getSettings();
1068+ gui = StelApp::getInstance().getGui();
1069+}
1070+
1071+CustomInfoDialog::~CustomInfoDialog()
1072+{
1073+ delete ui;
1074+ ui=NULL;
1075+}
1076+
1077+void CustomInfoDialog::retranslate()
1078+{
1079+ if (dialog)
1080+ ui->retranslateUi(dialog);
1081+}
1082+
1083+
1084+void CustomInfoDialog::createDialogContent()
1085+{
1086+ ui->setupUi(dialog);
1087+
1088+ //Signals and slots
1089+ connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
1090+ connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
1091+
1092+ //An object's name
1093+ ui->nameCheckBox->setChecked(getNameCustomInfoFlag());
1094+ connect(ui->nameCheckBox, SIGNAL(toggled(bool)), this, SLOT(setNameCustomInfoFlag(bool)));
1095+
1096+ //Catalog numbers
1097+ ui->catalogNumberCheckBox->setChecked(getCatalogNumberCustomInfoFlag());
1098+ connect(ui->catalogNumberCheckBox, SIGNAL(toggled(bool)), this, SLOT(setCatalogNumberCustomInfoFlag(bool)));
1099+
1100+ //Magnitude related data
1101+ ui->magnitudeCheckBox->setChecked(getMagnitudeCustomInfoFlag());
1102+ connect(ui->magnitudeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setMagnitudeCustomInfoFlag(bool)));
1103+
1104+ //The equatorial position (J2000 ref)
1105+ ui->raDecJ2000CheckBox->setChecked(getRaDecJ2000CustomInfoFlag());
1106+ connect(ui->raDecJ2000CheckBox, SIGNAL(toggled(bool)), this, SLOT(setRaDecJ2000CustomInfoFlag(bool)));
1107+
1108+ //The equatorial position (of date)
1109+ ui->raDecOfDateCheckBox->setChecked(getRaDecOfDateCustomInfoFlag());
1110+ connect(ui->raDecOfDateCheckBox, SIGNAL(toggled(bool)), this, SLOT(setRaDecOfDateCustomInfoFlag(bool)));
1111+
1112+ //The position (Altitude/Azimuth)
1113+ ui->altAzCheckBox->setChecked(getAltAzCustomInfoFlag());
1114+ connect(ui->altAzCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAltAzCustomInfoFlag(bool)));
1115+
1116+ //Info about an object's distance
1117+ ui->distanceCheckBox->setChecked(getDistanceCustomInfoFlag());
1118+ connect(ui->distanceCheckBox, SIGNAL(toggled(bool)), this, SLOT(setDistanceCustomInfoFlag(bool)));
1119+
1120+ //Info about an object's size
1121+ ui->sizeCheckBox->setChecked(getSizeCustomInfoFlag());
1122+ connect(ui->sizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setSizeCustomInfoFlag(bool)));
1123+
1124+ //Derived class-specific extra fields
1125+ ui->extra1CheckBox->setChecked(getExtra1CustomInfoFlag());
1126+ connect(ui->extra1CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra1CustomInfoFlag(bool)));
1127+
1128+ //Derived class-specific extra fields
1129+ ui->extra2CheckBox->setChecked(getExtra2CustomInfoFlag());
1130+ connect(ui->extra2CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra2CustomInfoFlag(bool)));
1131+
1132+ //Derived class-specific extra fields
1133+ ui->extra3CheckBox->setChecked(getExtra3CustomInfoFlag());
1134+ connect(ui->extra3CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra3CustomInfoFlag(bool)));
1135+
1136+ //The hour angle + DE (of date)
1137+ ui->hourAngleCheckBox->setChecked(getHourAngleCustomInfoFlag());
1138+ connect(ui->hourAngleCheckBox, SIGNAL(toggled(bool)), this, SLOT(setHourAngleCustomInfoFlag(bool)));
1139+
1140+ //The absolute magnitude
1141+ ui->absoluteMagnitudeCheckBox->setChecked(getAbsoluteMagnitudeCustomInfoFlag());
1142+ connect(ui->absoluteMagnitudeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAbsoluteMagnitudeCustomInfoFlag(bool)));
1143+
1144+}
1145+
1146+void CustomInfoDialog::setVisible(bool v)
1147+{
1148+ StelDialog::setVisible(v);
1149+}
1150+
1151+bool CustomInfoDialog::getNameCustomInfoFlag()
1152+{
1153+ return conf->value("custom_selected_info/flag_show_name", false).toBool();
1154+}
1155+
1156+void CustomInfoDialog::setNameCustomInfoFlag(bool flag)
1157+{
1158+ conf->setValue("custom_selected_info/flag_show_name", flag);
1159+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1160+}
1161+
1162+bool CustomInfoDialog::getCatalogNumberCustomInfoFlag()
1163+{
1164+ return conf->value("custom_selected_info/flag_show_catalognumber", false).toBool();
1165+}
1166+
1167+void CustomInfoDialog::setCatalogNumberCustomInfoFlag(bool flag)
1168+{
1169+ conf->setValue("custom_selected_info/flag_show_catalognumber", flag);
1170+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1171+}
1172+
1173+bool CustomInfoDialog::getMagnitudeCustomInfoFlag()
1174+{
1175+ return conf->value("custom_selected_info/flag_show_magnitude", false).toBool();
1176+}
1177+
1178+void CustomInfoDialog::setMagnitudeCustomInfoFlag(bool flag)
1179+{
1180+ conf->setValue("custom_selected_info/flag_show_magnitude", flag);
1181+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1182+}
1183+
1184+bool CustomInfoDialog::getRaDecJ2000CustomInfoFlag()
1185+{
1186+ return conf->value("custom_selected_info/flag_show_radecj2000", false).toBool();
1187+}
1188+
1189+void CustomInfoDialog::setRaDecJ2000CustomInfoFlag(bool flag)
1190+{
1191+ conf->setValue("custom_selected_info/flag_show_radecj2000", flag);
1192+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1193+}
1194+
1195+bool CustomInfoDialog::getRaDecOfDateCustomInfoFlag()
1196+{
1197+ return conf->value("custom_selected_info/flag_show_radecofdate", false).toBool();
1198+}
1199+
1200+void CustomInfoDialog::setRaDecOfDateCustomInfoFlag(bool flag)
1201+{
1202+ conf->setValue("custom_selected_info/flag_show_radecofdate", flag);
1203+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1204+}
1205+
1206+bool CustomInfoDialog::getAltAzCustomInfoFlag()
1207+{
1208+ return conf->value("custom_selected_info/flag_show_altaz", false).toBool();
1209+}
1210+
1211+void CustomInfoDialog::setAltAzCustomInfoFlag(bool flag)
1212+{
1213+ conf->setValue("custom_selected_info/flag_show_altaz", flag);
1214+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1215+}
1216+
1217+bool CustomInfoDialog::getDistanceCustomInfoFlag()
1218+{
1219+ return conf->value("custom_selected_info/flag_show_distance", false).toBool();
1220+}
1221+
1222+void CustomInfoDialog::setDistanceCustomInfoFlag(bool flag)
1223+{
1224+ conf->setValue("custom_selected_info/flag_show_distance", flag);
1225+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1226+}
1227+
1228+bool CustomInfoDialog::getSizeCustomInfoFlag()
1229+{
1230+ return conf->value("custom_selected_info/flag_show_size", false).toBool();
1231+}
1232+
1233+void CustomInfoDialog::setSizeCustomInfoFlag(bool flag)
1234+{
1235+ conf->setValue("custom_selected_info/flag_show_size", flag);
1236+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1237+}
1238+
1239+bool CustomInfoDialog::getExtra1CustomInfoFlag()
1240+{
1241+ return conf->value("custom_selected_info/flag_show_extra1", false).toBool();
1242+}
1243+
1244+void CustomInfoDialog::setExtra1CustomInfoFlag(bool flag)
1245+{
1246+ conf->setValue("custom_selected_info/flag_show_extra1", flag);
1247+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1248+}
1249+
1250+bool CustomInfoDialog::getExtra2CustomInfoFlag()
1251+{
1252+ return conf->value("custom_selected_info/flag_show_extra2", false).toBool();
1253+}
1254+
1255+void CustomInfoDialog::setExtra2CustomInfoFlag(bool flag)
1256+{
1257+ conf->setValue("custom_selected_info/flag_show_extra2", flag);
1258+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1259+}
1260+
1261+bool CustomInfoDialog::getExtra3CustomInfoFlag()
1262+{
1263+ return conf->value("custom_selected_info/flag_show_extra3", false).toBool();
1264+}
1265+
1266+void CustomInfoDialog::setExtra3CustomInfoFlag(bool flag)
1267+{
1268+ conf->setValue("custom_selected_info/flag_show_extra3", flag);
1269+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1270+}
1271+
1272+bool CustomInfoDialog::getHourAngleCustomInfoFlag()
1273+{
1274+ return conf->value("custom_selected_info/flag_show_hourangle", false).toBool();
1275+}
1276+
1277+void CustomInfoDialog::setHourAngleCustomInfoFlag(bool flag)
1278+{
1279+ conf->setValue("custom_selected_info/flag_show_hourangle", flag);
1280+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1281+}
1282+
1283+bool CustomInfoDialog::getAbsoluteMagnitudeCustomInfoFlag()
1284+{
1285+ return conf->value("custom_selected_info/flag_show_absolutemagnitude", false).toBool();
1286+}
1287+
1288+void CustomInfoDialog::setAbsoluteMagnitudeCustomInfoFlag(bool flag)
1289+{
1290+ conf->setValue("custom_selected_info/flag_show_absolutemagnitude", flag);
1291+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1292+}
1293+
1294
1295=== added file 'src/gui/CustomInfoDialog.hpp'
1296--- src/gui/CustomInfoDialog.hpp 1970-01-01 00:00:00 +0000
1297+++ src/gui/CustomInfoDialog.hpp 2012-04-13 18:15:25 +0000
1298@@ -0,0 +1,96 @@
1299+/*
1300+ * Stellarium
1301+ *
1302+ * Copyright (C) 2012 Alexander Wolf
1303+ *
1304+ * This program is free software; you can redistribute it and/or
1305+ * modify it under the terms of the GNU General Public License
1306+ * as published by the Free Software Foundation; either version 2
1307+ * of the License, or (at your option) any later version.
1308+ *
1309+ * This program is distributed in the hope that it will be useful,
1310+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1311+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1312+ * GNU General Public License for more details.
1313+ * You should have received a copy of the GNU General Public License
1314+ * along with this program; if not, write to the Free Software
1315+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
1316+*/
1317+
1318+// AW: Methods copied largely from AddRemoveLandscapesDialog
1319+
1320+#ifndef _CUSTOMINFODIALOG_HPP_
1321+#define _CUSTOMINFODIALOG_HPP_
1322+
1323+#include <QObject>
1324+#include <QSettings>
1325+#include "StelDialog.hpp"
1326+#include "StelGui.hpp"
1327+
1328+class Ui_CustomInfoDialogForm;
1329+
1330+//! @class CustomInfoDialog
1331+class CustomInfoDialog : public StelDialog
1332+{
1333+ Q_OBJECT
1334+
1335+public:
1336+ CustomInfoDialog();
1337+ virtual ~CustomInfoDialog();
1338+
1339+public slots:
1340+ void retranslate();
1341+ void setVisible(bool);
1342+
1343+protected:
1344+ //! Initialize the dialog widgets and connect the signals/slots.
1345+ virtual void createDialogContent();
1346+ Ui_CustomInfoDialogForm *ui;
1347+
1348+private slots:
1349+ bool getNameCustomInfoFlag();
1350+ void setNameCustomInfoFlag(bool flag);
1351+
1352+ bool getCatalogNumberCustomInfoFlag();
1353+ void setCatalogNumberCustomInfoFlag(bool flag);
1354+
1355+ bool getMagnitudeCustomInfoFlag();
1356+ void setMagnitudeCustomInfoFlag(bool flag);
1357+
1358+ bool getRaDecJ2000CustomInfoFlag();
1359+ void setRaDecJ2000CustomInfoFlag(bool flag);
1360+
1361+ bool getRaDecOfDateCustomInfoFlag();
1362+ void setRaDecOfDateCustomInfoFlag(bool flag);
1363+
1364+ bool getAltAzCustomInfoFlag();
1365+ void setAltAzCustomInfoFlag(bool flag);
1366+
1367+ bool getDistanceCustomInfoFlag();
1368+ void setDistanceCustomInfoFlag(bool flag);
1369+
1370+ bool getSizeCustomInfoFlag();
1371+ void setSizeCustomInfoFlag(bool flag);
1372+
1373+ bool getExtra1CustomInfoFlag();
1374+ void setExtra1CustomInfoFlag(bool flag);
1375+
1376+ bool getExtra2CustomInfoFlag();
1377+ void setExtra2CustomInfoFlag(bool flag);
1378+
1379+ bool getExtra3CustomInfoFlag();
1380+ void setExtra3CustomInfoFlag(bool flag);
1381+
1382+ bool getHourAngleCustomInfoFlag();
1383+ void setHourAngleCustomInfoFlag(bool flag);
1384+
1385+ bool getAbsoluteMagnitudeCustomInfoFlag();
1386+ void setAbsoluteMagnitudeCustomInfoFlag(bool flag);
1387+
1388+private:
1389+ StelGuiBase* gui;
1390+ QSettings* conf;
1391+
1392+};
1393+
1394+#endif // _CUSTOMINFODIALOG_HPP_
1395
1396=== added file 'src/gui/CustomInfoDialog.ui'
1397--- src/gui/CustomInfoDialog.ui 1970-01-01 00:00:00 +0000
1398+++ src/gui/CustomInfoDialog.ui 2012-04-13 18:15:25 +0000
1399@@ -0,0 +1,286 @@
1400+<?xml version="1.0" encoding="UTF-8"?>
1401+<ui version="4.0">
1402+ <class>CustomInfoDialogForm</class>
1403+ <widget class="QWidget" name="CustomInfoDialogForm">
1404+ <property name="sizePolicy">
1405+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
1406+ <horstretch>0</horstretch>
1407+ <verstretch>0</verstretch>
1408+ </sizepolicy>
1409+ </property>
1410+ <layout class="QVBoxLayout" name="verticalLayout">
1411+ <property name="spacing">
1412+ <number>0</number>
1413+ </property>
1414+ <property name="margin">
1415+ <number>0</number>
1416+ </property>
1417+ <item>
1418+ <widget class="BarFrame" name="TitleBar">
1419+ <property name="minimumSize">
1420+ <size>
1421+ <width>16</width>
1422+ <height>25</height>
1423+ </size>
1424+ </property>
1425+ <property name="maximumSize">
1426+ <size>
1427+ <width>16777215</width>
1428+ <height>25</height>
1429+ </size>
1430+ </property>
1431+ <property name="frameShape">
1432+ <enum>QFrame::StyledPanel</enum>
1433+ </property>
1434+ <layout class="QHBoxLayout">
1435+ <property name="leftMargin">
1436+ <number>0</number>
1437+ </property>
1438+ <property name="topMargin">
1439+ <number>0</number>
1440+ </property>
1441+ <property name="rightMargin">
1442+ <number>4</number>
1443+ </property>
1444+ <property name="bottomMargin">
1445+ <number>0</number>
1446+ </property>
1447+ <item>
1448+ <spacer>
1449+ <property name="orientation">
1450+ <enum>Qt::Horizontal</enum>
1451+ </property>
1452+ <property name="sizeHint" stdset="0">
1453+ <size>
1454+ <width>40</width>
1455+ <height>20</height>
1456+ </size>
1457+ </property>
1458+ </spacer>
1459+ </item>
1460+ <item>
1461+ <widget class="QLabel" name="stelWindowTitle">
1462+ <property name="palette">
1463+ <palette>
1464+ <active/>
1465+ <inactive/>
1466+ <disabled/>
1467+ </palette>
1468+ </property>
1469+ <property name="font">
1470+ <font/>
1471+ </property>
1472+ <property name="text">
1473+ <string>Selected object information</string>
1474+ </property>
1475+ </widget>
1476+ </item>
1477+ <item>
1478+ <spacer>
1479+ <property name="orientation">
1480+ <enum>Qt::Horizontal</enum>
1481+ </property>
1482+ <property name="sizeHint" stdset="0">
1483+ <size>
1484+ <width>40</width>
1485+ <height>20</height>
1486+ </size>
1487+ </property>
1488+ </spacer>
1489+ </item>
1490+ <item>
1491+ <widget class="QPushButton" name="closeStelWindow">
1492+ <property name="minimumSize">
1493+ <size>
1494+ <width>16</width>
1495+ <height>16</height>
1496+ </size>
1497+ </property>
1498+ <property name="maximumSize">
1499+ <size>
1500+ <width>16</width>
1501+ <height>16</height>
1502+ </size>
1503+ </property>
1504+ <property name="focusPolicy">
1505+ <enum>Qt::NoFocus</enum>
1506+ </property>
1507+ <property name="text">
1508+ <string/>
1509+ </property>
1510+ </widget>
1511+ </item>
1512+ </layout>
1513+ </widget>
1514+ </item>
1515+ <item>
1516+ <widget class="QGroupBox" name="customInfoGroupBox">
1517+ <property name="title">
1518+ <string>Custom Info Settings</string>
1519+ </property>
1520+ <property name="alignment">
1521+ <set>Qt::AlignCenter</set>
1522+ </property>
1523+ <layout class="QVBoxLayout" name="verticalLayout_3">
1524+ <property name="margin">
1525+ <number>0</number>
1526+ </property>
1527+ <item>
1528+ <widget class="QCheckBox" name="nameCheckBox">
1529+ <property name="toolTip">
1530+ <string>Display info about an object's name</string>
1531+ </property>
1532+ <property name="text">
1533+ <string>An object's name</string>
1534+ </property>
1535+ </widget>
1536+ </item>
1537+ <item>
1538+ <widget class="QCheckBox" name="catalogNumberCheckBox">
1539+ <property name="toolTip">
1540+ <string>Display info about a catalog numbers</string>
1541+ </property>
1542+ <property name="text">
1543+ <string>Catalog numbers</string>
1544+ </property>
1545+ </widget>
1546+ </item>
1547+ <item>
1548+ <widget class="QCheckBox" name="magnitudeCheckBox">
1549+ <property name="toolTip">
1550+ <string>Display info about a visual magnitude</string>
1551+ </property>
1552+ <property name="text">
1553+ <string>Visual magnitude</string>
1554+ </property>
1555+ </widget>
1556+ </item>
1557+ <item>
1558+ <widget class="QCheckBox" name="absoluteMagnitudeCheckBox">
1559+ <property name="toolTip">
1560+ <string>Display info about an absolute magnitude</string>
1561+ </property>
1562+ <property name="text">
1563+ <string>Absolute magnitude</string>
1564+ </property>
1565+ </widget>
1566+ </item>
1567+ <item>
1568+ <widget class="QCheckBox" name="raDecJ2000CheckBox">
1569+ <property name="toolTip">
1570+ <string>Display the equatorial position (J2000 ref)</string>
1571+ </property>
1572+ <property name="text">
1573+ <string>The equatorial coordinates (J2000 ref)</string>
1574+ </property>
1575+ </widget>
1576+ </item>
1577+ <item>
1578+ <widget class="QCheckBox" name="raDecOfDateCheckBox">
1579+ <property name="toolTip">
1580+ <string>Display the equatorial position (of date)</string>
1581+ </property>
1582+ <property name="text">
1583+ <string>The equatorial coordinates (of date)</string>
1584+ </property>
1585+ </widget>
1586+ </item>
1587+ <item>
1588+ <widget class="QCheckBox" name="altAzCheckBox">
1589+ <property name="toolTip">
1590+ <string>Display the altitude and azimuth position</string>
1591+ </property>
1592+ <property name="text">
1593+ <string>The alt-azimuthal coordinates</string>
1594+ </property>
1595+ </widget>
1596+ </item>
1597+ <item>
1598+ <widget class="QCheckBox" name="hourAngleCheckBox">
1599+ <property name="toolTip">
1600+ <string>Display the hour angle + DE (of date)</string>
1601+ </property>
1602+ <property name="text">
1603+ <string>The hour angle</string>
1604+ </property>
1605+ </widget>
1606+ </item>
1607+ <item>
1608+ <widget class="QCheckBox" name="distanceCheckBox">
1609+ <property name="toolTip">
1610+ <string>Display info about an object's distance</string>
1611+ </property>
1612+ <property name="text">
1613+ <string>Object's distance</string>
1614+ </property>
1615+ </widget>
1616+ </item>
1617+ <item>
1618+ <widget class="QCheckBox" name="sizeCheckBox">
1619+ <property name="toolTip">
1620+ <string>Display info about an object's size</string>
1621+ </property>
1622+ <property name="text">
1623+ <string>Object's size</string>
1624+ </property>
1625+ </widget>
1626+ </item>
1627+ <item>
1628+ <widget class="QCheckBox" name="extra1CheckBox">
1629+ <property name="toolTip">
1630+ <string>Display a derived class-specific extra fields</string>
1631+ </property>
1632+ <property name="text">
1633+ <string>Additional info (Extra 1)</string>
1634+ </property>
1635+ </widget>
1636+ </item>
1637+ <item>
1638+ <widget class="QCheckBox" name="extra2CheckBox">
1639+ <property name="toolTip">
1640+ <string>Display a derived class-specific extra fields</string>
1641+ </property>
1642+ <property name="text">
1643+ <string>Additional info (Extra 2)</string>
1644+ </property>
1645+ </widget>
1646+ </item>
1647+ <item>
1648+ <widget class="QCheckBox" name="extra3CheckBox">
1649+ <property name="toolTip">
1650+ <string>Display a derived class-specific extra fields</string>
1651+ </property>
1652+ <property name="text">
1653+ <string>Additional info (Extra 3)</string>
1654+ </property>
1655+ </widget>
1656+ </item>
1657+ <item>
1658+ <spacer name="verticalSpacer">
1659+ <property name="orientation">
1660+ <enum>Qt::Vertical</enum>
1661+ </property>
1662+ <property name="sizeHint" stdset="0">
1663+ <size>
1664+ <width>20</width>
1665+ <height>40</height>
1666+ </size>
1667+ </property>
1668+ </spacer>
1669+ </item>
1670+ </layout>
1671+ </widget>
1672+ </item>
1673+ </layout>
1674+ </widget>
1675+ <customwidgets>
1676+ <customwidget>
1677+ <class>BarFrame</class>
1678+ <extends>QFrame</extends>
1679+ <header>Dialog.hpp</header>
1680+ <container>1</container>
1681+ </customwidget>
1682+ </customwidgets>
1683+ <resources/>
1684+ <connections/>
1685+</ui>
1686
1687=== modified file 'src/gui/SkyGui.cpp'
1688--- src/gui/SkyGui.cpp 2012-02-19 00:21:59 +0000
1689+++ src/gui/SkyGui.cpp 2012-04-13 18:15:25 +0000
1690@@ -18,9 +18,11 @@
1691 */
1692
1693 #include "SkyGui.hpp"
1694+#include "StelObjectMgr.hpp"
1695 #include "StelGuiItems.hpp"
1696 #include "StelApp.hpp"
1697 #include "StelGui.hpp"
1698+#include "StelCore.hpp"
1699 #include <QGraphicsView>
1700 #include <QDebug>
1701 #include <QTimeLine>
1702@@ -34,11 +36,21 @@
1703 Q_ASSERT(conf);
1704 QString objectInfo = conf->value("gui/selected_object_info", "all").toString();
1705 if (objectInfo == "all")
1706+ {
1707 infoTextFilters = StelObject::InfoStringGroup(StelObject::AllInfo);
1708+ }
1709 else if (objectInfo == "short")
1710+ {
1711 infoTextFilters = StelObject::InfoStringGroup(StelObject::ShortInfo);
1712+ }
1713 else if (objectInfo == "none")
1714+ {
1715 infoTextFilters = StelObject::InfoStringGroup(0);
1716+ }
1717+ else if (objectInfo == "custom")
1718+ {
1719+ infoTextFilters = StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString());
1720+ }
1721 else
1722 {
1723 qWarning() << "config.ini option gui/selected_object_info is invalid, using \"all\"";
1724
1725=== modified file 'src/gui/configurationDialog.ui'
1726--- src/gui/configurationDialog.ui 2012-02-11 18:53:11 +0000
1727+++ src/gui/configurationDialog.ui 2012-04-13 18:15:25 +0000
1728@@ -6,8 +6,8 @@
1729 <rect>
1730 <x>0</x>
1731 <y>0</y>
1732- <width>440</width>
1733- <height>460</height>
1734+ <width>428</width>
1735+ <height>467</height>
1736 </rect>
1737 </property>
1738 <property name="styleSheet">
1739@@ -212,34 +212,66 @@
1740 <number>0</number>
1741 </property>
1742 <item>
1743- <widget class="QRadioButton" name="allSelectedInfoRadio">
1744- <property name="toolTip">
1745- <string>Display all information available</string>
1746- </property>
1747- <property name="text">
1748- <string>All available</string>
1749- </property>
1750- </widget>
1751- </item>
1752- <item>
1753- <widget class="QRadioButton" name="briefSelectedInfoRadio">
1754- <property name="toolTip">
1755- <string>Display less information</string>
1756- </property>
1757- <property name="text">
1758- <string>Short</string>
1759- </property>
1760- </widget>
1761- </item>
1762- <item>
1763- <widget class="QRadioButton" name="noSelectedInfoRadio">
1764- <property name="toolTip">
1765- <string>Display no information</string>
1766- </property>
1767- <property name="text">
1768- <string>None</string>
1769- </property>
1770- </widget>
1771+ <layout class="QHBoxLayout" name="horizontalLayout_13">
1772+ <item>
1773+ <widget class="QRadioButton" name="allSelectedInfoRadio">
1774+ <property name="toolTip">
1775+ <string>Display all information available</string>
1776+ </property>
1777+ <property name="text">
1778+ <string>All available</string>
1779+ </property>
1780+ </widget>
1781+ </item>
1782+ <item>
1783+ <widget class="QRadioButton" name="briefSelectedInfoRadio">
1784+ <property name="toolTip">
1785+ <string>Display less information</string>
1786+ </property>
1787+ <property name="text">
1788+ <string>Short</string>
1789+ </property>
1790+ </widget>
1791+ </item>
1792+ </layout>
1793+ </item>
1794+ <item>
1795+ <layout class="QHBoxLayout" name="horizontalLayout_14">
1796+ <item>
1797+ <layout class="QHBoxLayout" name="horizontalLayout_16">
1798+ <item>
1799+ <widget class="QRadioButton" name="customSelectedInfoRadio">
1800+ <property name="toolTip">
1801+ <string>Display user settings information</string>
1802+ </property>
1803+ <property name="text">
1804+ <string>Customized</string>
1805+ </property>
1806+ </widget>
1807+ </item>
1808+ <item>
1809+ <widget class="QPushButton" name="pushButtonCustomInfoDialog">
1810+ <property name="enabled">
1811+ <bool>true</bool>
1812+ </property>
1813+ <property name="text">
1814+ <string notr="true">...</string>
1815+ </property>
1816+ </widget>
1817+ </item>
1818+ </layout>
1819+ </item>
1820+ <item>
1821+ <widget class="QRadioButton" name="noSelectedInfoRadio">
1822+ <property name="toolTip">
1823+ <string>Display no information</string>
1824+ </property>
1825+ <property name="text">
1826+ <string>None</string>
1827+ </property>
1828+ </widget>
1829+ </item>
1830+ </layout>
1831 </item>
1832 </layout>
1833 </widget>