KDEUI
kwidgetitemdelegate.h
Go to the documentation of this file.
00001 00022 #ifndef KWIDGETITEMDELEGATE_H 00023 #define KWIDGETITEMDELEGATE_H 00024 00025 #include <QtCore/QEvent> 00026 #include <QtCore/QList> 00027 #include <QtCore/QPersistentModelIndex> 00028 #include <QtGui/QAbstractItemDelegate> 00029 00030 #include <kdeui_export.h> 00031 00032 class QObject; 00033 class QPainter; 00034 class QStyleOption; 00035 class QStyleOptionViewItem; 00036 class QAbstractItemView; 00037 class QItemSelection; 00038 00039 class KWidgetItemDelegatePrivate; 00040 class KWidgetItemDelegatePool; 00041 00049 class KDEUI_EXPORT KWidgetItemDelegate : public QAbstractItemDelegate 00050 { 00051 Q_OBJECT 00052 00053 public: 00060 explicit KWidgetItemDelegate(QAbstractItemView *itemView, QObject *parent = 0); 00061 00065 virtual ~KWidgetItemDelegate(); 00066 00072 QAbstractItemView *itemView() const; 00073 00079 QPersistentModelIndex focusedIndex() const; 00080 00081 protected: 00099 virtual QList<QWidget*> createItemWidgets() const = 0; 00100 00114 virtual void updateItemWidgets(const QList<QWidget*> widgets, 00115 const QStyleOptionViewItem &option, 00116 const QPersistentModelIndex &index) const = 0; 00117 00131 #ifndef KDE_NO_DEPRECATED 00132 KDE_DEPRECATED void paintWidgets(QPainter *painter, const QStyleOptionViewItem &option, 00133 const QPersistentModelIndex &index) const; 00134 #endif 00135 00145 void setBlockedEventTypes(QWidget *widget, QList<QEvent::Type> types) const; 00146 00154 QList<QEvent::Type> blockedEventTypes(QWidget *widget) const; 00155 00156 private: 00157 //@cond PRIVATE 00158 friend class KWidgetItemDelegatePool; 00159 friend class KWidgetItemDelegateEventListener; 00160 KWidgetItemDelegatePrivate *const d; 00161 Q_PRIVATE_SLOT(d, void _k_slotRowsInserted(const QModelIndex&,int,int)) 00162 Q_PRIVATE_SLOT(d, void _k_slotRowsAboutToBeRemoved(const QModelIndex&,int,int)) 00163 Q_PRIVATE_SLOT(d, void _k_slotRowsRemoved(const QModelIndex&,int,int)) 00164 Q_PRIVATE_SLOT(d, void _k_slotDataChanged(const QModelIndex&,const QModelIndex&)) 00165 Q_PRIVATE_SLOT(d, void _k_slotLayoutChanged()) 00166 Q_PRIVATE_SLOT(d, void _k_slotModelReset()) 00167 Q_PRIVATE_SLOT(d, void _k_slotSelectionChanged(const QItemSelection&,const QItemSelection&)) 00168 //@endcond 00169 }; 00170 00171 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 17:58:01 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 17:58:01 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.