#ifndef CUSTOMATTRIBUTESTABLE_H #define CUSTOMATTRIBUTESTABLE_H #include "events.h" #include #include #include class CustomAttributesTable : public QFrame { Q_OBJECT public: explicit CustomAttributesTable(QWidget *parent = nullptr); ~CustomAttributesTable(); QMap getAttributes() const; void setAttributes(const QMap attributes); void addNewAttribute(const QString &key, QJsonValue value); void setDefaultAttribute(const QString &key, QJsonValue value); void unsetDefaultAttribute(const QString &key); QSet keys() const; QSet restrictedKeys() const; void setRestrictedKeys(const QSet keys); signals: void edited(); private: QTableWidget *table; QSet m_keys; QSet m_restrictedKeys; int addAttribute(const QString &key, QJsonValue value); void removeAttribute(const QString &key); bool deleteSelectedAttributes(); void resizeVertically(); }; #endif // CUSTOMATTRIBUTESTABLE_H