summaryrefslogtreecommitdiffstats
path: root/sigtools/PluginTreeDelegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'sigtools/PluginTreeDelegate.h')
-rw-r--r--sigtools/PluginTreeDelegate.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/sigtools/PluginTreeDelegate.h b/sigtools/PluginTreeDelegate.h
index 25c7181f..7e38cd51 100644
--- a/sigtools/PluginTreeDelegate.h
+++ b/sigtools/PluginTreeDelegate.h
@@ -21,25 +21,33 @@
// Sigtools includes
#include "Global.h"
-// Qt includes
-#include <QtGui/QAbstractItemDelegate>
+// KDE includes
+#include <kwidgetitemdelegate.h>
+
+// Forward declarations
+class QPushButton;
+class KCategorizedView;
namespace Sigtools
{
-// Forward declarations
class PluginTree;
-class SIGTOOLS_NO_EXPORT PluginTreeDelegate : public QAbstractItemDelegate
+class SIGTOOLS_NO_EXPORT PluginTreeDelegate : public KWidgetItemDelegate
{
Q_OBJECT
public:
- PluginTreeDelegate(PluginTree* parent);
+ PluginTreeDelegate(KCategorizedView* view, PluginTree* tree);
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
+ protected:
+ QList<QWidget*> createItemWidgets() const;
+ void updateItemWidgets(const QList<QWidget*> widgets, const QStyleOptionViewItem& option, const QPersistentModelIndex& index) const;
+ private slots:
+ void aboutClicked();
private:
- PluginTree* m_view;
+ QPushButton* m_about;
};
}