KDEUI
kextendableitemdelegate.cpp
Go to the documentation of this file.
88 // kDebug() << "Creating extender at " << ext << " for item " << index.model()->data(index,Qt::DisplayRole).toString();
117 // kDebug() << "Collapse extender at " << extender << " for item " << index.model()->data(index,Qt::DisplayRole).toString();
178 QSize KExtendableItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
198 void KExtendableItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
223 const bool showExtensionIndicator = index.model()->data(index, ShowExtensionIndicatorRole).toBool();
278 //an extender is present - make two rectangles: one to paint the original item, one for the extender
314 QRect KExtendableItemDelegate::extenderRect(QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const
345 QSize KExtendableItemDelegate::Private::maybeExtendedSize(const QStyleOptionViewItem &option, const QModelIndex &index) const
367 itemHeight = qMax(itemHeight, q->QStyledItemDelegate::sizeHint(option, neighborIndex).height());
370 //we only want to reserve vertical space, the horizontal extender layout is our private business.
376 QModelIndex KExtendableItemDelegate::Private::indexOfExtendedColumnInSameRow(const QModelIndex &index) const
395 void KExtendableItemDelegate::updateExtenderGeometry(QWidget *extender, const QStyleOptionViewItem &option,
QPixmap extendPixmap()
Return the pixmap that is displayed to extend an item.
Definition: kextendableitemdelegate.cpp:440
void contractItem(const QModelIndex &index)
Remove the extender of item at index from the view.
Definition: kextendableitemdelegate.cpp:111
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Re-implemented for internal reasons.
Definition: kextendableitemdelegate.cpp:198
virtual void updateExtenderGeometry(QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const
Reimplement this function to adjust the internal geometry of the extender.
Definition: kextendableitemdelegate.cpp:395
bool isExtended(const QModelIndex &index) const
Return whether there is an extender that belongs to index.
Definition: kextendableitemdelegate.cpp:172
virtual ~KExtendableItemDelegate()
Definition: kextendableitemdelegate.cpp:80
Definition: kstandardshortcut.h:69
void contractAll()
Close all extenders and delete all extender widgets.
Definition: kextendableitemdelegate.cpp:130
QRect extenderRect(QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const
Reimplement this function to fine-tune the position of the extender.
Definition: kextendableitemdelegate.cpp:314
void setExtendPixmap(const QPixmap &pixmap)
The pixmap that is displayed to extend an item.
Definition: kextendableitemdelegate.cpp:428
void extendItem(QWidget *extender, const QModelIndex &index)
Insert the extender for item at index into the view.
Definition: kextendableitemdelegate.cpp:86
QPixmap contractPixmap()
Return the pixmap that is displayed to contract an item.
Definition: kextendableitemdelegate.cpp:446
KExtendableItemDelegate(QAbstractItemView *parent)
Create a new KExtendableItemDelegate that belongs to parent.
Definition: kextendableitemdelegate.cpp:71
void setContractPixmap(const QPixmap &pixmap)
The pixmap that is displayed to contract an item.
Definition: kextendableitemdelegate.cpp:434
void extenderCreated(QWidget *extender, const QModelIndex &index)
This signal indicates that the item at index was extended with extender.
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Re-implemented for internal reasons.
Definition: kextendableitemdelegate.cpp:178
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.