21 #ifndef TULIPITEMDELEGATE_H 22 #define TULIPITEMDELEGATE_H 25 #include <QStyledItemDelegate> 27 #include <tulip/TulipItemEditorCreators.h> 28 #include <tulip/TulipMetaTypes.h> 32 class TLP_QT_SCOPE TulipItemDelegate :
public QStyledItemDelegate {
35 QMap<int,TulipItemEditorCreator*> _creators;
37 QObject* _currentMonitoredChild;
38 QComboBox* _currentMonitoredCombo;
43 explicit TulipItemDelegate(QObject* parent=NULL);
44 virtual ~TulipItemDelegate();
47 void registerCreator(tlp::TulipItemEditorCreator*);
49 void unregisterCreator(tlp::TulipItemEditorCreator*);
52 void unregisterCreator();
55 tlp::TulipItemEditorCreator* creator()
const;
57 tlp::TulipItemEditorCreator* creator(
int)
const;
59 QWidget* createEditor(QWidget* parent,
const QStyleOptionViewItem& option,
const QModelIndex& index)
const;
60 void paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
61 QString displayText(
const QVariant &value,
const QLocale &locale)
const;
62 void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
63 void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index)
const;
64 QSize sizeHint(
const QStyleOptionViewItem &option,
const QModelIndex &index)
const;
66 bool eventFilter(QObject *
object, QEvent *event);
69 void comboDataChanged();
74 #include "cxx/TulipItemDelegate.cxx" 76 #endif // TULIPITEMDELEGATE_H
PropertyInterface describes the interface of a graph property.