#pragma once #include class FigmaLinks; class FigmaLinksModel; class FigmaDecoratorModel : public QIdentityProxyModel { Q_OBJECT Q_PROPERTY(FigmaLinks* figmaLinks READ getFigmaLinks WRITE setFigmaLinks NOTIFY figmaLinksChanged) public: static constexpr auto FigmaRole = Qt::UserRole + 100; explicit FigmaDecoratorModel(QObject *parent = nullptr); QHash roleNames() const override; QVariant data(const QModelIndex &proxyIndex, int role) const override; FigmaLinks* getFigmaLinks() const; void setFigmaLinks(FigmaLinks *figmaLinks); void setSourceModel(QAbstractItemModel *sourceModel) override; signals: void figmaLinksChanged(); private: std::optional m_titleRole; FigmaLinks* m_figmaLinks = nullptr; mutable QMap m_submodels; };