ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lamp.h
Go to the documentation of this file.
1 
9 #ifndef LAMP_WDG_H
10 #define LAMP_WDG_H
11 
12 #include "fcf/gui/wdglib/device.h"
13 #include <QWidget>
14 #include <QObject>
15 #include <rad/mal/subscriber.hpp>
16 #include <rad/mal/utils.hpp>
17 
18 class QLabel;
19 class QCheckBox;
20 class QComboBox;
21 class QSpinBox;
22 class QPalette;
23 
24 namespace Ui {
25  class LampWdg;
26 }
27 
28 class LampWdg : public DeviceWdg
29 {
30  Q_OBJECT
31 
32 public:
33  explicit LampWdg(QWidget *parent = 0, std::string name = "undefined", int cmd_timeout = 60000);
34  virtual ~LampWdg();
35 
36  virtual void StartSubscription();
37  void GetMessage(std::shared_ptr<::elt::mal::Mal> mal,
38  std::vector<std::shared_ptr<::fcfif::FcsUnion>>& setup_buffer,
39  bool ignoreChecked = false);
40  virtual void GetSubordinatedDevices(QStringList& dev_list);
41  virtual void UpdateData(QList<QVariant>& data_list);
42  virtual std::vector<std::string> GetDbAttributes(std::string server_id);
43  virtual void SetEnable(bool flag);
44 
45 signals:
46 
47 public slots:
48  void SetIntensity(double value);
49  void UpdateSubstate(int substate);
50  void UpdateSpinner(int substate);
51  void UpdateIntensity(double intensity);
52 
53 private:
54 
55  Ui::LampWdg* ui;
56  QList< QWidget* > m_widget_list;
57  QWidget* m_parent;
58  std::unique_ptr<rad::cii::Subscriber<fcfif::LampTopicUnion>> m_subscriber;
59 
60 };
61 
62 #endif // LAMP_WDG_H
Definition: lamp.h:28
Definition: device.h:112
void UpdateSubstate(int substate)
Definition: lamp.cpp:115
virtual std::vector< std::string > GetDbAttributes(std::string server_id)
Definition: lamp.cpp:81
void SetIntensity(double value)
Definition: lamp.cpp:111
virtual void StartSubscription()
Definition: lamp.cpp:236
virtual void UpdateData(QList< QVariant > &data_list)
Definition: lamp.cpp:96
void UpdateIntensity(double intensity)
Definition: lamp.cpp:199
LampWdg(QWidget *parent=0, std::string name="undefined", int cmd_timeout=60000)
Definition: lamp.cpp:20
WDGLIB DeviceWdg class declaration file.
void UpdateSpinner(int substate)
Definition: lamp.cpp:166
virtual ~LampWdg()
Definition: lamp.cpp:57
void GetMessage(std::shared_ptr<::elt::mal::Mal > mal, std::vector< std::shared_ptr<::fcfif::FcsUnion >> &setup_buffer, bool ignoreChecked=false)
Definition: lamp.cpp:61
virtual void GetSubordinatedDevices(QStringList &dev_list)
Definition: lamp.cpp:231
virtual void SetEnable(bool flag)
Definition: lamp.cpp:203