KItemViews
kcategorydrawer.cpp
43void KCategoryDrawer::drawCategory(const QModelIndex &index, int /*sortRole*/, const QStyleOption &option, QPainter *painter) const
48 const QString category = index.model()->data(index, KCategorizedSortFilterProxyModel::CategoryDisplayRole).toString();
100 const int height = fontMetrics.height() + 8 + 8; // Kirigami.Units.largeSpacing + smallSpacing * 2
124void KCategoryDrawer::mouseButtonReleased(const QModelIndex &, const QRect &, QMouseEvent *event)
134void KCategoryDrawer::mouseButtonDoubleClicked(const QModelIndex &, const QRect &, QMouseEvent *event)
@ CategoryDisplayRole
This role is used for asking the category to a given index.
Definition kcategorizedsortfilterproxymodel.h:42
Item view for listing items in a categorized fashion optionally.
Definition kcategorizedview.h:69
virtual void mouseButtonPressed(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event)
Method called when the mouse button has been pressed.
Definition kcategorydrawer.cpp:119
virtual void mouseLeft(const QModelIndex &index, const QRect &blockRect)
Method called when the mouse button has left this block.
Definition kcategorydrawer.cpp:139
virtual void mouseButtonReleased(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event)
Method called when the mouse button has been released.
Definition kcategorydrawer.cpp:124
virtual int categoryHeight(const QModelIndex &index, const QStyleOption &option) const
Definition kcategorydrawer.cpp:92
virtual void mouseButtonDoubleClicked(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event)
Method called when the mouse button has been double clicked.
Definition kcategorydrawer.cpp:134
virtual void mouseMoved(const QModelIndex &index, const QRect &blockRect, QMouseEvent *event)
Method called when the mouse has been moved.
Definition kcategorydrawer.cpp:129
virtual void drawCategory(const QModelIndex &index, int sortRole, const QStyleOption &option, QPainter *painter) const
This method purpose is to draw a category represented by the given.
Definition kcategorydrawer.cpp:43
virtual QVariant data(const QModelIndex &index, int role) const const=0
QFont font()
void setAlphaF(float alpha)
void setBold(bool enable)
int height() const const
int horizontalAdvance(QChar ch) const const
const QAbstractItemModel * model() const const
Antialiasing
void drawRect(const QRect &rectangle)
void drawText(const QPoint &position, const QString &text)
void restore()
void save()
void setBrush(Qt::BrushStyle style)
void setFont(const QFont &font)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
int left() const const
int right() const const
void setHeight(int height)
void setLeft(int x)
void setRight(int x)
void setTop(int y)
int top() const const
AlignLeft
NoPen
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.