Ref T472, allow to pass already existing values for model parsing

* list to map: toDbKeyValueMap
* categories can also be passed, hence the categories can be seen in model views
This commit is contained in:
Klaus Basan
2019-02-19 23:54:14 +01:00
committed by Mat Sutcliffe
parent 7a2ed1433d
commit 9cee34f4cc
7 changed files with 53 additions and 12 deletions

View File

@@ -16,6 +16,7 @@
#include "blackmisc/jsonexception.h"
#include <QJsonArray>
#include <QSet>
#include <QMap>
#include <QString>
namespace BlackMisc
@@ -48,6 +49,9 @@ namespace BlackMisc
//! All keys as set
QSet<KEYTYPE> toDbKeySet() const;
//! As map with DB key/object
QMap<KEYTYPE, OBJ> toDbKeyValueMap() const;
//! All keys as string set (also integer keys will be converted to string)
QSet<QString> toDbKeyStringSet() const;