 |
Sayonara Player
|
24 #include "Utils/Pimpl.h"
53 Rating rating()
const;
74 void paint(QPainter* painter,
const QRect& rect);
102 void sig_finished(
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 rating_at(QPoint pos) const
Returns the rating regarding the current mouse position.
void set_mousetrackable(bool b)
Enable mouse move events. If disabled, there's no live update.
void set_vertical_offset(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:38
QSize minimumSizeHint() const override
Same as sizeHint.
This class is used for the actual editing of a RatingLabel While the RatingLabel class is used in pai...
Definition: RatingLabel.h:96
QSize sizeHint() const override
about 20px in height and 5x20px in width
QSize minimumSizeHint() const override
Same as RatingLabel::minimumSizeHint.
void set_rating(Rating rating)
Set a rating from one to 5.
void set_vertical_offset(int offset)
Set an offset where to begin drawing stars.
Rating rating() const
Returns the actual rating. This is not neccessarily the rating currently visible. Consider the case w...
void set_rating(Rating rating)
Sets the actual rating.
QSize sizeHint() const override
Same as RatingLabel::sizeHint.