Pimcommon
configurepluginstreewidgetdelegate.cpp
20void ConfigurePluginsTreeWidgetDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
31 const QString description = index.data(ConfigurePluginsListWidget::PluginItemData::Description).toString();
61 checkboxOption.rect = QApplication::style()->subElementRect(QStyle::SE_ItemViewItemCheckIndicator, &option);
75 const QSize checkboxSize = QApplication::style()->sizeFromContents(QStyle::CT_CheckBox, nullptr, QSize(), nullptr);
79 const QRect line1Rect(rect.left() + 5 + checkboxSize.width(), rect.top(), rect.width(), fontMetrics.height());
86 const QRect line2Rect(rect.left() + 5 + checkboxSize.width(), rect.top() + fontMetrics.height(), rect.width(), fontMetrics.height());
92QSize ConfigurePluginsTreeWidgetDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
97 const QString description = index.data(ConfigurePluginsListWidget::PluginItemData::Description).toString();
106 const int width = qMax(fontMetrics.horizontalAdvance(index.data(Qt::DisplayRole).toString()), widthDescription);
QStyle * style()
int pointSize() const const
void setItalic(bool enable)
void setPointSize(int pointSize)
QVariant data(int role) const const
bool isValid() const const
void drawText(const QPoint &position, const QString &text)
void restore()
void save()
void setFont(const QFont &font)
void setPen(Qt::PenStyle style)
int left() const const
int top() const const
int width() const const
int width() const const
bool isEmpty() const const
CT_CheckBox
CE_CheckBox
PE_PanelItemViewItem
State_Enabled
SE_ItemViewItemCheckIndicator
virtual void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
virtual QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &contentsSize, const QWidget *widget) const const=0
virtual QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const const=0
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const const override
AlignLeft
CheckState
DisplayRole
bool isValid() const const
int toInt(bool *ok) const const
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.