A simple label, not suitable for editing. For editing, use the RatingEditor class. RatingLabel is intended for the paint method in delegates.
More...
#include <RatingLabel.h>
|
|
| RatingLabel (QWidget *parent, bool enabled=true) |
| |
| void | setRating (Rating rating) |
| | Set a rating from one to 5.
|
| |
|
Rating | rating () const |
| |
| 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.
|
| |
| QSize | sizeHint () const override |
| | about 20px in height and 5x20px in width
|
| |
| QSize | minimumSizeHint () const override |
| | Same as sizeHint.
|
| |
A simple label, not suitable for editing. For editing, use the RatingEditor class. RatingLabel is intended for the paint method in delegates.
◆ minimumSizeHint()
| QSize Gui::RatingLabel::minimumSizeHint |
( |
| ) |
const |
|
override |
Same as sizeHint.
- Returns
◆ paint()
| void Gui::RatingLabel::paint |
( |
QPainter * |
painter, |
|
|
const QRect & |
rect |
|
) |
| |
Called from outside. Mostly from delegates or from the RatingEditor class.
- Parameters
-
◆ ratingAt()
| Rating Gui::RatingLabel::ratingAt |
( |
QPoint |
pos | ) |
const |
Returns the rating regarding the current mouse position.
- Parameters
-
- Returns
◆ setRating()
| void Gui::RatingLabel::setRating |
( |
Rating |
rating | ) |
|
Set a rating from one to 5.
- Parameters
-
◆ setVerticalOffset()
| void Gui::RatingLabel::setVerticalOffset |
( |
int |
offset | ) |
|
The y-offset where the stars should be painted.
- Parameters
-
◆ sizeHint()
| QSize Gui::RatingLabel::sizeHint |
( |
| ) |
const |
|
override |
about 20px in height and 5x20px in width
- Returns