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

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

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

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

Description of the change

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

Comments?

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

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

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

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

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

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

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

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

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

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

Please use braces on all conditionals.

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

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

I too get the segfault.

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

I'm made a refactoring of code

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

Oops... sometimes code get segfaults :(

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

fixed segfaults

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

O.K. segfault has been fixed

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

drop unused include QSettings

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/default_config.ini'
--- data/default_config.ini 2012-03-14 14:18:10 +0000
+++ data/default_config.ini 2012-04-13 18:05:24 +0000
@@ -85,6 +85,21 @@
85labels_amount = 3.085labels_amount = 3.0
86init_bortle_scale = 386init_bortle_scale = 3
8787
88[custom_selected_info]
89flag_show_absolutemagnitude = false
90flag_show_altaz = false
91flag_show_catalognumber = false
92flag_show_distance = false
93flag_show_extra1 = false
94flag_show_extra2 = false
95flag_show_extra3 = false
96flag_show_hourangle = false
97flag_show_magnitude = false
98flag_show_name = false
99flag_show_radecj2000 = false
100flag_show_radecofdate = false
101flag_show_size = false
102
88[gui]103[gui]
89flag_show_flip_buttons = false104flag_show_flip_buttons = false
90flag_show_nebulae_background_button = false105flag_show_nebulae_background_button = false
91106
=== modified file 'po/stellarium/POTFILES.in'
--- po/stellarium/POTFILES.in 2012-03-10 10:35:22 +0000
+++ po/stellarium/POTFILES.in 2012-04-13 18:05:24 +0000
@@ -37,6 +37,7 @@
37src/ui_configurationDialog.h37src/ui_configurationDialog.h
38src/ui_addRemoveLandscapesDialog.h38src/ui_addRemoveLandscapesDialog.h
39src/ui_AtmosphereDialog.h39src/ui_AtmosphereDialog.h
40src/ui_CustomInfoDialog.h
40src/ui_scriptConsole.h41src/ui_scriptConsole.h
4142
42# Plug-in translations43# Plug-in translations
4344
=== modified file 'po/stellarium/stellarium.pot'
--- po/stellarium/stellarium.pot 2012-04-11 09:32:09 +0000
+++ po/stellarium/stellarium.pot 2012-04-13 18:05:24 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2012-04-11 16:29+0700\n"11"POT-Creation-Date: 2012-04-13 23:56+0700\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -323,68 +323,68 @@
323msgid "Az/Alt: %1/%2"323msgid "Az/Alt: %1/%2"
324msgstr ""324msgstr ""
325325
326#: src/gui/ConfigurationDialog.cpp:312326#: src/gui/ConfigurationDialog.cpp:342
327msgid "Select screenshot directory"327msgid "Select screenshot directory"
328msgstr ""328msgstr ""
329329
330#: src/gui/ConfigurationDialog.cpp:487330#: src/gui/ConfigurationDialog.cpp:519
331#, qt-format331#, qt-format
332msgid "Startup FOV: %1%2"332msgid "Startup FOV: %1%2"
333msgstr ""333msgstr ""
334334
335#: src/gui/ConfigurationDialog.cpp:495335#: src/gui/ConfigurationDialog.cpp:527
336#, qt-format336#, qt-format
337msgid "Startup direction of view Az/Alt: %1/%2"337msgid "Startup direction of view Az/Alt: %1/%2"
338msgstr ""338msgstr ""
339339
340#: src/gui/ConfigurationDialog.cpp:534340#: src/gui/ConfigurationDialog.cpp:566
341#: plugins/Satellites/src/gui/SatellitesDialog.cpp:260341#: plugins/Satellites/src/gui/SatellitesDialog.cpp:260
342msgid "Authors"342msgid "Authors"
343msgstr ""343msgstr ""
344344
345#: src/gui/ConfigurationDialog.cpp:538 src/gui/ViewDialog.cpp:393345#: src/gui/ConfigurationDialog.cpp:570 src/gui/ViewDialog.cpp:393
346msgid "Contact"346msgid "Contact"
347msgstr ""347msgstr ""
348348
349#: src/gui/ConfigurationDialog.cpp:616349#: src/gui/ConfigurationDialog.cpp:648
350msgid "Author"350msgid "Author"
351msgstr ""351msgstr ""
352352
353#: src/gui/ConfigurationDialog.cpp:620353#: src/gui/ConfigurationDialog.cpp:652
354msgid "License"354msgid "License"
355msgstr ""355msgstr ""
356356
357#: src/gui/ConfigurationDialog.cpp:650357#: src/gui/ConfigurationDialog.cpp:682
358msgid "Running script: "358msgid "Running script: "
359msgstr ""359msgstr ""
360360
361#: src/gui/ConfigurationDialog.cpp:657361#: src/gui/ConfigurationDialog.cpp:689
362msgid "Running script: [none]"362msgid "Running script: [none]"
363msgstr ""363msgstr ""
364364
365#: src/gui/ConfigurationDialog.cpp:727365#: src/gui/ConfigurationDialog.cpp:759
366msgid ""366msgid ""
367"Finished downloading new star catalogs!\n"367"Finished downloading new star catalogs!\n"
368"Restart Stellarium to display them."368"Restart Stellarium to display them."
369msgstr ""369msgstr ""
370370
371#: src/gui/ConfigurationDialog.cpp:731371#: src/gui/ConfigurationDialog.cpp:763
372msgid "All available star catalogs have been installed."372msgid "All available star catalogs have been installed."
373msgstr ""373msgstr ""
374374
375#: src/gui/ConfigurationDialog.cpp:736375#: src/gui/ConfigurationDialog.cpp:768
376#, qt-format376#, qt-format
377msgid "Get catalog %1 of %2"377msgid "Get catalog %1 of %2"
378msgstr ""378msgstr ""
379379
380#: src/gui/ConfigurationDialog.cpp:743380#: src/gui/ConfigurationDialog.cpp:775
381#, qt-format381#, qt-format
382msgid ""382msgid ""
383"Downloading %1...\n"383"Downloading %1...\n"
384"(You can close this window.)"384"(You can close this window.)"
385msgstr ""385msgstr ""
386386
387#: src/gui/ConfigurationDialog.cpp:750387#: src/gui/ConfigurationDialog.cpp:782
388#, qt-format388#, qt-format
389msgid ""389msgid ""
390"Download size: %1MB\n"390"Download size: %1MB\n"
@@ -392,18 +392,18 @@
392"Magnitude range: %3 - %4"392"Magnitude range: %3 - %4"
393msgstr ""393msgstr ""
394394
395#: src/gui/ConfigurationDialog.cpp:793 src/gui/ConfigurationDialog.cpp:829395#: src/gui/ConfigurationDialog.cpp:825 src/gui/ConfigurationDialog.cpp:861
396#, qt-format396#, qt-format
397msgid ""397msgid ""
398"Error downloading %1:\n"398"Error downloading %1:\n"
399"%2"399"%2"
400msgstr ""400msgstr ""
401401
402#: src/gui/ConfigurationDialog.cpp:881402#: src/gui/ConfigurationDialog.cpp:913
403msgid "Verifying file integrity..."403msgid "Verifying file integrity..."
404msgstr ""404msgstr ""
405405
406#: src/gui/ConfigurationDialog.cpp:885406#: src/gui/ConfigurationDialog.cpp:917
407#, qt-format407#, qt-format
408msgid ""408msgid ""
409"Error downloading %1:\n"409"Error downloading %1:\n"
@@ -2723,7 +2723,7 @@
27232723
2724#: src/ui_searchDialogGui.h:589 src/ui_viewDialog.h:11372724#: src/ui_searchDialogGui.h:589 src/ui_viewDialog.h:1137
2725#: src/ui_viewDialog.h:1142 src/ui_viewDialog.h:11442725#: src/ui_viewDialog.h:1142 src/ui_viewDialog.h:1144
2726#: src/ui_configurationDialog.h:855 src/ui_configurationDialog.h:8662726#: src/ui_configurationDialog.h:891 src/ui_configurationDialog.h:902
2727#: plugins/TelescopeControl/src/ui_telescopeDialog.h:4212727#: plugins/TelescopeControl/src/ui_telescopeDialog.h:421
2728msgid "Options"2728msgid "Options"
2729msgstr ""2729msgstr ""
@@ -2917,282 +2917,290 @@
2917msgid "Visible"2917msgid "Visible"
2918msgstr ""2918msgstr ""
29192919
2920#: src/ui_configurationDialog.h:7532920#: src/ui_configurationDialog.h:785
2921msgid "Configuration"2921msgid "Configuration"
2922msgstr ""2922msgstr ""
29232923
2924#: src/ui_configurationDialog.h:7552924#: src/ui_configurationDialog.h:787
2925msgid "Program language"2925msgid "Program language"
2926msgstr ""2926msgstr ""
29272927
2928#: src/ui_configurationDialog.h:7562928#: src/ui_configurationDialog.h:788 src/ui_CustomInfoDialog.h:192
2929msgid "Selected object information"2929msgid "Selected object information"
2930msgstr ""2930msgstr ""
29312931
2932#: src/ui_configurationDialog.h:7582932#: src/ui_configurationDialog.h:790
2933msgid "Display all information available"2933msgid "Display all information available"
2934msgstr ""2934msgstr ""
29352935
2936#: src/ui_configurationDialog.h:7602936#: src/ui_configurationDialog.h:792
2937msgid "All available"2937msgid "All available"
2938msgstr ""2938msgstr ""
29392939
2940#: src/ui_configurationDialog.h:7622940#: src/ui_configurationDialog.h:794
2941msgid "Display less information"2941msgid "Display less information"
2942msgstr ""2942msgstr ""
29432943
2944#: src/ui_configurationDialog.h:7642944#: src/ui_configurationDialog.h:796
2945msgid "Short"2945msgid "Short"
2946msgstr ""2946msgstr ""
29472947
2948#: src/ui_configurationDialog.h:7662948#: src/ui_configurationDialog.h:798
2949msgid "Display user settings information"
2950msgstr ""
2951
2952#: src/ui_configurationDialog.h:800
2953msgid "Customized"
2954msgstr ""
2955
2956#: src/ui_configurationDialog.h:802
2949msgid "Display no information"2957msgid "Display no information"
2950msgstr ""2958msgstr ""
29512959
2952#: src/ui_configurationDialog.h:7682960#: src/ui_configurationDialog.h:804
2953msgid "None"2961msgid "None"
2954msgstr ""2962msgstr ""
29552963
2956#: src/ui_configurationDialog.h:7692964#: src/ui_configurationDialog.h:805
2957msgid "Default options"2965msgid "Default options"
2958msgstr ""2966msgstr ""
29592967
2960#: src/ui_configurationDialog.h:7712968#: src/ui_configurationDialog.h:807
2961msgid ""2969msgid ""
2962"Save the settings you've changed this session to be the same the next time "2970"Save the settings you've changed this session to be the same the next time "
2963"you start Stellarium"2971"you start Stellarium"
2964msgstr ""2972msgstr ""
29652973
2966#: src/ui_configurationDialog.h:7732974#: src/ui_configurationDialog.h:809
2967#: plugins/TimeZoneConfiguration/src/ui_timeZoneConfigurationWindow.h:3932975#: plugins/TimeZoneConfiguration/src/ui_timeZoneConfigurationWindow.h:393
2968msgid "Save settings"2976msgid "Save settings"
2969msgstr ""2977msgstr ""
29702978
2971#: src/ui_configurationDialog.h:7752979#: src/ui_configurationDialog.h:811
2972msgid "Restore the default settings that came with Stellarium"2980msgid "Restore the default settings that came with Stellarium"
2973msgstr ""2981msgstr ""
29742982
2975#: src/ui_configurationDialog.h:7772983#: src/ui_configurationDialog.h:813
2976msgid "Restore defaults"2984msgid "Restore defaults"
2977msgstr ""2985msgstr ""
29782986
2979#: src/ui_configurationDialog.h:7782987#: src/ui_configurationDialog.h:814
2980msgid ""2988msgid ""
2981"Restoring default settings requires a restart of Stellarium. Saving all the "2989"Restoring default settings requires a restart of Stellarium. Saving all the "
2982"current options includes the current FOV and direction of view for use at "2990"current options includes the current FOV and direction of view for use at "
2983"next startup."2991"next startup."
2984msgstr ""2992msgstr ""
29852993
2986#: src/ui_configurationDialog.h:7802994#: src/ui_configurationDialog.h:816
2987msgid "The width of your view when Stellarium starts"2995msgid "The width of your view when Stellarium starts"
2988msgstr ""2996msgstr ""
29892997
2990#: src/ui_configurationDialog.h:7832998#: src/ui_configurationDialog.h:819
2991msgid "The direction you're looking when Stellarium starts"2999msgid "The direction you're looking when Stellarium starts"
2992msgstr ""3000msgstr ""
29933001
2994#: src/ui_configurationDialog.h:7853002#: src/ui_configurationDialog.h:821
2995msgid "Control"3003msgid "Control"
2996msgstr ""3004msgstr ""
29973005
2998#: src/ui_configurationDialog.h:7873006#: src/ui_configurationDialog.h:823
2999msgid "Allow keyboard to pan and zoom"3007msgid "Allow keyboard to pan and zoom"
3000msgstr ""3008msgstr ""
30013009
3002#: src/ui_configurationDialog.h:7893010#: src/ui_configurationDialog.h:825
3003msgid "Enable keyboard navigation"3011msgid "Enable keyboard navigation"
3004msgstr ""3012msgstr ""
30053013
3006#: src/ui_configurationDialog.h:7913014#: src/ui_configurationDialog.h:827
3007msgid "Allow mouse to pan (drag) and zoom (mousewheel)"3015msgid "Allow mouse to pan (drag) and zoom (mousewheel)"
3008msgstr ""3016msgstr ""
30093017
3010#: src/ui_configurationDialog.h:7933018#: src/ui_configurationDialog.h:829
3011msgid "Enable mouse navigation"3019msgid "Enable mouse navigation"
3012msgstr ""3020msgstr ""
30133021
3014#: src/ui_configurationDialog.h:7943022#: src/ui_configurationDialog.h:830
3015#: plugins/TextUserInterface/src/TextUserInterface.cpp:1803023#: plugins/TextUserInterface/src/TextUserInterface.cpp:180
3016msgid "Startup date and time"3024msgid "Startup date and time"
3017msgstr ""3025msgstr ""
30183026
3019#: src/ui_configurationDialog.h:7963027#: src/ui_configurationDialog.h:832
3020msgid "Starts Stellarium at system clock date and time"3028msgid "Starts Stellarium at system clock date and time"
3021msgstr ""3029msgstr ""
30223030
3023#: src/ui_configurationDialog.h:7983031#: src/ui_configurationDialog.h:834
3024msgid "System date and time"3032msgid "System date and time"
3025msgstr ""3033msgstr ""
30263034
3027#: src/ui_configurationDialog.h:8003035#: src/ui_configurationDialog.h:836
3028msgid ""3036msgid ""
3029"Sets the simulation time to the next instance of this time of day when "3037"Sets the simulation time to the next instance of this time of day when "
3030"Stellarium starts"3038"Stellarium starts"
3031msgstr ""3039msgstr ""
30323040
3033#: src/ui_configurationDialog.h:8023041#: src/ui_configurationDialog.h:838
3034msgid "System date at:"3042msgid "System date at:"
3035msgstr ""3043msgstr ""
30363044
3037#: src/ui_configurationDialog.h:8043045#: src/ui_configurationDialog.h:840
3038msgid "Use a specific date and time when Stellarium starts up"3046msgid "Use a specific date and time when Stellarium starts up"
3039msgstr ""3047msgstr ""
30403048
3041#: src/ui_configurationDialog.h:8063049#: src/ui_configurationDialog.h:842
3042msgid "Other:"3050msgid "Other:"
3043msgstr ""3051msgstr ""
30443052
3045#: src/ui_configurationDialog.h:8073053#: src/ui_configurationDialog.h:843
3046msgid "use current"3054msgid "use current"
3047msgstr ""3055msgstr ""
30483056
3049#: src/ui_configurationDialog.h:8083057#: src/ui_configurationDialog.h:844
3050msgid "Other"3058msgid "Other"
3051msgstr ""3059msgstr ""
30523060
3053#: src/ui_configurationDialog.h:8103061#: src/ui_configurationDialog.h:846
3054msgid "Hides the mouse cursor when inactive"3062msgid "Hides the mouse cursor when inactive"
3055msgstr ""3063msgstr ""
30563064
3057#: src/ui_configurationDialog.h:8123065#: src/ui_configurationDialog.h:848
3058msgid "Mouse cursor timeout (seconds):"3066msgid "Mouse cursor timeout (seconds):"
3059msgstr ""3067msgstr ""
30603068
3061#: src/ui_configurationDialog.h:8143069#: src/ui_configurationDialog.h:850
3062msgid "Toggle vertical and horizontal image flip buttons."3070msgid "Toggle vertical and horizontal image flip buttons."
3063msgstr ""3071msgstr ""
30643072
3065#: src/ui_configurationDialog.h:8163073#: src/ui_configurationDialog.h:852
3066msgid "Show flip buttons"3074msgid "Show flip buttons"
3067msgstr ""3075msgstr ""
30683076
3069#: src/ui_configurationDialog.h:8173077#: src/ui_configurationDialog.h:853
3070msgid "Planetarium options"3078msgid "Planetarium options"
3071msgstr ""3079msgstr ""
30723080
3073#: src/ui_configurationDialog.h:8193081#: src/ui_configurationDialog.h:855
3074msgid ""3082msgid ""
3075"Spheric mirror distortion is used when projecting Stellarium onto a spheric "3083"Spheric mirror distortion is used when projecting Stellarium onto a spheric "
3076"mirror for low-cost planetarium systems."3084"mirror for low-cost planetarium systems."
3077msgstr ""3085msgstr ""
30783086
3079#: src/ui_configurationDialog.h:8213087#: src/ui_configurationDialog.h:857
3080msgid "Spheric mirror distortion"3088msgid "Spheric mirror distortion"
3081msgstr ""3089msgstr ""
30823090
3083#: src/ui_configurationDialog.h:8233091#: src/ui_configurationDialog.h:859
3084msgid "Align labels with the horizon"3092msgid "Align labels with the horizon"
3085msgstr ""3093msgstr ""
30863094
3087#: src/ui_configurationDialog.h:8253095#: src/ui_configurationDialog.h:861
3088msgid "Gravity labels"3096msgid "Gravity labels"
3089msgstr ""3097msgstr ""
30903098
3091#: src/ui_configurationDialog.h:8273099#: src/ui_configurationDialog.h:863
3092msgid ""3100msgid ""
3093"When enabled, the \"auto zoom out\" key will also set the initial viewing "3101"When enabled, the \"auto zoom out\" key will also set the initial viewing "
3094"direction"3102"direction"
3095msgstr ""3103msgstr ""
30963104
3097#: src/ui_configurationDialog.h:8293105#: src/ui_configurationDialog.h:865
3098msgid "Auto zoom out returns to initial direction of view"3106msgid "Auto zoom out returns to initial direction of view"
3099msgstr ""3107msgstr ""
31003108
3101#: src/ui_configurationDialog.h:8313109#: src/ui_configurationDialog.h:867
3102msgid "Mask out everything outside a central circle in the main view"3110msgid "Mask out everything outside a central circle in the main view"
3103msgstr ""3111msgstr ""
31043112
3105#: src/ui_configurationDialog.h:8333113#: src/ui_configurationDialog.h:869
3106msgid "Disc viewport"3114msgid "Disc viewport"
3107msgstr ""3115msgstr ""
31083116
3109#: src/ui_configurationDialog.h:8353117#: src/ui_configurationDialog.h:871
3110msgid "Hide other constellations when you click one"3118msgid "Hide other constellations when you click one"
3111msgstr ""3119msgstr ""
31123120
3113#: src/ui_configurationDialog.h:8373121#: src/ui_configurationDialog.h:873
3114msgid "Select single constellation"3122msgid "Select single constellation"
3115msgstr ""3123msgstr ""
31163124
3117#: src/ui_configurationDialog.h:8383125#: src/ui_configurationDialog.h:874
3118msgid "Screenshots"3126msgid "Screenshots"
3119msgstr ""3127msgstr ""
31203128
3121#: src/ui_configurationDialog.h:8393129#: src/ui_configurationDialog.h:875
3122msgid "Screenshot Directory"3130msgid "Screenshot Directory"
3123msgstr ""3131msgstr ""
31243132
3125#: src/ui_configurationDialog.h:8413133#: src/ui_configurationDialog.h:877
3126msgid "Invert colors"3134msgid "Invert colors"
3127msgstr ""3135msgstr ""
31283136
3129#: src/ui_configurationDialog.h:8423137#: src/ui_configurationDialog.h:878
3130msgid "Star catalog updates"3138msgid "Star catalog updates"
3131msgstr ""3139msgstr ""
31323140
3133#: src/ui_configurationDialog.h:8443141#: src/ui_configurationDialog.h:880
3134msgid "Click here to start downloading"3142msgid "Click here to start downloading"
3135msgstr ""3143msgstr ""
31363144
3137#: src/ui_configurationDialog.h:8463145#: src/ui_configurationDialog.h:882
3138msgid "Download this file to view even more stars"3146msgid "Download this file to view even more stars"
3139msgstr ""3147msgstr ""
31403148
3141#: src/ui_configurationDialog.h:8483149#: src/ui_configurationDialog.h:884
3142msgid "Restart the download"3150msgid "Restart the download"
3143msgstr ""3151msgstr ""
31443152
3145#: src/ui_configurationDialog.h:8503153#: src/ui_configurationDialog.h:886
3146msgid "Retry"3154msgid "Retry"
3147msgstr ""3155msgstr ""
31483156
3149#: src/ui_configurationDialog.h:8523157#: src/ui_configurationDialog.h:888
3150msgid "Stop the download. You can always restart it later"3158msgid "Stop the download. You can always restart it later"
3151msgstr ""3159msgstr ""
31523160
3153#: src/ui_configurationDialog.h:8543161#: src/ui_configurationDialog.h:890
3154#: plugins/TelescopeControl/src/ui_telescopeConfigurationDialog.h:5183162#: plugins/TelescopeControl/src/ui_telescopeConfigurationDialog.h:518
3155msgid "Cancel"3163msgid "Cancel"
3156msgstr ""3164msgstr ""
31573165
3158#: src/ui_configurationDialog.h:8573166#: src/ui_configurationDialog.h:893
3159msgid "Close window when script runs"3167msgid "Close window when script runs"
3160msgstr ""3168msgstr ""
31613169
3162#: src/ui_configurationDialog.h:8593170#: src/ui_configurationDialog.h:895
3163msgid "Run the selected script"3171msgid "Run the selected script"
3164msgstr ""3172msgstr ""
31653173
3166#: src/ui_configurationDialog.h:8633174#: src/ui_configurationDialog.h:899
3167msgid "Stop a running script"3175msgid "Stop a running script"
3168msgstr ""3176msgstr ""
31693177
3170#: src/ui_configurationDialog.h:8673178#: src/ui_configurationDialog.h:903
3171msgid "Load at startup"3179msgid "Load at startup"
3172msgstr ""3180msgstr ""
31733181
3174#: src/ui_configurationDialog.h:8683182#: src/ui_configurationDialog.h:904
3175msgid "configure"3183msgid "configure"
3176msgstr ""3184msgstr ""
31773185
3178#: src/ui_configurationDialog.h:8733186#: src/ui_configurationDialog.h:909
3179msgid "Main"3187msgid "Main"
3180msgstr ""3188msgstr ""
31813189
3182#: src/ui_configurationDialog.h:8753190#: src/ui_configurationDialog.h:911
3183msgid "Navigation"3191msgid "Navigation"
3184msgstr ""3192msgstr ""
31853193
3186#: src/ui_configurationDialog.h:8773194#: src/ui_configurationDialog.h:913
3187msgid "Tools"3195msgid "Tools"
3188msgstr ""3196msgstr ""
31893197
3190#: src/ui_configurationDialog.h:8793198#: src/ui_configurationDialog.h:915
3191#: plugins/TextUserInterface/src/TextUserInterface.cpp:4413199#: plugins/TextUserInterface/src/TextUserInterface.cpp:441
3192msgid "Scripts"3200msgid "Scripts"
3193msgstr ""3201msgstr ""
31943202
3195#: src/ui_configurationDialog.h:8813203#: src/ui_configurationDialog.h:917
3196msgid "Plugins"3204msgid "Plugins"
3197msgstr ""3205msgstr ""
31983206
@@ -3261,6 +3269,107 @@
3261"for murky conditions."3269"for murky conditions."
3262msgstr ""3270msgstr ""
32633271
3272#: src/ui_CustomInfoDialog.h:194
3273msgid "Custom Info Settings"
3274msgstr ""
3275
3276#: src/ui_CustomInfoDialog.h:196
3277msgid "Display info about an object's name"
3278msgstr ""
3279
3280#: src/ui_CustomInfoDialog.h:198
3281msgid "An object's name"
3282msgstr ""
3283
3284#: src/ui_CustomInfoDialog.h:200
3285msgid "Display info about a catalog numbers"
3286msgstr ""
3287
3288#: src/ui_CustomInfoDialog.h:202
3289msgid "Catalog numbers"
3290msgstr ""
3291
3292#: src/ui_CustomInfoDialog.h:204
3293msgid "Display info about a visual magnitude"
3294msgstr ""
3295
3296#: src/ui_CustomInfoDialog.h:206
3297msgid "Visual magnitude"
3298msgstr ""
3299
3300#: src/ui_CustomInfoDialog.h:208
3301msgid "Display info about an absolute magnitude"
3302msgstr ""
3303
3304#: src/ui_CustomInfoDialog.h:210
3305msgid "Absolute magnitude"
3306msgstr ""
3307
3308#: src/ui_CustomInfoDialog.h:212
3309msgid "Display the equatorial position (J2000 ref)"
3310msgstr ""
3311
3312#: src/ui_CustomInfoDialog.h:214
3313msgid "The equatorial coordinates (J2000 ref)"
3314msgstr ""
3315
3316#: src/ui_CustomInfoDialog.h:216
3317msgid "Display the equatorial position (of date)"
3318msgstr ""
3319
3320#: src/ui_CustomInfoDialog.h:218
3321msgid "The equatorial coordinates (of date)"
3322msgstr ""
3323
3324#: src/ui_CustomInfoDialog.h:220
3325msgid "Display the altitude and azimuth position"
3326msgstr ""
3327
3328#: src/ui_CustomInfoDialog.h:222
3329msgid "The alt-azimuthal coordinates"
3330msgstr ""
3331
3332#: src/ui_CustomInfoDialog.h:224
3333msgid "Display the hour angle + DE (of date)"
3334msgstr ""
3335
3336#: src/ui_CustomInfoDialog.h:226
3337msgid "The hour angle"
3338msgstr ""
3339
3340#: src/ui_CustomInfoDialog.h:228
3341msgid "Display info about an object's distance"
3342msgstr ""
3343
3344#: src/ui_CustomInfoDialog.h:230
3345msgid "Object's distance"
3346msgstr ""
3347
3348#: src/ui_CustomInfoDialog.h:232
3349msgid "Display info about an object's size"
3350msgstr ""
3351
3352#: src/ui_CustomInfoDialog.h:234
3353msgid "Object's size"
3354msgstr ""
3355
3356#: src/ui_CustomInfoDialog.h:236 src/ui_CustomInfoDialog.h:240
3357#: src/ui_CustomInfoDialog.h:244
3358msgid "Display a derived class-specific extra fields"
3359msgstr ""
3360
3361#: src/ui_CustomInfoDialog.h:238
3362msgid "Additional info (Extra 1)"
3363msgstr ""
3364
3365#: src/ui_CustomInfoDialog.h:242
3366msgid "Additional info (Extra 2)"
3367msgstr ""
3368
3369#: src/ui_CustomInfoDialog.h:246
3370msgid "Additional info (Extra 3)"
3371msgstr ""
3372
3264#: src/ui_scriptConsole.h:3413373#: src/ui_scriptConsole.h:341
3265msgid "Script console"3374msgid "Script console"
3266msgstr ""3375msgstr ""
32673376
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2012-04-12 17:45:18 +0000
+++ src/CMakeLists.txt 2012-04-13 18:05:24 +0000
@@ -414,6 +414,8 @@
414 gui/AddRemoveLandscapesDialog.cpp414 gui/AddRemoveLandscapesDialog.cpp
415 gui/AtmosphereDialog.hpp415 gui/AtmosphereDialog.hpp
416 gui/AtmosphereDialog.cpp416 gui/AtmosphereDialog.cpp
417 gui/CustomInfoDialog.hpp
418 gui/CustomInfoDialog.cpp
417 gui/StelDialog.hpp419 gui/StelDialog.hpp
418 gui/StelDialog.cpp)420 gui/StelDialog.cpp)
419421
@@ -433,6 +435,7 @@
433 gui/ConfigurationDialog.hpp435 gui/ConfigurationDialog.hpp
434 gui/AddRemoveLandscapesDialog.hpp436 gui/AddRemoveLandscapesDialog.hpp
435 gui/AtmosphereDialog.hpp437 gui/AtmosphereDialog.hpp
438 gui/CustomInfoDialog.hpp
436 gui/StelDialog.hpp)439 gui/StelDialog.hpp)
437440
438 ################# compiles .ui files ############441 ################# compiles .ui files ############
@@ -444,6 +447,7 @@
444 gui/searchDialogGui.ui447 gui/searchDialogGui.ui
445 gui/configurationDialog.ui448 gui/configurationDialog.ui
446 gui/AtmosphereDialog.ui449 gui/AtmosphereDialog.ui
450 gui/CustomInfoDialog.ui
447 gui/addRemoveLandscapesDialog.ui)451 gui/addRemoveLandscapesDialog.ui)
448452
449 IF(ENABLE_SCRIPT_CONSOLE)453 IF(ENABLE_SCRIPT_CONSOLE)
450454
=== modified file 'src/core/StelObject.cpp'
--- src/core/StelObject.cpp 2012-01-11 10:50:37 +0000
+++ src/core/StelObject.cpp 2012-04-13 18:05:24 +0000
@@ -27,11 +27,11 @@
27#include "StelSkyDrawer.hpp"27#include "StelSkyDrawer.hpp"
28#include "RefractionExtinction.hpp"28#include "RefractionExtinction.hpp"
29#include "StelLocation.hpp"29#include "StelLocation.hpp"
30#include "QSettings"
3031
31#include <QRegExp>32#include <QRegExp>
32#include <QDebug>33#include <QDebug>
3334
34
35Vec3d StelObject::getEquinoxEquatorialPos(const StelCore* core) const35Vec3d StelObject::getEquinoxEquatorialPos(const StelCore* core) const
36{36{
37 return core->j2000ToEquinoxEqu(getJ2000EquatorialPos(core));37 return core->j2000ToEquinoxEqu(getJ2000EquatorialPos(core));
@@ -154,3 +154,4 @@
154 str.append(QString("</font>"));154 str.append(QString("</font>"));
155 }155 }
156}156}
157
157158
=== modified file 'src/core/StelObjectMgr.cpp'
--- src/core/StelObjectMgr.cpp 2012-01-11 10:50:37 +0000
+++ src/core/StelObjectMgr.cpp 2012-04-13 18:05:24 +0000
@@ -32,6 +32,7 @@
32#include <QString>32#include <QString>
33#include <QDebug>33#include <QDebug>
34#include <QStringList>34#include <QStringList>
35#include <QSettings>
3536
36StelObjectMgr::StelObjectMgr() : searchRadiusPixel(30.f), distanceWeight(1.f)37StelObjectMgr::StelObjectMgr() : searchRadiusPixel(30.f), distanceWeight(1.f)
37{38{
@@ -244,3 +245,156 @@
244 result.sort();245 result.sort();
245 return result;246 return result;
246}247}
248
249int StelObjectMgr::getCustomInfoString(void)
250{
251 QSettings* conf = StelApp::getInstance().getSettings();
252
253 bool Name = conf->value("custom_selected_info/flag_show_name", false).toBool();
254 bool CatalogNumber = conf->value("custom_selected_info/flag_show_catalognumber", false).toBool();
255 bool Magnitude = conf->value("custom_selected_info/flag_show_magnitude", false).toBool();
256 bool RaDecJ2000 = conf->value("custom_selected_info/flag_show_radecj2000", false).toBool();
257 bool RaDecOfDate = conf->value("custom_selected_info/flag_show_radecofdate", false).toBool();
258 bool AltAz = conf->value("custom_selected_info/flag_show_altaz", false).toBool();
259 bool Distance = conf->value("custom_selected_info/flag_show_distance", false).toBool();
260 bool Size = conf->value("custom_selected_info/flag_show_size", false).toBool();
261 bool Extra1 = conf->value("custom_selected_info/flag_show_extra1", false).toBool();
262 bool Extra2 = conf->value("custom_selected_info/flag_show_extra2", false).toBool();
263 bool Extra3 = conf->value("custom_selected_info/flag_show_extra3", false).toBool();
264 bool HourAngle = conf->value("custom_selected_info/flag_show_hourangle", false).toBool();
265 bool AbsoluteMagnitude = conf->value("custom_selected_info/flag_show_absolutemagnitude", false).toBool();
266
267 int OctZero = 0x00000000;
268
269 int NameOct;
270 if (Name)
271 {
272 NameOct = StelObject::Name;
273 }
274 else
275 {
276 NameOct = OctZero;
277 }
278
279 int CatalogNumberOct;
280 if (CatalogNumber)
281 {
282 CatalogNumberOct = StelObject::CatalogNumber;
283 }
284 else
285 {
286 CatalogNumberOct = OctZero;
287 }
288
289 int MagnitudeOct;
290 if (Magnitude)
291 {
292 MagnitudeOct = StelObject::Magnitude;
293 }
294 else
295 {
296 MagnitudeOct = OctZero;
297 }
298
299 int RaDecJ2000Oct;
300 if (RaDecJ2000)
301 {
302 RaDecJ2000Oct = StelObject::RaDecJ2000;
303 }
304 else
305 {
306 RaDecJ2000Oct = OctZero;
307 }
308
309 int RaDecOfDateOct;
310 if (RaDecOfDate)
311 {
312 RaDecOfDateOct = StelObject::RaDecOfDate;
313 }
314 else
315 {
316 RaDecOfDateOct = OctZero;
317 }
318
319 int AltAzOct;
320 if (AltAz)
321 {
322 AltAzOct = StelObject::AltAzi;
323 }
324 else
325 {
326 AltAzOct = OctZero;
327 }
328
329 int DistanceOct;
330 if (Distance)
331 {
332 DistanceOct = StelObject::Distance;
333 }
334 else
335 {
336 DistanceOct = OctZero;
337 }
338
339 int SizeOct;
340 if (Size)
341 {
342 SizeOct = StelObject::Size;
343 }
344 else
345 {
346 SizeOct = OctZero;
347 }
348
349 int Extra1Oct;
350 if (Extra1)
351 {
352 Extra1Oct = StelObject::Extra1;
353 }
354 else
355 {
356 Extra1Oct = OctZero;
357 }
358
359 int Extra2Oct;
360 if (Extra2)
361 {
362 Extra2Oct = StelObject::Extra2;
363 }
364 else
365 {
366 Extra2Oct = OctZero;
367 }
368
369 int Extra3Oct;
370 if (Extra3)
371 {
372 Extra3Oct = StelObject::Extra3;
373 }
374 else
375 {
376 Extra3Oct = OctZero;
377 }
378
379 int HourAngleOct;
380 if (HourAngle)
381 {
382 HourAngleOct = StelObject::HourAngle;
383 }
384 else
385 {
386 HourAngleOct = OctZero;
387 }
388
389 int AbsoluteMagnitudeOct;
390 if (AbsoluteMagnitude)
391 {
392 AbsoluteMagnitudeOct = StelObject::AbsoluteMagnitude;
393 }
394 else
395 {
396 AbsoluteMagnitudeOct = OctZero;
397 }
398
399 return (NameOct|CatalogNumberOct|MagnitudeOct|RaDecJ2000Oct|RaDecOfDateOct|AltAzOct|DistanceOct|SizeOct|Extra1Oct|Extra2Oct|Extra3Oct|HourAngleOct|AbsoluteMagnitudeOct);
400}
247401
=== modified file 'src/core/StelObjectMgr.hpp'
--- src/core/StelObjectMgr.hpp 2012-01-11 10:50:37 +0000
+++ src/core/StelObjectMgr.hpp 2012-04-13 18:05:24 +0000
@@ -126,6 +126,8 @@
126 //! Default to 1.126 //! Default to 1.
127 void setDistanceWeight(float newDistanceWeight) {distanceWeight=newDistanceWeight;}127 void setDistanceWeight(float newDistanceWeight) {distanceWeight=newDistanceWeight;}
128128
129 int getCustomInfoString(void);
130
129signals:131signals:
130 //! Indicate that the selected StelObjects has changed.132 //! Indicate that the selected StelObjects has changed.
131 //! @param action define if the user requested that the objects are added to the selection or just replace it133 //! @param action define if the user requested that the objects are added to the selection or just replace it
132134
=== modified file 'src/core/StelUtils.hpp'
--- src/core/StelUtils.hpp 2012-01-11 10:50:37 +0000
+++ src/core/StelUtils.hpp 2012-04-13 18:05:24 +0000
@@ -143,10 +143,10 @@
143 //! @param v the input 3D vector143 //! @param v the input 3D vector
144 void rectToSphe(float *lng, float *lat, const Vec3f& v);144 void rectToSphe(float *lng, float *lat, const Vec3f& v);
145145
146 // GZ: some additions. I need those just for quick conversions for text display.146 // GZ: some additions. I need those just for quick conversions for text display.
147 //! Coordinate Transformation from equatorial to ecliptical147 //! Coordinate Transformation from equatorial to ecliptical
148 void ctRadec2Ecl(const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad);148 void ctRadec2Ecl(const double raRad, const double decRad, const double eclRad, double *lambdaRad, double *betaRad);
149 // GZ: done149 // GZ: done
150150
151 //! Convert a string longitude, latitude, RA or Declination angle151 //! Convert a string longitude, latitude, RA or Declination angle
152 //! to radians.152 //! to radians.
153153
=== modified file 'src/gui/ConfigurationDialog.cpp'
--- src/gui/ConfigurationDialog.cpp 2012-04-06 09:11:50 +0000
+++ src/gui/ConfigurationDialog.cpp 2012-04-13 18:05:24 +0000
@@ -20,6 +20,7 @@
2020
21#include "Dialog.hpp"21#include "Dialog.hpp"
22#include "ConfigurationDialog.hpp"22#include "ConfigurationDialog.hpp"
23#include "CustomInfoDialog.hpp"
23#include "StelMainGraphicsView.hpp"24#include "StelMainGraphicsView.hpp"
24#include "StelMainWindow.hpp"25#include "StelMainWindow.hpp"
25#include "ui_configurationDialog.h"26#include "ui_configurationDialog.h"
@@ -29,6 +30,7 @@
29#include "StelCore.hpp"30#include "StelCore.hpp"
30#include "StelLocaleMgr.hpp"31#include "StelLocaleMgr.hpp"
31#include "StelProjector.hpp"32#include "StelProjector.hpp"
33#include "StelObjectMgr.hpp"
3234
33#include "StelCore.hpp"35#include "StelCore.hpp"
34#include "StelMovementMgr.hpp"36#include "StelMovementMgr.hpp"
@@ -62,14 +64,18 @@
62ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NULL), gui(agui)64ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NULL), gui(agui)
63{65{
64 ui = new Ui_configurationDialogForm;66 ui = new Ui_configurationDialogForm;
67 customInfoDialog = NULL;
65 hasDownloadedStarCatalog = false;68 hasDownloadedStarCatalog = false;
66 isDownloadingStarCatalog = false;69 isDownloadingStarCatalog = false;
67 savedProjectionType = StelApp::getInstance().getCore()->getCurrentProjectionType();70 savedProjectionType = StelApp::getInstance().getCore()->getCurrentProjectionType();
68}71}
6972
70ConfigurationDialog::~ConfigurationDialog()73ConfigurationDialog::~ConfigurationDialog()
71{74{
72 delete ui;75 delete ui;
76 ui=NULL;
77 delete customInfoDialog;
78 customInfoDialog = NULL;
73}79}
7480
75void ConfigurationDialog::retranslate()81void ConfigurationDialog::retranslate()
@@ -145,14 +151,32 @@
145151
146 // Selected object info152 // Selected object info
147 if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0)153 if (gui->getInfoTextFilters() == (StelObject::InfoStringGroup)0)
154 {
148 ui->noSelectedInfoRadio->setChecked(true);155 ui->noSelectedInfoRadio->setChecked(true);
156 ui->pushButtonCustomInfoDialog->setEnabled(false);
157 }
149 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))158 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))
150 ui->briefSelectedInfoRadio->setChecked(true);159 {
151 else160 ui->briefSelectedInfoRadio->setChecked(true);
161 ui->pushButtonCustomInfoDialog->setEnabled(false);
162 }
163 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::AllInfo))
164 {
152 ui->allSelectedInfoRadio->setChecked(true);165 ui->allSelectedInfoRadio->setChecked(true);
166 ui->pushButtonCustomInfoDialog->setEnabled(false);
167 }
168 else
169 {
170 ui->customSelectedInfoRadio->setChecked(true);
171 ui->pushButtonCustomInfoDialog->setEnabled(true);
172 }
173
153 connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo()));174 connect(ui->noSelectedInfoRadio, SIGNAL(released()), this, SLOT(setNoSelectedInfo()));
154 connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo()));175 connect(ui->allSelectedInfoRadio, SIGNAL(released()), this, SLOT(setAllSelectedInfo()));
155 connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo()));176 connect(ui->briefSelectedInfoRadio, SIGNAL(released()), this, SLOT(setBriefSelectedInfo()));
177 connect(ui->customSelectedInfoRadio, SIGNAL(released()), this, SLOT(setCustomSelectedInfo()));
178
179 connect(ui->pushButtonCustomInfoDialog, SIGNAL(clicked()), this, SLOT(showCustomInfoDialog()));
156180
157 // Navigation tab181 // Navigation tab
158 // Startup time182 // Startup time
@@ -288,17 +312,27 @@
288void ConfigurationDialog::setNoSelectedInfo(void)312void ConfigurationDialog::setNoSelectedInfo(void)
289{313{
290 gui->setInfoTextFilters(StelObject::InfoStringGroup(0));314 gui->setInfoTextFilters(StelObject::InfoStringGroup(0));
315 ui->pushButtonCustomInfoDialog->setEnabled(false);
291}316}
292317
293void ConfigurationDialog::setAllSelectedInfo(void)318void ConfigurationDialog::setAllSelectedInfo(void)
294{319{
295 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::AllInfo));320 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::AllInfo));
321 ui->pushButtonCustomInfoDialog->setEnabled(false);
296}322}
297323
298void ConfigurationDialog::setBriefSelectedInfo(void)324void ConfigurationDialog::setBriefSelectedInfo(void)
299{325{
300 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::ShortInfo));326 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelObject::ShortInfo));
301}327 ui->pushButtonCustomInfoDialog->setEnabled(false);
328}
329
330void ConfigurationDialog::setCustomSelectedInfo(void)
331{
332 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
333 ui->pushButtonCustomInfoDialog->setEnabled(true);
334}
335
302336
303void ConfigurationDialog::cursorTimeOutChanged()337void ConfigurationDialog::cursorTimeOutChanged()
304{338{
@@ -429,8 +463,10 @@
429 conf->setValue("gui/selected_object_info", "none");463 conf->setValue("gui/selected_object_info", "none");
430 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))464 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::ShortInfo))
431 conf->setValue("gui/selected_object_info", "short");465 conf->setValue("gui/selected_object_info", "short");
432 else466 else if (gui->getInfoTextFilters() == StelObject::InfoStringGroup(StelObject::AllInfo))
433 conf->setValue("gui/selected_object_info", "all");467 conf->setValue("gui/selected_object_info", "all");
468 else
469 conf->setValue("gui/selected_object_info", "custom");
434470
435 // toolbar auto-hide status471 // toolbar auto-hide status
436 conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideHorizontalButtonBar());472 conf->setValue("gui/auto_hide_horizontal_toolbar", gui->getAutoHideHorizontalButtonBar());
@@ -893,3 +929,11 @@
893929
894 resetStarCatalogControls();930 resetStarCatalogControls();
895}931}
932
933void ConfigurationDialog::showCustomInfoDialog()
934{
935 if(customInfoDialog == NULL)
936 customInfoDialog = new CustomInfoDialog();
937
938 customInfoDialog->setVisible(true);
939}
896940
=== modified file 'src/gui/ConfigurationDialog.hpp'
--- src/gui/ConfigurationDialog.hpp 2012-02-13 18:59:16 +0000
+++ src/gui/ConfigurationDialog.hpp 2012-04-13 18:05:24 +0000
@@ -32,6 +32,7 @@
32class QNetworkAccessManager;32class QNetworkAccessManager;
33class QListWidgetItem;33class QListWidgetItem;
34class StelGui;34class StelGui;
35class CustomInfoDialog;
3536
36class ConfigurationDialog : public StelDialog37class ConfigurationDialog : public StelDialog
37{38{
@@ -76,6 +77,7 @@
76 void setNoSelectedInfo(void);77 void setNoSelectedInfo(void);
77 void setAllSelectedInfo(void);78 void setAllSelectedInfo(void);
78 void setBriefSelectedInfo(void);79 void setBriefSelectedInfo(void);
80 void setCustomSelectedInfo(void);
79 void selectLanguage(const QString& languageCode);81 void selectLanguage(const QString& languageCode);
80 void setStartupTimeMode();82 void setStartupTimeMode();
81 void setDiskViewport(bool);83 void setDiskViewport(bool);
@@ -131,10 +133,14 @@
131133
132 void changePage(QListWidgetItem *current, QListWidgetItem *previous);134 void changePage(QListWidgetItem *current, QListWidgetItem *previous);
133135
136 void showCustomInfoDialog();
137
134private:138private:
135 StelGui* gui;139 StelGui* gui;
136140
137 int savedProjectionType;141 int savedProjectionType;
142
143 CustomInfoDialog* customInfoDialog;
138};144};
139145
140#endif // _CONFIGURATIONDIALOG_HPP_146#endif // _CONFIGURATIONDIALOG_HPP_
141147
=== added file 'src/gui/CustomInfoDialog.cpp'
--- src/gui/CustomInfoDialog.cpp 1970-01-01 00:00:00 +0000
+++ src/gui/CustomInfoDialog.cpp 2012-04-13 18:05:24 +0000
@@ -0,0 +1,249 @@
1/*
2 * This program is distributed in the hope that it will be useful,
3 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5 * GNU General Public License for more details.
6 * You should have received a copy of the GNU General Public License
7 * along with this program; if not, write to the Free Software
8 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
9*/
10
11#include "CustomInfoDialog.hpp"
12#include "ui_CustomInfoDialog.h"
13
14#include "Dialog.hpp"
15#include "StelApp.hpp"
16#include "StelObjectMgr.hpp"
17
18#include <QDebug>
19
20CustomInfoDialog::CustomInfoDialog()
21{
22 ui = new Ui_CustomInfoDialogForm;
23 conf = StelApp::getInstance().getSettings();
24 gui = StelApp::getInstance().getGui();
25}
26
27CustomInfoDialog::~CustomInfoDialog()
28{
29 delete ui;
30 ui=NULL;
31}
32
33void CustomInfoDialog::retranslate()
34{
35 if (dialog)
36 ui->retranslateUi(dialog);
37}
38
39
40void CustomInfoDialog::createDialogContent()
41{
42 ui->setupUi(dialog);
43
44 //Signals and slots
45 connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
46 connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
47
48 //An object's name
49 ui->nameCheckBox->setChecked(getNameCustomInfoFlag());
50 connect(ui->nameCheckBox, SIGNAL(toggled(bool)), this, SLOT(setNameCustomInfoFlag(bool)));
51
52 //Catalog numbers
53 ui->catalogNumberCheckBox->setChecked(getCatalogNumberCustomInfoFlag());
54 connect(ui->catalogNumberCheckBox, SIGNAL(toggled(bool)), this, SLOT(setCatalogNumberCustomInfoFlag(bool)));
55
56 //Magnitude related data
57 ui->magnitudeCheckBox->setChecked(getMagnitudeCustomInfoFlag());
58 connect(ui->magnitudeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setMagnitudeCustomInfoFlag(bool)));
59
60 //The equatorial position (J2000 ref)
61 ui->raDecJ2000CheckBox->setChecked(getRaDecJ2000CustomInfoFlag());
62 connect(ui->raDecJ2000CheckBox, SIGNAL(toggled(bool)), this, SLOT(setRaDecJ2000CustomInfoFlag(bool)));
63
64 //The equatorial position (of date)
65 ui->raDecOfDateCheckBox->setChecked(getRaDecOfDateCustomInfoFlag());
66 connect(ui->raDecOfDateCheckBox, SIGNAL(toggled(bool)), this, SLOT(setRaDecOfDateCustomInfoFlag(bool)));
67
68 //The position (Altitude/Azimuth)
69 ui->altAzCheckBox->setChecked(getAltAzCustomInfoFlag());
70 connect(ui->altAzCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAltAzCustomInfoFlag(bool)));
71
72 //Info about an object's distance
73 ui->distanceCheckBox->setChecked(getDistanceCustomInfoFlag());
74 connect(ui->distanceCheckBox, SIGNAL(toggled(bool)), this, SLOT(setDistanceCustomInfoFlag(bool)));
75
76 //Info about an object's size
77 ui->sizeCheckBox->setChecked(getSizeCustomInfoFlag());
78 connect(ui->sizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setSizeCustomInfoFlag(bool)));
79
80 //Derived class-specific extra fields
81 ui->extra1CheckBox->setChecked(getExtra1CustomInfoFlag());
82 connect(ui->extra1CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra1CustomInfoFlag(bool)));
83
84 //Derived class-specific extra fields
85 ui->extra2CheckBox->setChecked(getExtra2CustomInfoFlag());
86 connect(ui->extra2CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra2CustomInfoFlag(bool)));
87
88 //Derived class-specific extra fields
89 ui->extra3CheckBox->setChecked(getExtra3CustomInfoFlag());
90 connect(ui->extra3CheckBox, SIGNAL(toggled(bool)), this, SLOT(setExtra3CustomInfoFlag(bool)));
91
92 //The hour angle + DE (of date)
93 ui->hourAngleCheckBox->setChecked(getHourAngleCustomInfoFlag());
94 connect(ui->hourAngleCheckBox, SIGNAL(toggled(bool)), this, SLOT(setHourAngleCustomInfoFlag(bool)));
95
96 //The absolute magnitude
97 ui->absoluteMagnitudeCheckBox->setChecked(getAbsoluteMagnitudeCustomInfoFlag());
98 connect(ui->absoluteMagnitudeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAbsoluteMagnitudeCustomInfoFlag(bool)));
99
100}
101
102void CustomInfoDialog::setVisible(bool v)
103{
104 StelDialog::setVisible(v);
105}
106
107bool CustomInfoDialog::getNameCustomInfoFlag()
108{
109 return conf->value("custom_selected_info/flag_show_name", false).toBool();
110}
111
112void CustomInfoDialog::setNameCustomInfoFlag(bool flag)
113{
114 conf->setValue("custom_selected_info/flag_show_name", flag);
115 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
116}
117
118bool CustomInfoDialog::getCatalogNumberCustomInfoFlag()
119{
120 return conf->value("custom_selected_info/flag_show_catalognumber", false).toBool();
121}
122
123void CustomInfoDialog::setCatalogNumberCustomInfoFlag(bool flag)
124{
125 conf->setValue("custom_selected_info/flag_show_catalognumber", flag);
126 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
127}
128
129bool CustomInfoDialog::getMagnitudeCustomInfoFlag()
130{
131 return conf->value("custom_selected_info/flag_show_magnitude", false).toBool();
132}
133
134void CustomInfoDialog::setMagnitudeCustomInfoFlag(bool flag)
135{
136 conf->setValue("custom_selected_info/flag_show_magnitude", flag);
137 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
138}
139
140bool CustomInfoDialog::getRaDecJ2000CustomInfoFlag()
141{
142 return conf->value("custom_selected_info/flag_show_radecj2000", false).toBool();
143}
144
145void CustomInfoDialog::setRaDecJ2000CustomInfoFlag(bool flag)
146{
147 conf->setValue("custom_selected_info/flag_show_radecj2000", flag);
148 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
149}
150
151bool CustomInfoDialog::getRaDecOfDateCustomInfoFlag()
152{
153 return conf->value("custom_selected_info/flag_show_radecofdate", false).toBool();
154}
155
156void CustomInfoDialog::setRaDecOfDateCustomInfoFlag(bool flag)
157{
158 conf->setValue("custom_selected_info/flag_show_radecofdate", flag);
159 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
160}
161
162bool CustomInfoDialog::getAltAzCustomInfoFlag()
163{
164 return conf->value("custom_selected_info/flag_show_altaz", false).toBool();
165}
166
167void CustomInfoDialog::setAltAzCustomInfoFlag(bool flag)
168{
169 conf->setValue("custom_selected_info/flag_show_altaz", flag);
170 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
171}
172
173bool CustomInfoDialog::getDistanceCustomInfoFlag()
174{
175 return conf->value("custom_selected_info/flag_show_distance", false).toBool();
176}
177
178void CustomInfoDialog::setDistanceCustomInfoFlag(bool flag)
179{
180 conf->setValue("custom_selected_info/flag_show_distance", flag);
181 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
182}
183
184bool CustomInfoDialog::getSizeCustomInfoFlag()
185{
186 return conf->value("custom_selected_info/flag_show_size", false).toBool();
187}
188
189void CustomInfoDialog::setSizeCustomInfoFlag(bool flag)
190{
191 conf->setValue("custom_selected_info/flag_show_size", flag);
192 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
193}
194
195bool CustomInfoDialog::getExtra1CustomInfoFlag()
196{
197 return conf->value("custom_selected_info/flag_show_extra1", false).toBool();
198}
199
200void CustomInfoDialog::setExtra1CustomInfoFlag(bool flag)
201{
202 conf->setValue("custom_selected_info/flag_show_extra1", flag);
203 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
204}
205
206bool CustomInfoDialog::getExtra2CustomInfoFlag()
207{
208 return conf->value("custom_selected_info/flag_show_extra2", false).toBool();
209}
210
211void CustomInfoDialog::setExtra2CustomInfoFlag(bool flag)
212{
213 conf->setValue("custom_selected_info/flag_show_extra2", flag);
214 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
215}
216
217bool CustomInfoDialog::getExtra3CustomInfoFlag()
218{
219 return conf->value("custom_selected_info/flag_show_extra3", false).toBool();
220}
221
222void CustomInfoDialog::setExtra3CustomInfoFlag(bool flag)
223{
224 conf->setValue("custom_selected_info/flag_show_extra3", flag);
225 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
226}
227
228bool CustomInfoDialog::getHourAngleCustomInfoFlag()
229{
230 return conf->value("custom_selected_info/flag_show_hourangle", false).toBool();
231}
232
233void CustomInfoDialog::setHourAngleCustomInfoFlag(bool flag)
234{
235 conf->setValue("custom_selected_info/flag_show_hourangle", flag);
236 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
237}
238
239bool CustomInfoDialog::getAbsoluteMagnitudeCustomInfoFlag()
240{
241 return conf->value("custom_selected_info/flag_show_absolutemagnitude", false).toBool();
242}
243
244void CustomInfoDialog::setAbsoluteMagnitudeCustomInfoFlag(bool flag)
245{
246 conf->setValue("custom_selected_info/flag_show_absolutemagnitude", flag);
247 gui->setInfoTextFilters(StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString()));
248}
249
0250
=== added file 'src/gui/CustomInfoDialog.hpp'
--- src/gui/CustomInfoDialog.hpp 1970-01-01 00:00:00 +0000
+++ src/gui/CustomInfoDialog.hpp 2012-04-13 18:05:24 +0000
@@ -0,0 +1,96 @@
1/*
2 * Stellarium
3 *
4 * Copyright (C) 2012 Alexander Wolf
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18*/
19
20// AW: Methods copied largely from AddRemoveLandscapesDialog
21
22#ifndef _CUSTOMINFODIALOG_HPP_
23#define _CUSTOMINFODIALOG_HPP_
24
25#include <QObject>
26#include <QSettings>
27#include "StelDialog.hpp"
28#include "StelGui.hpp"
29
30class Ui_CustomInfoDialogForm;
31
32//! @class CustomInfoDialog
33class CustomInfoDialog : public StelDialog
34{
35 Q_OBJECT
36
37public:
38 CustomInfoDialog();
39 virtual ~CustomInfoDialog();
40
41public slots:
42 void retranslate();
43 void setVisible(bool);
44
45protected:
46 //! Initialize the dialog widgets and connect the signals/slots.
47 virtual void createDialogContent();
48 Ui_CustomInfoDialogForm *ui;
49
50private slots:
51 bool getNameCustomInfoFlag();
52 void setNameCustomInfoFlag(bool flag);
53
54 bool getCatalogNumberCustomInfoFlag();
55 void setCatalogNumberCustomInfoFlag(bool flag);
56
57 bool getMagnitudeCustomInfoFlag();
58 void setMagnitudeCustomInfoFlag(bool flag);
59
60 bool getRaDecJ2000CustomInfoFlag();
61 void setRaDecJ2000CustomInfoFlag(bool flag);
62
63 bool getRaDecOfDateCustomInfoFlag();
64 void setRaDecOfDateCustomInfoFlag(bool flag);
65
66 bool getAltAzCustomInfoFlag();
67 void setAltAzCustomInfoFlag(bool flag);
68
69 bool getDistanceCustomInfoFlag();
70 void setDistanceCustomInfoFlag(bool flag);
71
72 bool getSizeCustomInfoFlag();
73 void setSizeCustomInfoFlag(bool flag);
74
75 bool getExtra1CustomInfoFlag();
76 void setExtra1CustomInfoFlag(bool flag);
77
78 bool getExtra2CustomInfoFlag();
79 void setExtra2CustomInfoFlag(bool flag);
80
81 bool getExtra3CustomInfoFlag();
82 void setExtra3CustomInfoFlag(bool flag);
83
84 bool getHourAngleCustomInfoFlag();
85 void setHourAngleCustomInfoFlag(bool flag);
86
87 bool getAbsoluteMagnitudeCustomInfoFlag();
88 void setAbsoluteMagnitudeCustomInfoFlag(bool flag);
89
90private:
91 StelGuiBase* gui;
92 QSettings* conf;
93
94};
95
96#endif // _CUSTOMINFODIALOG_HPP_
097
=== added file 'src/gui/CustomInfoDialog.ui'
--- src/gui/CustomInfoDialog.ui 1970-01-01 00:00:00 +0000
+++ src/gui/CustomInfoDialog.ui 2012-04-13 18:05:24 +0000
@@ -0,0 +1,286 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>CustomInfoDialogForm</class>
4 <widget class="QWidget" name="CustomInfoDialogForm">
5 <property name="sizePolicy">
6 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
7 <horstretch>0</horstretch>
8 <verstretch>0</verstretch>
9 </sizepolicy>
10 </property>
11 <layout class="QVBoxLayout" name="verticalLayout">
12 <property name="spacing">
13 <number>0</number>
14 </property>
15 <property name="margin">
16 <number>0</number>
17 </property>
18 <item>
19 <widget class="BarFrame" name="TitleBar">
20 <property name="minimumSize">
21 <size>
22 <width>16</width>
23 <height>25</height>
24 </size>
25 </property>
26 <property name="maximumSize">
27 <size>
28 <width>16777215</width>
29 <height>25</height>
30 </size>
31 </property>
32 <property name="frameShape">
33 <enum>QFrame::StyledPanel</enum>
34 </property>
35 <layout class="QHBoxLayout">
36 <property name="leftMargin">
37 <number>0</number>
38 </property>
39 <property name="topMargin">
40 <number>0</number>
41 </property>
42 <property name="rightMargin">
43 <number>4</number>
44 </property>
45 <property name="bottomMargin">
46 <number>0</number>
47 </property>
48 <item>
49 <spacer>
50 <property name="orientation">
51 <enum>Qt::Horizontal</enum>
52 </property>
53 <property name="sizeHint" stdset="0">
54 <size>
55 <width>40</width>
56 <height>20</height>
57 </size>
58 </property>
59 </spacer>
60 </item>
61 <item>
62 <widget class="QLabel" name="stelWindowTitle">
63 <property name="palette">
64 <palette>
65 <active/>
66 <inactive/>
67 <disabled/>
68 </palette>
69 </property>
70 <property name="font">
71 <font/>
72 </property>
73 <property name="text">
74 <string>Selected object information</string>
75 </property>
76 </widget>
77 </item>
78 <item>
79 <spacer>
80 <property name="orientation">
81 <enum>Qt::Horizontal</enum>
82 </property>
83 <property name="sizeHint" stdset="0">
84 <size>
85 <width>40</width>
86 <height>20</height>
87 </size>
88 </property>
89 </spacer>
90 </item>
91 <item>
92 <widget class="QPushButton" name="closeStelWindow">
93 <property name="minimumSize">
94 <size>
95 <width>16</width>
96 <height>16</height>
97 </size>
98 </property>
99 <property name="maximumSize">
100 <size>
101 <width>16</width>
102 <height>16</height>
103 </size>
104 </property>
105 <property name="focusPolicy">
106 <enum>Qt::NoFocus</enum>
107 </property>
108 <property name="text">
109 <string/>
110 </property>
111 </widget>
112 </item>
113 </layout>
114 </widget>
115 </item>
116 <item>
117 <widget class="QGroupBox" name="customInfoGroupBox">
118 <property name="title">
119 <string>Custom Info Settings</string>
120 </property>
121 <property name="alignment">
122 <set>Qt::AlignCenter</set>
123 </property>
124 <layout class="QVBoxLayout" name="verticalLayout_3">
125 <property name="margin">
126 <number>0</number>
127 </property>
128 <item>
129 <widget class="QCheckBox" name="nameCheckBox">
130 <property name="toolTip">
131 <string>Display info about an object's name</string>
132 </property>
133 <property name="text">
134 <string>An object's name</string>
135 </property>
136 </widget>
137 </item>
138 <item>
139 <widget class="QCheckBox" name="catalogNumberCheckBox">
140 <property name="toolTip">
141 <string>Display info about a catalog numbers</string>
142 </property>
143 <property name="text">
144 <string>Catalog numbers</string>
145 </property>
146 </widget>
147 </item>
148 <item>
149 <widget class="QCheckBox" name="magnitudeCheckBox">
150 <property name="toolTip">
151 <string>Display info about a visual magnitude</string>
152 </property>
153 <property name="text">
154 <string>Visual magnitude</string>
155 </property>
156 </widget>
157 </item>
158 <item>
159 <widget class="QCheckBox" name="absoluteMagnitudeCheckBox">
160 <property name="toolTip">
161 <string>Display info about an absolute magnitude</string>
162 </property>
163 <property name="text">
164 <string>Absolute magnitude</string>
165 </property>
166 </widget>
167 </item>
168 <item>
169 <widget class="QCheckBox" name="raDecJ2000CheckBox">
170 <property name="toolTip">
171 <string>Display the equatorial position (J2000 ref)</string>
172 </property>
173 <property name="text">
174 <string>The equatorial coordinates (J2000 ref)</string>
175 </property>
176 </widget>
177 </item>
178 <item>
179 <widget class="QCheckBox" name="raDecOfDateCheckBox">
180 <property name="toolTip">
181 <string>Display the equatorial position (of date)</string>
182 </property>
183 <property name="text">
184 <string>The equatorial coordinates (of date)</string>
185 </property>
186 </widget>
187 </item>
188 <item>
189 <widget class="QCheckBox" name="altAzCheckBox">
190 <property name="toolTip">
191 <string>Display the altitude and azimuth position</string>
192 </property>
193 <property name="text">
194 <string>The alt-azimuthal coordinates</string>
195 </property>
196 </widget>
197 </item>
198 <item>
199 <widget class="QCheckBox" name="hourAngleCheckBox">
200 <property name="toolTip">
201 <string>Display the hour angle + DE (of date)</string>
202 </property>
203 <property name="text">
204 <string>The hour angle</string>
205 </property>
206 </widget>
207 </item>
208 <item>
209 <widget class="QCheckBox" name="distanceCheckBox">
210 <property name="toolTip">
211 <string>Display info about an object's distance</string>
212 </property>
213 <property name="text">
214 <string>Object's distance</string>
215 </property>
216 </widget>
217 </item>
218 <item>
219 <widget class="QCheckBox" name="sizeCheckBox">
220 <property name="toolTip">
221 <string>Display info about an object's size</string>
222 </property>
223 <property name="text">
224 <string>Object's size</string>
225 </property>
226 </widget>
227 </item>
228 <item>
229 <widget class="QCheckBox" name="extra1CheckBox">
230 <property name="toolTip">
231 <string>Display a derived class-specific extra fields</string>
232 </property>
233 <property name="text">
234 <string>Additional info (Extra 1)</string>
235 </property>
236 </widget>
237 </item>
238 <item>
239 <widget class="QCheckBox" name="extra2CheckBox">
240 <property name="toolTip">
241 <string>Display a derived class-specific extra fields</string>
242 </property>
243 <property name="text">
244 <string>Additional info (Extra 2)</string>
245 </property>
246 </widget>
247 </item>
248 <item>
249 <widget class="QCheckBox" name="extra3CheckBox">
250 <property name="toolTip">
251 <string>Display a derived class-specific extra fields</string>
252 </property>
253 <property name="text">
254 <string>Additional info (Extra 3)</string>
255 </property>
256 </widget>
257 </item>
258 <item>
259 <spacer name="verticalSpacer">
260 <property name="orientation">
261 <enum>Qt::Vertical</enum>
262 </property>
263 <property name="sizeHint" stdset="0">
264 <size>
265 <width>20</width>
266 <height>40</height>
267 </size>
268 </property>
269 </spacer>
270 </item>
271 </layout>
272 </widget>
273 </item>
274 </layout>
275 </widget>
276 <customwidgets>
277 <customwidget>
278 <class>BarFrame</class>
279 <extends>QFrame</extends>
280 <header>Dialog.hpp</header>
281 <container>1</container>
282 </customwidget>
283 </customwidgets>
284 <resources/>
285 <connections/>
286</ui>
0287
=== modified file 'src/gui/SkyGui.cpp'
--- src/gui/SkyGui.cpp 2012-02-19 00:21:59 +0000
+++ src/gui/SkyGui.cpp 2012-04-13 18:05:24 +0000
@@ -18,9 +18,11 @@
18 */18 */
1919
20#include "SkyGui.hpp"20#include "SkyGui.hpp"
21#include "StelObjectMgr.hpp"
21#include "StelGuiItems.hpp"22#include "StelGuiItems.hpp"
22#include "StelApp.hpp"23#include "StelApp.hpp"
23#include "StelGui.hpp"24#include "StelGui.hpp"
25#include "StelCore.hpp"
24#include <QGraphicsView>26#include <QGraphicsView>
25#include <QDebug>27#include <QDebug>
26#include <QTimeLine>28#include <QTimeLine>
@@ -34,11 +36,21 @@
34 Q_ASSERT(conf);36 Q_ASSERT(conf);
35 QString objectInfo = conf->value("gui/selected_object_info", "all").toString();37 QString objectInfo = conf->value("gui/selected_object_info", "all").toString();
36 if (objectInfo == "all")38 if (objectInfo == "all")
39 {
37 infoTextFilters = StelObject::InfoStringGroup(StelObject::AllInfo);40 infoTextFilters = StelObject::InfoStringGroup(StelObject::AllInfo);
41 }
38 else if (objectInfo == "short")42 else if (objectInfo == "short")
43 {
39 infoTextFilters = StelObject::InfoStringGroup(StelObject::ShortInfo);44 infoTextFilters = StelObject::InfoStringGroup(StelObject::ShortInfo);
45 }
40 else if (objectInfo == "none")46 else if (objectInfo == "none")
47 {
41 infoTextFilters = StelObject::InfoStringGroup(0);48 infoTextFilters = StelObject::InfoStringGroup(0);
49 }
50 else if (objectInfo == "custom")
51 {
52 infoTextFilters = StelObject::InfoStringGroup(StelApp::getInstance().getStelObjectMgr().getCustomInfoString());
53 }
42 else54 else
43 {55 {
44 qWarning() << "config.ini option gui/selected_object_info is invalid, using \"all\"";56 qWarning() << "config.ini option gui/selected_object_info is invalid, using \"all\"";
4557
=== modified file 'src/gui/configurationDialog.ui'
--- src/gui/configurationDialog.ui 2012-02-11 18:53:11 +0000
+++ src/gui/configurationDialog.ui 2012-04-13 18:05:24 +0000
@@ -6,8 +6,8 @@
6 <rect>6 <rect>
7 <x>0</x>7 <x>0</x>
8 <y>0</y>8 <y>0</y>
9 <width>440</width>9 <width>428</width>
10 <height>460</height>10 <height>467</height>
11 </rect>11 </rect>
12 </property>12 </property>
13 <property name="styleSheet">13 <property name="styleSheet">
@@ -212,34 +212,66 @@
212 <number>0</number>212 <number>0</number>
213 </property>213 </property>
214 <item>214 <item>
215 <widget class="QRadioButton" name="allSelectedInfoRadio">215 <layout class="QHBoxLayout" name="horizontalLayout_13">
216 <property name="toolTip">216 <item>
217 <string>Display all information available</string>217 <widget class="QRadioButton" name="allSelectedInfoRadio">
218 </property>218 <property name="toolTip">
219 <property name="text">219 <string>Display all information available</string>
220 <string>All available</string>220 </property>
221 </property>221 <property name="text">
222 </widget>222 <string>All available</string>
223 </item>223 </property>
224 <item>224 </widget>
225 <widget class="QRadioButton" name="briefSelectedInfoRadio">225 </item>
226 <property name="toolTip">226 <item>
227 <string>Display less information</string>227 <widget class="QRadioButton" name="briefSelectedInfoRadio">
228 </property>228 <property name="toolTip">
229 <property name="text">229 <string>Display less information</string>
230 <string>Short</string>230 </property>
231 </property>231 <property name="text">
232 </widget>232 <string>Short</string>
233 </item>233 </property>
234 <item>234 </widget>
235 <widget class="QRadioButton" name="noSelectedInfoRadio">235 </item>
236 <property name="toolTip">236 </layout>
237 <string>Display no information</string>237 </item>
238 </property>238 <item>
239 <property name="text">239 <layout class="QHBoxLayout" name="horizontalLayout_14">
240 <string>None</string>240 <item>
241 </property>241 <layout class="QHBoxLayout" name="horizontalLayout_16">
242 </widget>242 <item>
243 <widget class="QRadioButton" name="customSelectedInfoRadio">
244 <property name="toolTip">
245 <string>Display user settings information</string>
246 </property>
247 <property name="text">
248 <string>Customized</string>
249 </property>
250 </widget>
251 </item>
252 <item>
253 <widget class="QPushButton" name="pushButtonCustomInfoDialog">
254 <property name="enabled">
255 <bool>true</bool>
256 </property>
257 <property name="text">
258 <string notr="true">...</string>
259 </property>
260 </widget>
261 </item>
262 </layout>
263 </item>
264 <item>
265 <widget class="QRadioButton" name="noSelectedInfoRadio">
266 <property name="toolTip">
267 <string>Display no information</string>
268 </property>
269 <property name="text">
270 <string>None</string>
271 </property>
272 </widget>
273 </item>
274 </layout>
243 </item>275 </item>
244 </layout>276 </layout>
245 </widget>277 </widget>