Better type conversion custom event attributes

This commit is contained in:
GriffinR
2022-10-18 19:52:35 -04:00
parent 8e6585bbb2
commit 4c3a508534
7 changed files with 160 additions and 167 deletions

View File

@@ -12,11 +12,15 @@ public:
explicit CustomAttributesTable(Event *event, QWidget *parent = nullptr);
~CustomAttributesTable();
static const QMap<QString, QJsonValue> getAttributes(QTableWidget * table);
static QJsonValue pickType(QWidget * parent, bool * ok = nullptr);
static void addAttribute(QTableWidget * table, QString key, QJsonValue value, bool isNew = false);
static bool deleteSelectedAttributes(QTableWidget * table);
private:
Event *event;
QTableWidget *table;
void resizeVertically();
QMap<QString, QString> getTableFields();
};
#endif // CUSTOMATTRIBUTESTABLE_H