#ifndef ENUMERATIONS_H #define ENUMERATIONS_H #include #include #include #include class Enumerations { public: Enumerations(); enum item_type { EIT_UNKNOWN = 0, EIT_ISSUE, EIT_TIME_ENTRY, EIT_DOCUMENT, }; struct enumeration { int id; int position; QString name; enum item_type item_type; QString field_name; }; struct enumeration get ( int enumeration_id ); QHash> get ( enum item_type item_type ); void set ( QJsonArray json_array ); private: QHash id2enumeration; QHash >> itemType2enumeration; //QHash name2enumeration; void add ( QJsonObject json_enumeration ); void clear(); }; #endif // ENUMERATIONS_H