UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
table_editor_delegate.hpp
1 /* table_editor_delegate.hpp */
2 /* $Id$ */
3 #ifndef __table_editor_delegate_hpp
4 #define __table_editor_delegate_hpp
5 
6 #include <QItemDelegate>
7 
8 
10 namespace hds
11 {
12  class TableDoc;
13 
15  class TableEditorDelegate : public QItemDelegate
16  {
17  Q_OBJECT
18 
19  public:
20 
22  TableEditorDelegate(QObject *parent = 0);
23 
24  virtual ~TableEditorDelegate();
25 
26 
29  void attachDoc(TableDoc &doc);
30 
32  void detachDoc();
33 
34 
35  void paint(QPainter *painter, const QStyleOptionViewItem &option,
36  const QModelIndex &index) const;
37 
38  QSize sizeHint(const QStyleOptionViewItem &option,
39  const QModelIndex &index ) const;
40 
41  virtual QWidget* createEditor(QWidget *parent,
42  const QStyleOptionViewItem &option,
43  const QModelIndex &index ) const;
44 
45  virtual void setModelData(QWidget *editor,
46  QAbstractItemModel *model,
47  const QModelIndex &index) const;
48 
49  virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
50 
51  virtual void updateEditorGeometry(QWidget *editor,
52  const QStyleOptionViewItem &option,
53  const QModelIndex&) const;
54 
55  protected:
56 
59  };
60 }; // hds
61 
62 #endif /* table_editor_delegate.hpp */
Definition: table_doc.hpp:12
TableEditorDelegate(QObject *parent=0)
void attachDoc(TableDoc &doc)
TableDoc * mp_doc
Definition: table_editor_delegate.hpp:58
Definition: table_editor_delegate.hpp:15