Torc  0.1
torccontrols.h
Go to the documentation of this file.
1 #ifndef TORCCONTROLS_H
2 #define TORCCONTROLS_H
3 
4 
5 // Torc
6 #include "torchttpservice.h"
7 #include "torccentral.h"
8 #include "torccontrol.h"
9 
10 class TorcControls final : public QObject, public TorcHTTPService, public TorcDeviceHandler
11 {
12  Q_OBJECT
13  Q_CLASSINFO("Version", "1.0.0")
14  Q_CLASSINFO("GetControlList", "type=controls")
15  Q_PROPERTY(QVariantMap controlList READ GetControlList() NOTIFY ControlsChanged())
16  Q_PROPERTY(QStringList controlTypes READ GetControlTypes() CONSTANT)
17 
18  public:
19  TorcControls();
20  ~TorcControls() = default;
21 
22  static TorcControls* gControls;
23 
24  void Create (const QVariantMap &Details) override;
25  void Destroy (void) override;
26  void Validate (void);
27  void Graph (QByteArray* Data);
28  QString GetUIName (void) override;
29 
30  public slots:
31  // TorcHTTPService
32  void SubscriberDeleted (QObject *Subscriber);
33 
34  QVariantMap GetControlList (void);
35  QStringList GetControlTypes (void);
36 
37  signals:
38  void ControlsChanged (void);
39 
40  private:
41  QList<TorcControl*> controlList;
42  QStringList controlTypes;
43 };
44 
45 #endif // TORCCONTROLS_H
QStringList GetControlTypes(void)
void SubscriberDeleted(QObject *Subscriber)
QVariantMap GetControlList(void)
QVariantMap controlList
Definition: torccontrols.h:15
void ControlsChanged(void)