KDEUI
kratingwidget.cpp
Go to the documentation of this file.
Utility class that draws a row of stars for a rating value.
Definition kratingpainter.h:51
int ratingFromPosition(const QRect &rect, const QPoint &pos) const
Calculate the rating value from mouse position pos.
Definition kratingpainter.cpp:288
void setAlignment(Qt::Alignment align)
The alignment of the stars in the drawing rect.
Definition kratingpainter.cpp:147
bool halfStepsEnabled() const
If half steps are enabled one star equals to 2 rating points and uneven rating values result in half-...
Definition kratingpainter.cpp:93
void setSpacing(int spacing)
Set the spacing between rating pixmaps.
Definition kratingpainter.cpp:177
void setHalfStepsEnabled(bool enabled)
If half steps are enabled (the default) then one rating step corresponds to half a star.
Definition kratingpainter.cpp:141
void paint(QPainter *painter, const QRect &rect, int rating, int hoverRating=-1) const
Draw the rating.
Definition kratingpainter.cpp:183
void setAlignment(Qt::Alignment align)
The alignment of the stars in the drawing rect.
Definition kratingwidget.cpp:116
void setPixmap(const QPixmap &)
Set the pixap to be used to display a rating step.
Definition kratingwidget.cpp:63
void ratingChanged(unsigned int rating)
This signal is emitted when the rating is changed.
void setOnlyPaintFullSteps(bool)
Definition kratingwidget.cpp:197
void setHalfStepsEnabled(bool enabled)
If half steps are enabled (the default) then one rating step corresponds to half a star.
Definition kratingwidget.cpp:189
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Jul 18 2024 00:00:00 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Jul 18 2024 00:00:00 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.