[Kstars-devel] Re: Review Request: Legend feature (currently used only for exported images)

Akarsh Simha akarshsimha at gmail.com
Mon Jul 11 04:15:02 CEST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101912/#review4584
-----------------------------------------------------------



kstars/legend.cpp
<http://git.reviewboard.kde.org/r/101912/#comment3991>

    KStars is now a single-instance class, so you can just use KStars::Instance(). Saves passing one parameter.



kstars/legend.cpp
<http://git.reviewboard.kde.org/r/101912/#comment3992>

    You could inline all of these right? Probably, the compiler will be smart enough to do that anyway, though. But it also removes some clutter if you put them as one-liners in the header file.



kstars/legend.cpp
<http://git.reviewboard.kde.org/r/101912/#comment3993>

    Maybe you should instead do a Q_ASSERT(false) so that we crash (I usually think it's better to crash and make sure the programmer fixes the problem than returning a non-result that might be harder to detect :D)



kstars/skymap.h
<http://git.reviewboard.kde.org/r/101912/#comment3994>

    Is this still used? Or can it be done away with?



kstars/skyqpainter.cpp
<http://git.reviewboard.kde.org/r/101912/#comment3995>

    Could you explain this change? I'm not sure about the details, but do note that there are stars in the NGC and IC catalogs that are sometimes not part of the other star catalogs we use.
    
    Edit: Sorry, I think I notice that the star's dia is set to 2.0 if it is less than 2.0 in drawDeepSkySymbol(...), whereby it will get drawn anyway. Am I right here?



kstars/skyqpainter.cpp
<http://git.reviewboard.kde.org/r/101912/#comment3996>

    Makes sense!


- Akarsh


On July 10, 2011, 10:38 p.m., Rafal Kulaga wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101912/
> -----------------------------------------------------------
> 
> (Updated July 10, 2011, 10:38 p.m.)
> 
> 
> Review request for KStars, Victor Carbune and Akarsh Simha.
> 
> 
> Summary
> -------
> 
> Attached diff adds the option to include legends in exported sky images. Both vertical and horizontal orientations are supported; there are two types of legend: full-blown (symbol descriptions, star magnitudes and scale) and scale-only. Some changes will inevitably be made to this code in a few days - please note that there are some hard-coded values in legend.cpp which will be gone after integration with the functionality I am developing now (FOV representation exporting).
> 
> Any comments are welcome, be they look&feel or code-related.
> 
> 
> Diffs
> -----
> 
>   kstars/CMakeLists.txt 0c335b6 
>   kstars/dialogs/exportimagedialog.h PRE-CREATION 
>   kstars/dialogs/exportimagedialog.cpp PRE-CREATION 
>   kstars/dialogs/exportimagedialog.ui PRE-CREATION 
>   kstars/kstarsactions.cpp e917cac 
>   kstars/kstarsdcop.cpp 42dcb0f 
>   kstars/legend.h PRE-CREATION 
>   kstars/legend.cpp PRE-CREATION 
>   kstars/skymap.h e7a7f56 
>   kstars/skymapdrawabstract.h c94a745 
>   kstars/skymapdrawabstract.cpp cf44fc5 
>   kstars/skypainter.h 1340568 
>   kstars/skyqpainter.h df7cc9b 
>   kstars/skyqpainter.cpp 87719b2 
> 
> Diff: http://git.reviewboard.kde.org/r/101912/diff
> 
> 
> Testing
> -------
> 
> Done some testing, everything worked (and looked) fine for me.
> 
> 
> Thanks,
> 
> Rafal
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kstars-devel/attachments/20110711/f14fccf2/attachment-0001.htm 


More information about the Kstars-devel mailing list