24 #ifndef DIGIKAM_RATING_SEARCH_UTILITIES_H
25 #define DIGIKAM_RATING_SEARCH_UTILITIES_H
29 #include <QAbstractListModel>
30 #include <QItemDelegate>
45 class RatingComboBoxModel;
46 class RatingComboBoxWidget;
170 int rowCount(
const QModelIndex& parent)
const override;
171 QVariant
data(
const QModelIndex&
index,
int role)
const override;
172 QModelIndex
index(
int row,
int column = 0,
const QModelIndex& parent = QModelIndex())
const override;
194 QSize
sizeHint(
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
195 void paint(QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index)
const override;
199 void drawRating(QPainter* painter,
const QRect& rect,
int rating,
bool selectable)
const;
Definition: comboboxutilities.h:130
Definition: ratingsearchutilities.h:187
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: ratingsearchutilities.cpp:87
RatingComboBoxDelegate(QObject *const parent=nullptr)
Definition: ratingsearchutilities.cpp:82
void drawRating(QPainter *painter, const QRect &rect, int rating, bool selectable) const
Definition: ratingsearchutilities.cpp:134
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: ratingsearchutilities.cpp:105
Definition: ratingsearchutilities.h:154
QList< RatingComboBox::RatingValue > m_entries
Definition: ratingsearchutilities.h:180
int rowCount(const QModelIndex &parent) const override
Definition: ratingsearchutilities.cpp:174
RatingComboBoxModel(QObject *const parent=nullptr)
Definition: ratingsearchutilities.cpp:165
QModelIndex index(int row, int column=0, const QModelIndex &parent=QModelIndex()) const override
Definition: ratingsearchutilities.cpp:231
QVariant ratingValueToDisplay(RatingComboBox::RatingValue value) const
Definition: ratingsearchutilities.cpp:203
QModelIndex indexForRatingValue(RatingComboBox::RatingValue value) const
Definition: ratingsearchutilities.cpp:243
CustomRoles
Definition: ratingsearchutilities.h:160
@ RatingRole
Definition: ratingsearchutilities.h:161
QVariant data(const QModelIndex &index, int role) const override
Definition: ratingsearchutilities.cpp:184
Definition: ratingsearchutilities.h:49
void currentValueChanged(const QModelIndex ¤t, const QModelIndex &previous)
Definition: ratingsearchutilities.cpp:435
void setRatingValue(RatingValue value)
Definition: ratingsearchutilities.cpp:416
RatingValue
Definition: ratingsearchutilities.h:59
@ Rating5
Definition: ratingsearchutilities.h:71
@ Null
Definition: ratingsearchutilities.h:64
@ Rating1
Definition: ratingsearchutilities.h:67
@ NoRating
Definition: ratingsearchutilities.h:65
@ Rating4
Definition: ratingsearchutilities.h:70
@ Rating2
Definition: ratingsearchutilities.h:68
@ Rating0
Definition: ratingsearchutilities.h:66
@ Rating3
Definition: ratingsearchutilities.h:69
RatingValue ratingValue() const
Definition: ratingsearchutilities.cpp:430
RatingComboBoxModel * m_model
Definition: ratingsearchutilities.h:92
RatingComboBoxWidget * m_ratingWidget
Definition: ratingsearchutilities.h:93
void ratingWidgetChanged(int)
Definition: ratingsearchutilities.cpp:451
void ratingValueChanged(int value)
RatingComboBox(QWidget *const parent=nullptr)
Definition: ratingsearchutilities.cpp:387
Definition: ratingsearchutilities.h:103
RatingStarDrawer()
Definition: ratingsearchutilities.cpp:54
QSize m_starPolygonSize
Definition: ratingsearchutilities.h:113
QPolygon m_starPolygon
Definition: ratingsearchutilities.h:112
QRect drawStarPolygons(QPainter *p, int numberOfStars) const
Definition: ratingsearchutilities.cpp:60
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: datefolderview.cpp:43