-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatastructnamedelegate.h
27 lines (23 loc) · 1.13 KB
/
datastructnamedelegate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// ******************************************************
// * copyright (C) 2017 by Reinhardt Behm/[email protected]
// * All Rights reserved
// * created 11/29/2017 by behm
// ******************************************************
#ifndef DATASTRUCTNAMEDELEGATE_H
#define DATASTRUCTNAMEDELEGATE_H
class DataStructNameDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
DataStructNameDelegate(QObject *parent);
~DataStructNameDelegate();
// QAbstractItemDelegate interface
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
// QStyledItemDelegate interface
virtual QString displayText(const QVariant &value, const QLocale &locale) const;
};
#endif // DATASTRUCTNAMEDELEGATE_H