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 #ifndef QmitkPropertyDelegate_h
00019 #define QmitkPropertyDelegate_h
00020
00022 #include "mitkBaseProperty.h"
00023
00025 #include <QStyledItemDelegate>
00026
00028
00034 class QMITK_EXPORT QmitkPropertyDelegate : public QStyledItemDelegate
00035 {
00036 Q_OBJECT
00037
00038 public:
00042 QmitkPropertyDelegate(QObject *parent = 0);
00043
00047 void paint(QPainter *painter, const QStyleOptionViewItem &option
00048 , const QModelIndex &index) const;
00049
00053 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option
00054 , const QModelIndex &index) const;
00055
00059 void setEditorData(QWidget *editor, const QModelIndex &index) const;
00060
00064 void setModelData(QWidget *editor, QAbstractItemModel* model
00065 , const QModelIndex &index) const;
00066
00070 void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
00071
00072 protected:
00073
00074 bool eventFilter( QObject *o, QEvent *e );
00075
00076 private slots:
00080 void commitAndCloseEditor();
00081 void showColorDialog();
00082 void ComboBoxCurrentIndexChanged ( int index ) ;
00083 void SpinBoxValueChanged ( const QString& value ) ;
00084
00085 };
00086
00087 #endif