KItemViews
kextendableitemdelegate.cpp
70 // qDebug() << "Creating extender at " << ext << " for item " << index.model()->data(index,Qt::DisplayRole).toString();
124 if (persistentIndex.isValid() && q->receivers(SIGNAL(extenderDestroyed(QWidget *, QModelIndex))) != 0) {
152QSize KExtendableItemDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
170void KExtendableItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
195 const bool showExtensionIndicator = index.model()->data(index, ShowExtensionIndicatorRole).toBool();
250 // an extender is present - make two rectangles: one to paint the original item, one for the extender
284QRect KExtendableItemDelegate::extenderRect(QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const
314QSize KExtendableItemDelegatePrivate::maybeExtendedSize(const QStyleOptionViewItem &option, const QModelIndex &index) const
336 itemHeight = qMax(itemHeight, q->QStyledItemDelegate::sizeHint(option, neighborIndex).height());
339 // we only want to reserve vertical space, the horizontal extender layout is our private business.
344QModelIndex KExtendableItemDelegatePrivate::indexOfExtendedColumnInSameRow(const QModelIndex &index) const
362void KExtendableItemDelegate::updateExtenderGeometry(QWidget *extender, const QStyleOptionViewItem &option, const QModelIndex &index) const
This delegate makes it possible to display an arbitrary QWidget ("extender") that spans all columns b...
Definition kextendableitemdelegate.h:41
QPixmap contractPixmap()
Return the pixmap that is displayed to contract an item.
Definition kextendableitemdelegate.cpp:406
void contractItem(const QModelIndex &index)
Remove the extender of item at index from the view.
Definition kextendableitemdelegate.cpp:92
void contractAll()
Close all extenders and delete all extender widgets.
Definition kextendableitemdelegate.cpp:110
QPixmap extendPixmap()
Return the pixmap that is displayed to extend an item.
Definition kextendableitemdelegate.cpp:401
void setExtendPixmap(const QPixmap &pixmap)
The pixmap that is displayed to extend an item.
Definition kextendableitemdelegate.cpp:391
void setContractPixmap(const QPixmap &pixmap)
The pixmap that is displayed to contract an item.
Definition kextendableitemdelegate.cpp:396
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:284
bool isExtended(const QModelIndex &index) const
Return whether there is an extender that belongs to index.
Definition kextendableitemdelegate.cpp:147
KExtendableItemDelegate(QAbstractItemView *parent)
Create a new KExtendableItemDelegate that belongs to parent.
Definition kextendableitemdelegate.cpp:59
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:362
void extendItem(QWidget *extender, const QModelIndex &index)
Insert the extender for item at index into the view.
Definition kextendableitemdelegate.cpp:68
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Re-implemented for internal reasons.
Definition kextendableitemdelegate.cpp:170
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
Re-implemented for internal reasons.
Definition kextendableitemdelegate.cpp:152
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.
virtual int columnCount(const QModelIndex &parent) const const=0
virtual QVariant data(const QModelIndex &index, int role) const const=0
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
QModelIndex rootIndex() const const
virtual void setRootIndex(const QModelIndex &index)
QWidget * viewport() const const
QStyle * style()
bool isRightToLeft()
void clear()
T value(const Key &key) const const
int column() const const
bool isValid() const const
const QAbstractItemModel * model() const const
QModelIndex parent() const const
int row() const const
QModelIndex sibling(int row, int column) const const
T take(const Key &key)
QMultiHash< Key, T > & unite(const QHash< Key, T > &other)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
void destroyed(QObject *obj)
QObject * parent() const const
T qobject_cast(QObject *object)
int receivers(const char *signal) const const
void drawPixmap(const QPoint &point, const QPixmap &pixmap)
void restore()
void save()
bool isValid() const const
int bottom() const const
void setLeft(int x)
void setRight(int x)
void setTop(int y)
int height() const const
int & rwidth()
int width() const const
PE_PanelItemViewItem
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
virtual void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const const
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
Beginning
bool toBool() const const
void setGeometry(const QRect &)
void hide()
void setParent(QWidget *parent)
sizeHint
width
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.