Subversion Repositories svn1-original

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
115 david 1
#ifndef TEXTDELEGATE_H
2
#define TEXTDELEGATE_H
3
 
4
#include <QItemDelegate>
5
#include <QModelIndex>
6
#include <QObject>
7
#include <QSize>
8
#include <QTextEdit>
9
 
10
class textDelegate : public QItemDelegate
11
{
12
Q_OBJECT
13
 
14
public:
15
    explicit textDelegate(int maxlen = 100, QObject *parent = 0);
16
    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
17
                          const QModelIndex &index) const;
18
 
19
    void setEditorData(QWidget *editor, const QModelIndex &index) const;
20
    void setModelData(QWidget *editor, QAbstractItemModel *model,
21
                      const QModelIndex &index) const;
22
 
23
    void updateEditorGeometry(QWidget *editor,
24
        const QStyleOptionViewItem &option, const QModelIndex &index) const;
25
 
26
    int max_len;
27
signals:
28
 
29
public slots:
30
 
31
};
32
 
33
#endif // TEXTDELEGATE_H