This class is used for the actual editing of a RatingLabel While the RatingLabel class is used in paint() methods of delegates, this class is used in normal widgets or for createEditor() methods in delegates.
More...
#include <RatingLabel.h>
|
void | sigFinished (bool save) |
|
|
| RatingEditor (QWidget *parent) |
|
| RatingEditor (Rating rating, QWidget *parent) |
|
void | setRating (Rating rating) |
| Sets the actual rating. More...
|
|
Rating | rating () const |
| Returns the actual rating. This is not neccessarily the rating currently visible. Consider the case where you hover over the stars and lose focus because you are clicking into another widget. You don't want the currently shown value then, you want the old value back. This value is updated when a mouseReleaseEvent is fired when clicking on a star in the current widget. More...
|
|
void | setVerticalOffset (int offset) |
| Set an offset where to begin drawing stars. More...
|
|
void | setMouseTrackable (bool b) |
| Enable mouse move events. If disabled, there's no live update. More...
|
|
QSize | sizeHint () const override |
| Same as RatingLabel::sizeHint. More...
|
|
QSize | minimumSizeHint () const override |
| Same as RatingLabel::minimumSizeHint. More...
|
|
|
void | paintEvent (QPaintEvent *e) override |
|
void | focusInEvent (QFocusEvent *e) override |
|
void | focusOutEvent (QFocusEvent *e) override |
|
void | mousePressEvent (QMouseEvent *e) override |
|
void | mouseMoveEvent (QMouseEvent *e) override |
|
void | mouseReleaseEvent (QMouseEvent *e) override |
|
This class is used for the actual editing of a RatingLabel While the RatingLabel class is used in paint() methods of delegates, this class is used in normal widgets or for createEditor() methods in delegates.
◆ minimumSizeHint()
QSize Gui::RatingEditor::minimumSizeHint |
( |
| ) |
const |
|
override |
◆ rating()
Rating Gui::RatingEditor::rating |
( |
| ) |
const |
Returns the actual rating. This is not neccessarily the rating currently visible. Consider the case where you hover over the stars and lose focus because you are clicking into another widget. You don't want the currently shown value then, you want the old value back. This value is updated when a mouseReleaseEvent is fired when clicking on a star in the current widget.
- Returns
◆ setMouseTrackable()
void Gui::RatingEditor::setMouseTrackable |
( |
bool |
b | ) |
|
Enable mouse move events. If disabled, there's no live update.
- Parameters
-
◆ setRating()
void Gui::RatingEditor::setRating |
( |
Rating |
rating | ) |
|
Sets the actual rating.
- Parameters
-
◆ setVerticalOffset()
void Gui::RatingEditor::setVerticalOffset |
( |
int |
offset | ) |
|
Set an offset where to begin drawing stars.
- Parameters
-
◆ sizeHint()
QSize Gui::RatingEditor::sizeHint |
( |
| ) |
const |
|
override |