KWidgetsAddons
kratingwidget.cpp
156 d->hoverRating = adjustedHoverRating(halfStepsEnabled(), d->ratingPainter.ratingFromPosition(contentsRect(), e->pos()), d->rating);
169 d->hoverRating = adjustedHoverRating(halfStepsEnabled(), d->ratingPainter.ratingFromPosition(contentsRect(), e->pos()), d->rating);
198 pixSize = d->ratingPainter.customPixmap().size() / d->ratingPainter.customPixmap().devicePixelRatio();
201 return QSize(pixSize.width() * numPix + spacing() * (numPix - 1) + frameWidth() * 2, pixSize.height() + frameWidth() * 2);
Utility class that draws a row of stars for a rating value.
Definition kratingpainter.h:38
void setAlignment(Qt::Alignment align)
The alignment of the stars in the drawing rect.
Definition kratingwidget.cpp:74
void ratingChanged(int rating)
This signal is emitted when the rating is changed.
void setHalfStepsEnabled(bool enabled)
If half steps are enabled (the default) then one rating step corresponds to half a star.
Definition kratingwidget.cpp:122
frameWidth
virtual void paintEvent(QPaintEvent *) override
QPoint pos() const const
Q_EMITQ_EMIT
Qt::MouseButton button() const const
typedef Alignment
LayoutDirection
LeftButton
QRect contentsRect() const const
enabled
void setMouseTracking(bool enable)
virtual void resizeEvent(QResizeEvent *event)
size
void update()
void updateGeometry()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.