27 lines
946 B
C++
27 lines
946 B
C++
#ifndef ATTRIBUTETABLEDELEGATE_H
|
|
#define ATTRIBUTETABLEDELEGATE_H
|
|
|
|
#include <QStyledItemDelegate>
|
|
#include <QTableView>
|
|
|
|
class AttributeTableDelegate : public QStyledItemDelegate
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit AttributeTableDelegate(QTableView* view, QObject* parent = nullptr);
|
|
~AttributeTableDelegate();
|
|
|
|
/*QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,const QModelIndex &index) const override;
|
|
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
|
|
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
|
|
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;*/
|
|
|
|
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
|
|
|
private:
|
|
QTableView* m_tableView;
|
|
};
|
|
|
|
#endif //ATTRIBUTETABLEDELEGATE_H
|