Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef QXTITEMDELEGATE_P_H
00026 #define QXTITEMDELEGATE_P_H
00027
00028 #include "qxtpimpl.h"
00029 #include "qxtitemdelegate.h"
00030 #include <QPersistentModelIndex>
00031 #include <QBasicTimer>
00032 #include <QPointer>
00033 #include <QMultiHash>
00034
00035 QT_FORWARD_DECLARE_CLASS(QPainter)
00036 QT_FORWARD_DECLARE_CLASS(QTreeView)
00037
00038 class QxtItemDelegatePrivate : public QObject, public QxtPrivate<QxtItemDelegate>
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 QXT_DECLARE_PUBLIC(QxtItemDelegate);
00044 QxtItemDelegatePrivate();
00045
00046 void paintButton(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index, const QTreeView* view) const;
00047 void paintMenu(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index, const QTreeView* view) const;
00048 void paintProgress(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
00049 void setCurrentEditor(QWidget* editor, const QModelIndex& index) const;
00050
00051 bool textVisible;
00052 QString progressFormat;
00053 Qt::TextElideMode elide;
00054 Qxt::DecorationStyle style;
00055 typedef QPointer<QWidget> QWidgetPointer;
00056 mutable QWidgetPointer currentEditor;
00057 mutable QPersistentModelIndex currentEdited;
00058 mutable QMultiHash<QWidget*, QPersistentModelIndex> updatedItems;
00059 mutable QBasicTimer updateTimer;
00060
00061 protected:
00062 void timerEvent(QTimerEvent* event);
00063
00064 private Q_SLOTS:
00065 void viewDestroyed();
00066 void closeEditor(QWidget* editor);
00067 };
00068
00069 #endif // QXTITEMDELEGATE_P_H