FactDev  0.1
textareadelegate.h
1 #ifndef TEXTAREADELEGATE_H
2 #define TEXTAREADELEGATE_H
3 
4 #include <QItemDelegate>
5 #include <QTextEdit>
6 
7 namespace Gui {
8 namespace Widgets {
9 namespace Delegates {
10 
16 class TextareaDelegate : public QItemDelegate
17 {
18  Q_OBJECT
19 
20 public:
25  TextareaDelegate(QWidget* parent=0);
26 
32  void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
33 
42  void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &) const;
43 
53  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const;
54 
62  void setEditorData(QWidget *editor, const QModelIndex &index) const;
63 };
64 
65 }
66 }
67 }
68 #endif // TEXTAREADELEGATE_H
The TextareaDelegate class.
Definition: textareadelegate.h:16
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const
TextareaDelegate::createEditor Return a QTextEdit specified by index item defined by the parent widge...
Definition: textareadelegate.cpp:12
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &) const
TextareaDelegate::updateEditorGeometry Update the editor for the item specified by index according to...
Definition: textareadelegate.cpp:29
TextareaDelegate(QWidget *parent=0)
TextareaDelegate::TextareaDelegate.
Definition: textareadelegate.cpp:7
void setEditorData(QWidget *editor, const QModelIndex &index) const
TextareaDelegate::setEditorData Sets the data to be displayed and edited by the editor from the data ...
Definition: textareadelegate.cpp:20
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
TextareaDelegate::setModelData Sets the data model from content in editor.
Definition: textareadelegate.cpp:37