diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-03-26 04:48:40 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-03-26 04:51:01 -0400 |
commit | 1d09c9f3bba82ae2a918765f645c7829027b4ac1 (patch) | |
tree | e56941fdff3e1064cd9c8eb8422e1371dc6d200c /sigtools/PluginTreeDelegate.cpp | |
parent | 0d642f3374d9be46fb49f7a3fa5e3707935aa0d9 (diff) | |
download | sigen-1d09c9f3bba82ae2a918765f645c7829027b4ac1.tar.gz sigen-1d09c9f3bba82ae2a918765f645c7829027b4ac1.tar.xz sigen-1d09c9f3bba82ae2a918765f645c7829027b4ac1.zip |
Emulate KPluginSelector, but we can't use it directly due to the factory nature of the plugin classes
Diffstat (limited to 'sigtools/PluginTreeDelegate.cpp')
-rw-r--r-- | sigtools/PluginTreeDelegate.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/sigtools/PluginTreeDelegate.cpp b/sigtools/PluginTreeDelegate.cpp index 013ed4df..bf039bc8 100644 --- a/sigtools/PluginTreeDelegate.cpp +++ b/sigtools/PluginTreeDelegate.cpp @@ -19,29 +19,34 @@ #include "PluginTreeDelegate.h" // Sigtools includes -#include "BaseModel.h" #include "PluginTree.h" -#include "PluginTreeModel.h" + +// KDE includes +#include <KCategorizedView> using namespace Sigtools; -PluginTreeDelegate::PluginTreeDelegate(PluginTree* parent) : - QAbstractItemDelegate(parent), - m_view(parent) +PluginTreeDelegate::PluginTreeDelegate(KCategorizedView* view, PluginTree* tree) : + KWidgetItemDelegate(view, tree) { } void PluginTreeDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { - PluginTreeModel* model = qobject_cast<PluginTreeModel*>(m_view->model()); - if (model) - model->getItem(index)->paint(painter, option); } QSize PluginTreeDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const { - PluginTreeModel* model = qobject_cast<PluginTreeModel*>(m_view->model()); - if (model) - return model->getItem(index)->sizeHint(option); - return QSize(); +} + +QList<QWidget*> PluginTreeDelegate::createItemWidgets() const +{ +} + +void PluginTreeDelegate::updateItemWidgets(const QList<QWidget*> widgets, const QStyleOptionViewItem& option, const QPersistentModelIndex& index) const +{ +} + +void PluginTreeDelegate::aboutClicked() +{ } |