Making the rating painter class public (update)

Sebastian Trüg strueg at mandriva.com
Tue Feb 26 11:47:52 GMT 2008


Please find attached the updated version. better documentation and all const 
methods.

Cheers,
Sebastian

On Monday 25 February 2008 23:12:00 Frank Osterfeld wrote:
> On Monday 25 February 2008, Sebastian Trüg wrote:
> >        void draw( QPainter* painter, const QRect& rect, int rating, int
>
> hoverRating = -1 );
>
> I don't get what hoverRating means here from reading the header, so
> documentation wouldn't hurt.
>
> >         /**
> >          * Calculate the rating value from mouse position pos.
> >          *
> >          * \return The rating corresponding to pos or -1 if pos is
> >          * outside of the configured rect.
> >          */
> >         int fromPosition( const QRect& rect, const QPoint& pos );
>
> That should be const I think - (and isn't int ratingFromPosition() const
> more clear? This is a RatingPainter, not a Rating after all).
>
> Frank


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ratingpainter.cpp
Type: text/x-c++src
Size: 8878 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080226/867e0a19/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ratingpainter.h
Type: text/x-c++hdr
Size: 5872 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080226/867e0a19/attachment.h>


More information about the kde-core-devel mailing list