Add itemTYpe for QetGraphicsTableItem and QetGraphicsHeaderItem

This commit is contained in:
Claveau Joshua
2020-02-21 08:55:35 +01:00
parent 43baed69db
commit 2a29b4b240
3 changed files with 21 additions and 11 deletions

View File

@@ -25,4 +25,8 @@ part rectangle + 1109
part dynamic text field + 1110
###QetGraphicsHandlerItem###
QetGraphicsHandlerItem = 1200
QetGraphicsHandlerItem + 1200
###VIEW ITEMS###
QetGraphicsTableItem + 1300
QetGraphicsHeaderItem + 1301

View File

@@ -31,6 +31,9 @@ class QetGraphicsHeaderItem : public QGraphicsObject
public:
QetGraphicsHeaderItem(QGraphicsItem *parent = nullptr);
enum { Type = UserType + 1301 };
int type() const override { return Type; }
void setModel(QAbstractItemModel *model);
QAbstractItemModel *model() const;
void reset();

View File

@@ -33,6 +33,9 @@ class QetGraphicsTableItem : public QetGraphicsItem
QetGraphicsTableItem(QGraphicsItem *parent= nullptr);
virtual ~QetGraphicsTableItem() override;
enum { Type = UserType + 1300 };
int type() const override { return Type; }
void setModel(QAbstractItemModel *model);
QAbstractItemModel *model() const;
void reset();