Plasma
delegate.cpp
Go to the documentation of this file.
84QRect DelegatePrivate::titleRect(const QStyleOptionViewItem &option, const QModelIndex &index) const
169QRect Delegate::rectAfterTitle(const QStyleOptionViewItem &option, const QModelIndex &index) const
173 QRect emptyRect(0, textRect.top(), option.rect.width() - textRect.width() - DelegatePrivate::ITEM_LEFT_MARGIN - DelegatePrivate::ITEM_RIGHT_MARGIN - option.decorationSize.width() - DelegatePrivate::ICON_TEXT_MARGIN, textRect.height());
188QRect Delegate::rectAfterSubTitle(const QStyleOptionViewItem &option, const QModelIndex &index) const
192 QRect emptyRect(0, textRect.top(), option.rect.width() - textRect.width() - DelegatePrivate::ITEM_LEFT_MARGIN - DelegatePrivate::ITEM_RIGHT_MARGIN - option.decorationSize.width() - DelegatePrivate::ICON_TEXT_MARGIN, textRect.height());
231 contentRect.adjusted(DelegatePrivate::ITEM_LEFT_MARGIN, DelegatePrivate::ITEM_TOP_MARGIN, -DelegatePrivate::ITEM_RIGHT_MARGIN, -DelegatePrivate::ITEM_BOTTOM_MARGIN));
232 decorationRect.moveTop(contentRect.top() + qMax(0, (contentRect.height() - decorationRect.height())) / 2);
255 const int delta = floor((qreal)(option.decorationSize.width() - DelegatePrivate::ACTION_ICON_SIZE) / 2.0);
335 const QColor gradientColor = KColorScheme(QPalette::Active).background(KColorScheme::NormalBackground).color();
QRect emptyRect(const QStyleOptionViewItem &option, const QModelIndex &index) const
Returns the empty area after both the title and the subtitle.
Definition delegate.cpp:207
QRect rectAfterSubTitle(const QStyleOptionViewItem &option, const QModelIndex &index) const
Returns the empty area after the subtitle.
Definition delegate.cpp:188
QRect rectAfterTitle(const QStyleOptionViewItem &option, const QModelIndex &index) const
Returns the empty area after the title.
Definition delegate.cpp:169
Q_INVOKABLE QColor color(ColorRole role) const
Returns the text color to be used by items resting on the background.
Definition theme.cpp:918
QPainterPath roundedRectangle(const QRectF &rect, qreal radius)
Returns a nicely rounded rectanglular path for painting.
Definition paintutils.cpp:159
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Jul 20 2023 00:00:00 by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Jul 20 2023 00:00:00 by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.