Hi Alexey,<br><br>Attaching the patch with your comments incorporated.<br><br>Rgds<br>-Abhi<br><br><div class="gmail_quote">On Fri, Feb 5, 2010 at 9:36 PM, Khudyakov Alexey <span dir="ltr"><<a href="mailto:alexey.skladnoy@gmail.com">alexey.skladnoy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">В сообщении от Пятница 05 февраля 2010 07:23:24 Abhijit Apte написал:<br>
<div class="im">> Two reasons:<br>
> 1) Have added the function skyRegion() as a separate function because later<br>
> on we can scale it up to support a user-defined region.. Then one has to<br>
> do, is to write overloaded functions for skyRegion(). Say user wants to<br>
> select from a circular region or a polygon for instance. I think it's fine<br>
> to add this skyRegion() function for now.<br>
><br>
</div>Valid argument. But shouln'd it belong to SkyMesh then? It doesn't use<br>
SkyMapComposite at all.<br>
<div class="im"><br>
<br>
> 2) The problem with making SkyPoint p1 and p2 const:<br>
> While filling up the list with operator<<, it'd become a problem since<br>
> QList is instantiated with SkyPoint* whereas the arguments are of type<br>
> "const SkyPoint*".<br>
> /home/kde-devel/kde/src/KDE/refactor/kdeedu/kstars/kstars/skycomponents/sky<br>
> mapcomposite.cpp: In member function ‘QList<SkyObject*><br>
> SkyMapComposite::findObjectsInArea(const SkyPoint&, const SkyPoint&)’:<br>
> /home/kde-devel/kde/src/KDE/refactor/kdeedu/kstars/kstars/skycomponents/sky<br>
> mapcomposite.cpp:348: error: invalid conversion from ‘const SkyPoint*’ to<br>
> ‘SkyPoint*’<br>
> /home/kde-devel/kde/src/KDE/refactor/kdeedu/kstars/kstars/skycomponents/sky<br>
> mapcomposite.cpp:348: error: initializing argument 1 of ‘QVector<T>&<br>
> QVector<T>::operator<<(const T&) [with T = SkyPoint*]’<br>
><br>
</div>Just copy them. It's possible to use const_cast. But copying is more robust<br>
and cheap anyway.<br>
<br>
SkyPoint p1copy = p1;<br>
SkyPoint p2copy = p2;<br>
<div class="im"><br>
<br>
<br>
> > 4. If object doesn't visible it shouldn't get listed. You can use<br>
> > `selected()'<br>
> > to determine whether component visible.<br>
><br>
> You mean the objects below horizon?<br>
> I didn't quite understand this -- I noticed each component has this<br>
> selected() function. Did you mean the following because the component views<br>
> can be toggled from toolbar?? If you are referring to it, it's a good catch<br>
> ! :)<br>
> if( m_Stars->selected() ) m_Stars->findObjectsInArea(p1,p2)<br>
> if( m_DeepSky->selected() ) m_DeepSky->findObjectsInArea(p1,p2)<br>
><br>
</div>Exactly<br>
<div><div></div><div class="h5">_______________________________________________<br>
Kstars-devel mailing list<br>
<a href="mailto:Kstars-devel@kde.org">Kstars-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kstars-devel" target="_blank">https://mail.kde.org/mailman/listinfo/kstars-devel</a><br>
</div></div></blockquote></div><br>