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: 1815 lines (+1128/-124)
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 (+44/-4)
src/gui/ConfigurationDialog.hpp (+6/-0)
src/gui/CustomInfoDialog.cpp (+248/-0)
src/gui/CustomInfoDialog.hpp (+94/-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 Needs Fixing
Bogdan Marinov Needs Fixing
gzotti Approve
Matthew Gates Pending
Stellarium Pending
Review via email: mp+100823@code.launchpad.net

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.
lp:~alexwolf/stellarium/info updated
5255. By Alexander Wolf

disable translation of ... string

5256. By Alexander Wolf

update default config.ini

Revision history for this message
gzotti (georg-zotti) wrote :

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 :

> 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 :

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 :

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 :

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

I too get the segfault.

lp:~alexwolf/stellarium/info updated
5257. By Alexander Wolf

code refactoring

5258. By Alexander Wolf

code refactoring: added braces on conditions

5259. By Alexander Wolf

merged from trunk (r5308)

5260. By Alexander Wolf

code refactoring: optimizations

5261. By Alexander Wolf

fixed segfaults

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 17:16:21 +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 17:16:21 +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 17:16:21 +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 17:16:21 +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 17:16:21 +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 17:16:21 +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 17:16:21 +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 17:16:21 +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 17:16:21 +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@@ -145,14 +147,32 @@
903
904 // Selected object info
905 if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0)
906+ {
907 ui->noSelectedInfoRadio->setChecked(true);
908+ ui->pushButtonCustomInfoDialog->setEnabled(false);
909+ }
910 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))
911- ui->briefSelectedInfoRadio->setChecked(true);
912- else
913+ {
914+ ui->briefSelectedInfoRadio->setChecked(true);
915+ ui->pushButtonCustomInfoDialog->setEnabled(false);
916+ }
917+ else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::AllInfo))
918+ {
919 ui->allSelectedInfoRadio->setChecked(true);
920+ ui->pushButtonCustomInfoDialog->setEnabled(false);
921+ }
922+ else
923+ {
924+ ui->customSelectedInfoRadio->setChecked(true);
925+ ui->pushButtonCustomInfoDialog->setEnabled(true);
926+ }
927+
928 connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo()));
929 connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo()));
930 connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo()));
931+ connect(ui->customSelectedInfoRadio, SIGNAL(released()), this, SLOT(setCustomSelectedInfo()));
932+
933+ connect(ui->pushButtonCustomInfoDialog, SIGNAL(clicked()), this, SLOT(showCustomInfoDialog()));
934
935 // Navigation tab
936 // Startup time
937@@ -288,17 +308,27 @@
938 void ConfigurationDialog::setNoSelectedInfo(void)
939 {
940 gui->setInfoTextFilters(StelObject::InfoStringGroup(0));
941+ ui->pushButtonCustomInfoDialog->setEnabled(false);
942 }
943
944 void ConfigurationDialog::setAllSelectedInfo(void)
945 {
946 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::AllInfo));
947+ ui->pushButtonCustomInfoDialog->setEnabled(false);
948 }
949
950 void ConfigurationDialog::setBriefSelectedInfo(void)
951 {
952 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::ShortInfo));
953-}
954+ ui->pushButtonCustomInfoDialog->setEnabled(false);
955+}
956+
957+void ConfigurationDialog::setCustomSelectedInfo(void)
958+{
959+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
960+ ui->pushButtonCustomInfoDialog->setEnabled(true);
961+}
962+
963
964 void ConfigurationDialog::cursorTimeOutChanged()
965 {
966@@ -429,8 +459,10 @@
967 conf->setValue("gui/selected_object_info", "none");
968 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))
969 conf->setValue("gui/selected_object_info", "short");
970- else
971+ else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::AllInfo))
972 conf->setValue("gui/selected_object_info", "all");
973+ else
974+ conf->setValue("gui/selected_object_info", "custom");
975
976 // toolbar auto-hide status
977 conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideHorizontalButtonBar());
978@@ -893,3 +925,11 @@
979
980 resetStarCatalogControls();
981 }
982+
983+void ConfigurationDialog::showCustomInfoDialog()
984+{
985+ if(customInfoDialog == NULL)
986+ customInfoDialog = new CustomInfoDialog();
987+
988+ customInfoDialog->setVisible(true);
989+}
990
991=== modified file 'src/gui/ConfigurationDialog.hpp'
992--- src/gui/ConfigurationDialog.hpp 2012-02-13 18:59:16 +0000
993+++ src/gui/ConfigurationDialog.hpp 2012-04-13 17:16:21 +0000
994@@ -32,6 +32,7 @@
995 class QNetworkAccessManager;
996 class QListWidgetItem;
997 class StelGui;
998+class CustomInfoDialog;
999
1000 class ConfigurationDialog : public StelDialog
1001 {
1002@@ -76,6 +77,7 @@
1003 void setNoSelectedInfo(void);
1004 void setAllSelectedInfo(void);
1005 void setBriefSelectedInfo(void);
1006+ void setCustomSelectedInfo(void);
1007 void selectLanguage(const QString& languageCode);
1008 void setStartupTimeMode();
1009 void setDiskViewport(bool);
1010@@ -131,10 +133,14 @@
1011
1012 void changePage(QListWidgetItem *current, QListWidgetItem *previous);
1013
1014+ void showCustomInfoDialog();
1015+
1016 private:
1017 StelGui* gui;
1018
1019 int savedProjectionType;
1020+
1021+ CustomInfoDialog * customInfoDialog;
1022 };
1023
1024 #endif // _CONFIGURATIONDIALOG_HPP_
1025
1026=== added file 'src/gui/CustomInfoDialog.cpp'
1027--- src/gui/CustomInfoDialog.cpp 1970-01-01 00:00:00 +0000
1028+++ src/gui/CustomInfoDialog.cpp 2012-04-13 17:16:21 +0000
1029@@ -0,0 +1,248 @@
1030+/*
1031+ * This program is distributed in the hope that it will be useful,
1032+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1033+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1034+ * GNU General Public License for more details.
1035+ * You should have received a copy of the GNU General Public License
1036+ * along with this program; if not, write to the Free Software
1037+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
1038+*/
1039+
1040+#include "CustomInfoDialog.hpp"
1041+#include "ui_CustomInfoDialog.h"
1042+
1043+#include "Dialog.hpp"
1044+#include "StelApp.hpp"
1045+#include "StelObjectMgr.hpp"
1046+
1047+#include <QDebug>
1048+
1049+CustomInfoDialog::CustomInfoDialog()
1050+{
1051+ ui = new Ui_CustomInfoDialogForm;
1052+ conf = StelApp::getInstance().getSettings();
1053+ gui = StelApp::getInstance().getGui();
1054+}
1055+
1056+CustomInfoDialog::~CustomInfoDialog()
1057+{
1058+ delete ui;
1059+}
1060+
1061+void CustomInfoDialog::retranslate()
1062+{
1063+ if (dialog)
1064+ ui->retranslateUi(dialog);
1065+}
1066+
1067+
1068+void CustomInfoDialog::createDialogContent()
1069+{
1070+ ui->setupUi(dialog);
1071+
1072+ //Signals and slots
1073+ connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
1074+ connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
1075+
1076+ //An object's name
1077+ ui->nameCheckBox->setChecked(getNameCustomInfoFlag());
1078+ connect(ui->nameCheckBox, SIGNAL(toggled(bool)), this, SLOT(setNameCustomInfoFlag(bool)));
1079+
1080+ //Catalog numbers
1081+ ui->catalogNumberCheckBox->setChecked(getCatalogNumberCustomInfoFlag());
1082+ connect(ui->catalogNumberCheckBox, SIGNAL(toggled(bool)), this, SLOT(setCatalogNumberCustomInfoFlag(bool)));
1083+
1084+ //Magnitude related data
1085+ ui->magnitudeCheckBox->setChecked(getMagnitudeCustomInfoFlag());
1086+ connect(ui->magnitudeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setMagnitudeCustomInfoFlag(bool)));
1087+
1088+ //The equatorial position (J2000 ref)
1089+ ui->raDecJ2000CheckBox->setChecked(getRaDecJ2000CustomInfoFlag());
1090+ connect(ui->raDecJ2000CheckBox, SIGNAL(toggled(bool)), this, SLOT(setRaDecJ2000CustomInfoFlag(bool)));
1091+
1092+ //The equatorial position (of date)
1093+ ui->raDecOfDateCheckBox->setChecked(getRaDecOfDateCustomInfoFlag());
1094+ connect(ui->raDecOfDateCheckBox, SIGNAL(toggled(bool)), this, SLOT(setRaDecOfDateCustomInfoFlag(bool)));
1095+
1096+ //The position (Altitude/Azimuth)
1097+ ui->altAzCheckBox->setChecked(getAltAzCustomInfoFlag());
1098+ connect(ui->altAzCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAltAzCustomInfoFlag(bool)));
1099+
1100+ //Info about an object's distance
1101+ ui->distanceCheckBox->setChecked(getDistanceCustomInfoFlag());
1102+ connect(ui->distanceCheckBox, SIGNAL(toggled(bool)), this, SLOT(setDistanceCustomInfoFlag(bool)));
1103+
1104+ //Info about an object's size
1105+ ui->sizeCheckBox->setChecked(getSizeCustomInfoFlag());
1106+ connect(ui->sizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setSizeCustomInfoFlag(bool)));
1107+
1108+ //Derived class-specific extra fields
1109+ ui->extra1CheckBox->setChecked(getExtra1CustomInfoFlag());
1110+ connect(ui->extra1CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra1CustomInfoFlag(bool)));
1111+
1112+ //Derived class-specific extra fields
1113+ ui->extra2CheckBox->setChecked(getExtra2CustomInfoFlag());
1114+ connect(ui->extra2CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra2CustomInfoFlag(bool)));
1115+
1116+ //Derived class-specific extra fields
1117+ ui->extra3CheckBox->setChecked(getExtra3CustomInfoFlag());
1118+ connect(ui->extra3CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra3CustomInfoFlag(bool)));
1119+
1120+ //The hour angle + DE (of date)
1121+ ui->hourAngleCheckBox->setChecked(getHourAngleCustomInfoFlag());
1122+ connect(ui->hourAngleCheckBox, SIGNAL(toggled(bool)), this, SLOT(setHourAngleCustomInfoFlag(bool)));
1123+
1124+ //The absolute magnitude
1125+ ui->absoluteMagnitudeCheckBox->setChecked(getAbsoluteMagnitudeCustomInfoFlag());
1126+ connect(ui->absoluteMagnitudeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAbsoluteMagnitudeCustomInfoFlag(bool)));
1127+
1128+}
1129+
1130+void CustomInfoDialog::setVisible(bool v)
1131+{
1132+ StelDialog::setVisible(v);
1133+}
1134+
1135+bool CustomInfoDialog::getNameCustomInfoFlag()
1136+{
1137+ return conf->value("custom_selected_info/flag_show_name", false).toBool();
1138+}
1139+
1140+void CustomInfoDialog::setNameCustomInfoFlag(bool flag)
1141+{
1142+ conf->setValue("custom_selected_info/flag_show_name", flag);
1143+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1144+}
1145+
1146+bool CustomInfoDialog::getCatalogNumberCustomInfoFlag()
1147+{
1148+ return conf->value("custom_selected_info/flag_show_catalognumber", false).toBool();
1149+}
1150+
1151+void CustomInfoDialog::setCatalogNumberCustomInfoFlag(bool flag)
1152+{
1153+ conf->setValue("custom_selected_info/flag_show_catalognumber", flag);
1154+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1155+}
1156+
1157+bool CustomInfoDialog::getMagnitudeCustomInfoFlag()
1158+{
1159+ return conf->value("custom_selected_info/flag_show_magnitude", false).toBool();
1160+}
1161+
1162+void CustomInfoDialog::setMagnitudeCustomInfoFlag(bool flag)
1163+{
1164+ conf->setValue("custom_selected_info/flag_show_magnitude", flag);
1165+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1166+}
1167+
1168+bool CustomInfoDialog::getRaDecJ2000CustomInfoFlag()
1169+{
1170+ return conf->value("custom_selected_info/flag_show_radecj2000", false).toBool();
1171+}
1172+
1173+void CustomInfoDialog::setRaDecJ2000CustomInfoFlag(bool flag)
1174+{
1175+ conf->setValue("custom_selected_info/flag_show_radecj2000", flag);
1176+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1177+}
1178+
1179+bool CustomInfoDialog::getRaDecOfDateCustomInfoFlag()
1180+{
1181+ return conf->value("custom_selected_info/flag_show_radecofdate", false).toBool();
1182+}
1183+
1184+void CustomInfoDialog::setRaDecOfDateCustomInfoFlag(bool flag)
1185+{
1186+ conf->setValue("custom_selected_info/flag_show_radecofdate", flag);
1187+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1188+}
1189+
1190+bool CustomInfoDialog::getAltAzCustomInfoFlag()
1191+{
1192+ return conf->value("custom_selected_info/flag_show_altaz", false).toBool();
1193+}
1194+
1195+void CustomInfoDialog::setAltAzCustomInfoFlag(bool flag)
1196+{
1197+ conf->setValue("custom_selected_info/flag_show_altaz", flag);
1198+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1199+}
1200+
1201+bool CustomInfoDialog::getDistanceCustomInfoFlag()
1202+{
1203+ return conf->value("custom_selected_info/flag_show_distance", false).toBool();
1204+}
1205+
1206+void CustomInfoDialog::setDistanceCustomInfoFlag(bool flag)
1207+{
1208+ conf->setValue("custom_selected_info/flag_show_distance", flag);
1209+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1210+}
1211+
1212+bool CustomInfoDialog::getSizeCustomInfoFlag()
1213+{
1214+ return conf->value("custom_selected_info/flag_show_size", false).toBool();
1215+}
1216+
1217+void CustomInfoDialog::setSizeCustomInfoFlag(bool flag)
1218+{
1219+ conf->setValue("custom_selected_info/flag_show_size", flag);
1220+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1221+}
1222+
1223+bool CustomInfoDialog::getExtra1CustomInfoFlag()
1224+{
1225+ return conf->value("custom_selected_info/flag_show_extra1", false).toBool();
1226+}
1227+
1228+void CustomInfoDialog::setExtra1CustomInfoFlag(bool flag)
1229+{
1230+ conf->setValue("custom_selected_info/flag_show_extra1", flag);
1231+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1232+}
1233+
1234+bool CustomInfoDialog::getExtra2CustomInfoFlag()
1235+{
1236+ return conf->value("custom_selected_info/flag_show_extra2", false).toBool();
1237+}
1238+
1239+void CustomInfoDialog::setExtra2CustomInfoFlag(bool flag)
1240+{
1241+ conf->setValue("custom_selected_info/flag_show_extra2", flag);
1242+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1243+}
1244+
1245+bool CustomInfoDialog::getExtra3CustomInfoFlag()
1246+{
1247+ return conf->value("custom_selected_info/flag_show_extra3", false).toBool();
1248+}
1249+
1250+void CustomInfoDialog::setExtra3CustomInfoFlag(bool flag)
1251+{
1252+ conf->setValue("custom_selected_info/flag_show_extra3", flag);
1253+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1254+}
1255+
1256+bool CustomInfoDialog::getHourAngleCustomInfoFlag()
1257+{
1258+ return conf->value("custom_selected_info/flag_show_hourangle", false).toBool();
1259+}
1260+
1261+void CustomInfoDialog::setHourAngleCustomInfoFlag(bool flag)
1262+{
1263+ conf->setValue("custom_selected_info/flag_show_hourangle", flag);
1264+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1265+}
1266+
1267+bool CustomInfoDialog::getAbsoluteMagnitudeCustomInfoFlag()
1268+{
1269+ return conf->value("custom_selected_info/flag_show_absolutemagnitude", false).toBool();
1270+}
1271+
1272+void CustomInfoDialog::setAbsoluteMagnitudeCustomInfoFlag(bool flag)
1273+{
1274+ conf->setValue("custom_selected_info/flag_show_absolutemagnitude", flag);
1275+ gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
1276+}
1277+
1278
1279=== added file 'src/gui/CustomInfoDialog.hpp'
1280--- src/gui/CustomInfoDialog.hpp 1970-01-01 00:00:00 +0000
1281+++ src/gui/CustomInfoDialog.hpp 2012-04-13 17:16:21 +0000
1282@@ -0,0 +1,94 @@
1283+/*
1284+ * Stellarium
1285+ *
1286+ * Copyright (C) 2012 Alexander Wolf
1287+ *
1288+ * This program is free software; you can redistribute it and/or
1289+ * modify it under the terms of the GNU General Public License
1290+ * as published by the Free Software Foundation; either version 2
1291+ * of the License, or (at your option) any later version.
1292+ *
1293+ * This program is distributed in the hope that it will be useful,
1294+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1295+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1296+ * GNU General Public License for more details.
1297+ * You should have received a copy of the GNU General Public License
1298+ * along with this program; if not, write to the Free Software
1299+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
1300+*/
1301+
1302+// AW: Methods copied largely from AddRemoveLandscapesDialog
1303+
1304+#ifndef _CUSTOMINFODIALOG_HPP_
1305+#define _CUSTOMINFODIALOG_HPP_
1306+
1307+#include <QObject>
1308+#include <QSettings>
1309+#include "StelDialog.hpp"
1310+#include "StelGui.hpp"
1311+
1312+class Ui_CustomInfoDialogForm;
1313+
1314+class CustomInfoDialog : public StelDialog
1315+{
1316+ Q_OBJECT
1317+
1318+public:
1319+ CustomInfoDialog();
1320+ virtual ~CustomInfoDialog();
1321+
1322+public slots:
1323+ void retranslate();
1324+ void setVisible(bool);
1325+
1326+ bool getNameCustomInfoFlag();
1327+ void setNameCustomInfoFlag(bool flag);
1328+
1329+ bool getCatalogNumberCustomInfoFlag();
1330+ void setCatalogNumberCustomInfoFlag(bool flag);
1331+
1332+ bool getMagnitudeCustomInfoFlag();
1333+ void setMagnitudeCustomInfoFlag(bool flag);
1334+
1335+ bool getRaDecJ2000CustomInfoFlag();
1336+ void setRaDecJ2000CustomInfoFlag(bool flag);
1337+
1338+ bool getRaDecOfDateCustomInfoFlag();
1339+ void setRaDecOfDateCustomInfoFlag(bool flag);
1340+
1341+ bool getAltAzCustomInfoFlag();
1342+ void setAltAzCustomInfoFlag(bool flag);
1343+
1344+ bool getDistanceCustomInfoFlag();
1345+ void setDistanceCustomInfoFlag(bool flag);
1346+
1347+ bool getSizeCustomInfoFlag();
1348+ void setSizeCustomInfoFlag(bool flag);
1349+
1350+ bool getExtra1CustomInfoFlag();
1351+ void setExtra1CustomInfoFlag(bool flag);
1352+
1353+ bool getExtra2CustomInfoFlag();
1354+ void setExtra2CustomInfoFlag(bool flag);
1355+
1356+ bool getExtra3CustomInfoFlag();
1357+ void setExtra3CustomInfoFlag(bool flag);
1358+
1359+ bool getHourAngleCustomInfoFlag();
1360+ void setHourAngleCustomInfoFlag(bool flag);
1361+
1362+ bool getAbsoluteMagnitudeCustomInfoFlag();
1363+ void setAbsoluteMagnitudeCustomInfoFlag(bool flag);
1364+
1365+protected:
1366+ //! Initialize the dialog widgets and connect the signals/slots.
1367+ virtual void createDialogContent();
1368+ Ui_CustomInfoDialogForm *ui;
1369+
1370+private:
1371+ StelGuiBase* gui;
1372+ QSettings* conf;
1373+
1374+};
1375+
1376+#endif // _CUSTOMINFODIALOG_HPP_
1377
1378=== added file 'src/gui/CustomInfoDialog.ui'
1379--- src/gui/CustomInfoDialog.ui 1970-01-01 00:00:00 +0000
1380+++ src/gui/CustomInfoDialog.ui 2012-04-13 17:16:21 +0000
1381@@ -0,0 +1,286 @@
1382+<?xml version="1.0" encoding="UTF-8"?>
1383+<ui version="4.0">
1384+ <class>CustomInfoDialogForm</class>
1385+ <widget class="QWidget" name="CustomInfoDialogForm">
1386+ <property name="sizePolicy">
1387+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
1388+ <horstretch>0</horstretch>
1389+ <verstretch>0</verstretch>
1390+ </sizepolicy>
1391+ </property>
1392+ <layout class="QVBoxLayout" name="verticalLayout">
1393+ <property name="spacing">
1394+ <number>0</number>
1395+ </property>
1396+ <property name="margin">
1397+ <number>0</number>
1398+ </property>
1399+ <item>
1400+ <widget class="BarFrame" name="TitleBar">
1401+ <property name="minimumSize">
1402+ <size>
1403+ <width>16</width>
1404+ <height>25</height>
1405+ </size>
1406+ </property>
1407+ <property name="maximumSize">
1408+ <size>
1409+ <width>16777215</width>
1410+ <height>25</height>
1411+ </size>
1412+ </property>
1413+ <property name="frameShape">
1414+ <enum>QFrame::StyledPanel</enum>
1415+ </property>
1416+ <layout class="QHBoxLayout">
1417+ <property name="leftMargin">
1418+ <number>0</number>
1419+ </property>
1420+ <property name="topMargin">
1421+ <number>0</number>
1422+ </property>
1423+ <property name="rightMargin">
1424+ <number>4</number>
1425+ </property>
1426+ <property name="bottomMargin">
1427+ <number>0</number>
1428+ </property>
1429+ <item>
1430+ <spacer>
1431+ <property name="orientation">
1432+ <enum>Qt::Horizontal</enum>
1433+ </property>
1434+ <property name="sizeHint" stdset="0">
1435+ <size>
1436+ <width>40</width>
1437+ <height>20</height>
1438+ </size>
1439+ </property>
1440+ </spacer>
1441+ </item>
1442+ <item>
1443+ <widget class="QLabel" name="stelWindowTitle">
1444+ <property name="palette">
1445+ <palette>
1446+ <active/>
1447+ <inactive/>
1448+ <disabled/>
1449+ </palette>
1450+ </property>
1451+ <property name="font">
1452+ <font/>
1453+ </property>
1454+ <property name="text">
1455+ <string>Selected object information</string>
1456+ </property>
1457+ </widget>
1458+ </item>
1459+ <item>
1460+ <spacer>
1461+ <property name="orientation">
1462+ <enum>Qt::Horizontal</enum>
1463+ </property>
1464+ <property name="sizeHint" stdset="0">
1465+ <size>
1466+ <width>40</width>
1467+ <height>20</height>
1468+ </size>
1469+ </property>
1470+ </spacer>
1471+ </item>
1472+ <item>
1473+ <widget class="QPushButton" name="closeStelWindow">
1474+ <property name="minimumSize">
1475+ <size>
1476+ <width>16</width>
1477+ <height>16</height>
1478+ </size>
1479+ </property>
1480+ <property name="maximumSize">
1481+ <size>
1482+ <width>16</width>
1483+ <height>16</height>
1484+ </size>
1485+ </property>
1486+ <property name="focusPolicy">
1487+ <enum>Qt::NoFocus</enum>
1488+ </property>
1489+ <property name="text">
1490+ <string/>
1491+ </property>
1492+ </widget>
1493+ </item>
1494+ </layout>
1495+ </widget>
1496+ </item>
1497+ <item>
1498+ <widget class="QGroupBox" name="customInfoGroupBox">
1499+ <property name="title">
1500+ <string>Custom Info Settings</string>
1501+ </property>
1502+ <property name="alignment">
1503+ <set>Qt::AlignCenter</set>
1504+ </property>
1505+ <layout class="QVBoxLayout" name="verticalLayout_3">
1506+ <property name="margin">
1507+ <number>0</number>
1508+ </property>
1509+ <item>
1510+ <widget class="QCheckBox" name="nameCheckBox">
1511+ <property name="toolTip">
1512+ <string>Display info about an object's name</string>
1513+ </property>
1514+ <property name="text">
1515+ <string>An object's name</string>
1516+ </property>
1517+ </widget>
1518+ </item>
1519+ <item>
1520+ <widget class="QCheckBox" name="catalogNumberCheckBox">
1521+ <property name="toolTip">
1522+ <string>Display info about a catalog numbers</string>
1523+ </property>
1524+ <property name="text">
1525+ <string>Catalog numbers</string>
1526+ </property>
1527+ </widget>
1528+ </item>
1529+ <item>
1530+ <widget class="QCheckBox" name="magnitudeCheckBox">
1531+ <property name="toolTip">
1532+ <string>Display info about a visual magnitude</string>
1533+ </property>
1534+ <property name="text">
1535+ <string>Visual magnitude</string>
1536+ </property>
1537+ </widget>
1538+ </item>
1539+ <item>
1540+ <widget class="QCheckBox" name="absoluteMagnitudeCheckBox">
1541+ <property name="toolTip">
1542+ <string>Display info about an absolute magnitude</string>
1543+ </property>
1544+ <property name="text">
1545+ <string>Absolute magnitude</string>
1546+ </property>
1547+ </widget>
1548+ </item>
1549+ <item>
1550+ <widget class="QCheckBox" name="raDecJ2000CheckBox">
1551+ <property name="toolTip">
1552+ <string>Display the equatorial position (J2000 ref)</string>
1553+ </property>
1554+ <property name="text">
1555+ <string>The equatorial coordinates (J2000 ref)</string>
1556+ </property>
1557+ </widget>
1558+ </item>
1559+ <item>
1560+ <widget class="QCheckBox" name="raDecOfDateCheckBox">
1561+ <property name="toolTip">
1562+ <string>Display the equatorial position (of date)</string>
1563+ </property>
1564+ <property name="text">
1565+ <string>The equatorial coordinates (of date)</string>
1566+ </property>
1567+ </widget>
1568+ </item>
1569+ <item>
1570+ <widget class="QCheckBox" name="altAzCheckBox">
1571+ <property name="toolTip">
1572+ <string>Display the altitude and azimuth position</string>
1573+ </property>
1574+ <property name="text">
1575+ <string>The alt-azimuthal coordinates</string>
1576+ </property>
1577+ </widget>
1578+ </item>
1579+ <item>
1580+ <widget class="QCheckBox" name="hourAngleCheckBox">
1581+ <property name="toolTip">
1582+ <string>Display the hour angle + DE (of date)</string>
1583+ </property>
1584+ <property name="text">
1585+ <string>The hour angle</string>
1586+ </property>
1587+ </widget>
1588+ </item>
1589+ <item>
1590+ <widget class="QCheckBox" name="distanceCheckBox">
1591+ <property name="toolTip">
1592+ <string>Display info about an object's distance</string>
1593+ </property>
1594+ <property name="text">
1595+ <string>Object's distance</string>
1596+ </property>
1597+ </widget>
1598+ </item>
1599+ <item>
1600+ <widget class="QCheckBox" name="sizeCheckBox">
1601+ <property name="toolTip">
1602+ <string>Display info about an object's size</string>
1603+ </property>
1604+ <property name="text">
1605+ <string>Object's size</string>
1606+ </property>
1607+ </widget>
1608+ </item>
1609+ <item>
1610+ <widget class="QCheckBox" name="extra1CheckBox">
1611+ <property name="toolTip">
1612+ <string>Display a derived class-specific extra fields</string>
1613+ </property>
1614+ <property name="text">
1615+ <string>Additional info (Extra 1)</string>
1616+ </property>
1617+ </widget>
1618+ </item>
1619+ <item>
1620+ <widget class="QCheckBox" name="extra2CheckBox">
1621+ <property name="toolTip">
1622+ <string>Display a derived class-specific extra fields</string>
1623+ </property>
1624+ <property name="text">
1625+ <string>Additional info (Extra 2)</string>
1626+ </property>
1627+ </widget>
1628+ </item>
1629+ <item>
1630+ <widget class="QCheckBox" name="extra3CheckBox">
1631+ <property name="toolTip">
1632+ <string>Display a derived class-specific extra fields</string>
1633+ </property>
1634+ <property name="text">
1635+ <string>Additional info (Extra 3)</string>
1636+ </property>
1637+ </widget>
1638+ </item>
1639+ <item>
1640+ <spacer name="verticalSpacer">
1641+ <property name="orientation">
1642+ <enum>Qt::Vertical</enum>
1643+ </property>
1644+ <property name="sizeHint" stdset="0">
1645+ <size>
1646+ <width>20</width>
1647+ <height>40</height>
1648+ </size>
1649+ </property>
1650+ </spacer>
1651+ </item>
1652+ </layout>
1653+ </widget>
1654+ </item>
1655+ </layout>
1656+ </widget>
1657+ <customwidgets>
1658+ <customwidget>
1659+ <class>BarFrame</class>
1660+ <extends>QFrame</extends>
1661+ <header>Dialog.hpp</header>
1662+ <container>1</container>
1663+ </customwidget>
1664+ </customwidgets>
1665+ <resources/>
1666+ <connections/>
1667+</ui>
1668
1669=== modified file 'src/gui/SkyGui.cpp'
1670--- src/gui/SkyGui.cpp 2012-02-19 00:21:59 +0000
1671+++ src/gui/SkyGui.cpp 2012-04-13 17:16:21 +0000
1672@@ -18,9 +18,11 @@
1673 */
1674
1675 #include "SkyGui.hpp"
1676+#include "StelObjectMgr.hpp"
1677 #include "StelGuiItems.hpp"
1678 #include "StelApp.hpp"
1679 #include "StelGui.hpp"
1680+#include "StelCore.hpp"
1681 #include <QGraphicsView>
1682 #include <QDebug>
1683 #include <QTimeLine>
1684@@ -34,11 +36,21 @@
1685 Q_ASSERT(conf);
1686 QString objectInfo = conf->value("gui/selected_object_info", "all").toString();
1687 if (objectInfo == "all")
1688+ {
1689 infoTextFilters = StelObject::InfoStringGroup(StelObject::AllInfo);
1690+ }
1691 else if (objectInfo == "short")
1692+ {
1693 infoTextFilters = StelObject::InfoStringGroup(StelObject::ShortInfo);
1694+ }
1695 else if (objectInfo == "none")
1696+ {
1697 infoTextFilters = StelObject::InfoStringGroup(0);
1698+ }
1699+ else if (objectInfo == "custom")
1700+ {
1701+ infoTextFilters = StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString());
1702+ }
1703 else
1704 {
1705 qWarning() << "config.ini option gui/selected_object_info is invalid, using \"all\"";
1706
1707=== modified file 'src/gui/configurationDialog.ui'
1708--- src/gui/configurationDialog.ui 2012-02-11 18:53:11 +0000
1709+++ src/gui/configurationDialog.ui 2012-04-13 17:16:21 +0000
1710@@ -6,8 +6,8 @@
1711 <rect>
1712 <x>0</x>
1713 <y>0</y>
1714- <width>440</width>
1715- <height>460</height>
1716+ <width>428</width>
1717+ <height>467</height>
1718 </rect>
1719 </property>
1720 <property name="styleSheet">
1721@@ -212,34 +212,66 @@
1722 <number>0</number>
1723 </property>
1724 <item>
1725- <widget class="QRadioButton" name="allSelectedInfoRadio">
1726- <property name="toolTip">
1727- <string>Display all information available</string>
1728- </property>
1729- <property name="text">
1730- <string>All available</string>
1731- </property>
1732- </widget>
1733- </item>
1734- <item>
1735- <widget class="QRadioButton" name="briefSelectedInfoRadio">
1736- <property name="toolTip">
1737- <string>Display less information</string>
1738- </property>
1739- <property name="text">
1740- <string>Short</string>
1741- </property>
1742- </widget>
1743- </item>
1744- <item>
1745- <widget class="QRadioButton" name="noSelectedInfoRadio">
1746- <property name="toolTip">
1747- <string>Display no information</string>
1748- </property>
1749- <property name="text">
1750- <string>None</string>
1751- </property>
1752- </widget>
1753+ <layout class="QHBoxLayout" name="horizontalLayout_13">
1754+ <item>
1755+ <widget class="QRadioButton" name="allSelectedInfoRadio">
1756+ <property name="toolTip">
1757+ <string>Display all information available</string>
1758+ </property>
1759+ <property name="text">
1760+ <string>All available</string>
1761+ </property>
1762+ </widget>
1763+ </item>
1764+ <item>
1765+ <widget class="QRadioButton" name="briefSelectedInfoRadio">
1766+ <property name="toolTip">
1767+ <string>Display less information</string>
1768+ </property>
1769+ <property name="text">
1770+ <string>Short</string>
1771+ </property>
1772+ </widget>
1773+ </item>
1774+ </layout>
1775+ </item>
1776+ <item>
1777+ <layout class="QHBoxLayout" name="horizontalLayout_14">
1778+ <item>
1779+ <layout class="QHBoxLayout" name="horizontalLayout_16">
1780+ <item>
1781+ <widget class="QRadioButton" name="customSelectedInfoRadio">
1782+ <property name="toolTip">
1783+ <string>Display user settings information</string>
1784+ </property>
1785+ <property name="text">
1786+ <string>Customized</string>
1787+ </property>
1788+ </widget>
1789+ </item>
1790+ <item>
1791+ <widget class="QPushButton" name="pushButtonCustomInfoDialog">
1792+ <property name="enabled">
1793+ <bool>true</bool>
1794+ </property>
1795+ <property name="text">
1796+ <string notr="true">...</string>
1797+ </property>
1798+ </widget>
1799+ </item>
1800+ </layout>
1801+ </item>
1802+ <item>
1803+ <widget class="QRadioButton" name="noSelectedInfoRadio">
1804+ <property name="toolTip">
1805+ <string>Display no information</string>
1806+ </property>
1807+ <property name="text">
1808+ <string>None</string>
1809+ </property>
1810+ </widget>
1811+ </item>
1812+ </layout>
1813 </item>
1814 </layout>
1815 </widget>