src/job_editor_widget/jobpropertydelegate.h

Go to the documentation of this file.
00001 #ifndef JOBPROPERTYDELEGATE_H
00002 #define JOBPROPERTYDELEGATE_H
00003 
00010 #include "jobpropertymodel.h"
00011 #include "jobpropertyitem.h"
00012 #include <QtGui/QItemDelegate>
00013 #include <QEvent>
00014 
00018 class JobPropertyDelegate: public QItemDelegate
00019 {
00020     Q_OBJECT;
00021 
00022     public:
00023         JobPropertyDelegate(QObject *parent);
00024         virtual ~JobPropertyDelegate();
00025 
00026         virtual bool eventFilter(QObject *object, QEvent *event);
00027 
00028 
00029         virtual void paint(QPainter *painter, const QStyleOptionViewItem &option,
00030                            const QModelIndex &index) const;
00031 
00032         virtual QSize sizeHint(const QStyleOptionViewItem &option,
00033                                const QModelIndex &index) const;
00034 
00035         virtual QWidget *createEditor(QWidget *parent,
00036                                       const QStyleOptionViewItem &option,
00037                                       const QModelIndex &index) const;
00038 
00039         virtual void setEditorData(QWidget *editor,
00040                                    const QModelIndex &index) const;
00041 
00042         virtual void setModelData(QWidget *editor,
00043                                   QAbstractItemModel *model,
00044                                   const QModelIndex &index) const;
00045 
00046         virtual void updateEditorGeometry(QWidget *editor,
00047                                           const QStyleOptionViewItem &option,
00048                                           const QModelIndex &index) const;
00049 
00050     signals:
00054         void editorOpened();
00058         void editorClosed();
00059     public slots:
00060         void sync();
00061         void slotDestroyed(QObject *object);
00062         void onCustomContextMenuRequested(const QPoint & pos);
00063 
00064     private:
00065         bool m_syncing;
00066         mutable QObject *m_lastEdited;
00067 
00068 
00069 };
00070 
00071 #endif // JOBPROPERTYDELEGATE_H

Generated on Mon Mar 16 18:46:05 2009 for QCJM by  doxygen 1.5.4