SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
SWGNamedEnum.h
Go to the documentation of this file.
1 
13 /*
14  * SWGNamedEnum.h
15  *
16  * Enumeration with name for values
17  */
18 
19 #ifndef SWGNamedEnum_H_
20 #define SWGNamedEnum_H_
21 
22 #include <QJsonObject>
23 
24 
25 #include <QString>
26 
27 #include "SWGObject.h"
28 #include "export.h"
29 
30 namespace SWGSDRangel {
31 
33 public:
34  SWGNamedEnum();
35  SWGNamedEnum(QString* json);
36  virtual ~SWGNamedEnum();
37  void init();
38  void cleanup();
39 
40  virtual QString asJson () override;
41  virtual QJsonObject* asJsonObject() override;
42  virtual void fromJsonObject(QJsonObject &json) override;
43  virtual SWGNamedEnum* fromJson(QString &jsonString) override;
44 
45  QString* getName();
46  void setName(QString* name);
47 
48  qint32 getValue();
49  void setValue(qint32 value);
50 
51 
52  virtual bool isSet() override;
53 
54 private:
55  QString* name;
57 
58  qint32 value;
60 
61 };
62 
63 }
64 
65 #endif /* SWGNamedEnum_H_ */
#define SWG_API
Definition: export.h:124
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
Definition: SWGHelpers.cpp:25