 |
Sayonara Player
|
24 #include "Utils/Pimpl.h"
53 Rating rating()
const;
74 void paint(QPainter* painter,
const QRect& rect);
102 void sigFinished(
bool save);
154 void paintEvent(QPaintEvent* e)
override;
156 void focusInEvent(QFocusEvent* e)
override;
157 void focusOutEvent(QFocusEvent* e)
override;
159 void mousePressEvent(QMouseEvent* e)
override;
160 void mouseMoveEvent(QMouseEvent* e)
override;
161 void mouseReleaseEvent(QMouseEvent* e)
override;
165 #endif // RATINGLABEL_H
Rating ratingAt(QPoint pos) const
Returns the rating regarding the current mouse position.
void setVerticalOffset(int offset)
The y-offset where the stars should be painted.
void paint(QPainter *painter, const QRect &rect)
Called from outside. Mostly from delegates or from the RatingEditor class.
A simple label, not suitable for editing. For editing, use the RatingEditor class....
Definition: RatingLabel.h:40
QSize minimumSizeHint() const override
Same as sizeHint.
void setVerticalOffset(int offset)
Set an offset where to begin drawing stars.
This class is used for the actual editing of a RatingLabel While the RatingLabel class is used in pai...
Definition: RatingLabel.h:97
void setMouseTrackable(bool b)
Enable mouse move events. If disabled, there's no live update.
void setRating(Rating rating)
Sets the actual rating.
QSize sizeHint() const override
about 20px in height and 5x20px in width
QSize minimumSizeHint() const override
Same as RatingLabel::minimumSizeHint.
Rating rating() const
Returns the actual rating. This is not neccessarily the rating currently visible. Consider the case w...
QSize sizeHint() const override
Same as RatingLabel::sizeHint.
void setRating(Rating rating)
Set a rating from one to 5.