KItemViews
kextendableitemdelegate.h
22 * This delegate makes it possible to display an arbitrary QWidget ("extender") that spans all columns below a line of items.
25 * It is your responsibility to devise a way to trigger extension and contraction of items, by calling
26 * extendItem() and contractItem(). You can e.g. reimplement itemActivated() and similar functions.
65 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
95 virtual void updateExtenderGeometry(QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const;
104 * This signal indicates that the @p extender belonging to @p index has emitted the destroyed() signal.
110 * Reimplement this function to fine-tune the position of the extender. @p option.rect will be a rectangle
111 * that is as wide as the viewport and as high as the usual item height plus the extender size hint's height.
115 QRect extenderRect(QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const;
118 * The pixmap that is displayed to extend an item. @p pixmap must have the same size as the pixmap in setContractPixmap.
This delegate makes it possible to display an arbitrary QWidget ("extender") that spans all columns b...
Definition kextendableitemdelegate.h:41
void extenderDestroyed(QWidget *extender, const QModelIndex &index)
This signal indicates that the extender belonging to index has emitted the destroyed() signal.
void extenderCreated(QWidget *extender, const QModelIndex &index)
This signal indicates that the item at index was extended with extender.
Q_SIGNALSQ_SIGNALS
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const const override
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const const override
UserRole
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:12 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:03:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.