#ifndef TAGITEM_H #define TAGITEM_H #include "sqlitebackend.h" #include class TagItem : public QGraphicsSimpleTextItem { public: TagItem(const Tag &tag); TagItem() : valid(false) {}; enum { TagItemType = UserType + 1 }; int type() const override { return TagItemType; } bool isValid() { return valid; } void tagUpdated(const Tag &tag); Tag tag() { return m_tag; } protected: QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) override; private: Tag m_tag; bool valid; }; #endif // TAGITEM_H