ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
shutter.h
Go to the documentation of this file.
1 
9 #ifndef SHUTTER_WDG_H
10 #define SHUTTER_WDG_H
11 
12 #include "fcf/gui/wdglib/device.h"
13 
14 #include <QWidget>
15 #include <QObject>
16 #include <azmq/socket.hpp>
17 #include <azmq/message.hpp>
18 #include <rad/mal/subscriber.hpp>
19 #include <rad/mal/utils.hpp>
20 
21 class QLabel;
22 class QCheckBox;
23 class QComboBox;
24 class QSpinBox;
25 class QPalette;
26 
27 
28 namespace Ui {
29  class ShutterWdg;
30 }
31 
32 class ShutterWdg : public DeviceWdg
33 {
34  Q_OBJECT
35 
36 public:
37  explicit ShutterWdg(QWidget *parent = 0, std::string name = "undefined", int cmd_timeout = 60000);
38  virtual ~ShutterWdg();
39 
40  virtual void StartSubscription();
41  // std::string GetName();
42 // bool active();
43  //void Select();
44  //void Deselect();
45  //bool IsSelected();
46  void GetMessage(std::shared_ptr<::elt::mal::Mal> mal,
47  std::vector<std::shared_ptr<::fcfif::FcsUnion>>& setup_buffer,
48  bool ignoreChecked = false);
49  void SetMessage(const azmq::message_vector& msg);
50  virtual void GetSubordinatedDevices(QStringList& dev_list);
51  virtual void UpdateData(QList<QVariant>& data_list);
52  virtual std::vector<std::string> GetDbAttributes(std::string server_id);
53  //virtual void Stop();
54  void SetEnable(bool flag);
55 
56 signals:
57  //void TriggerSetup(QString);
58 
59 
60 public slots:
61  //void SetActive(int index);
62  void SetIntensity(int value);
63  //void UpdateState(int state);
64  void UpdateSubstate(int substate);
65  void UpdateSpinner(int substate);
66  //void HandleSetupButton();
67 
68 
69 private:
70 
71  Ui::ShutterWdg *ui;
72  std::unique_ptr<rad::cii::Subscriber<fcfif::ShutterTopicUnion>> m_subscriber;
73  //std::string m_name;
74  //int m_cmd_timeout;
75 
76 };
77 
78 #endif // SHUTTER_WDG_H
void SetIntensity(int value)
Definition: shutter.cpp:108
virtual ~ShutterWdg()
Definition: shutter.cpp:54
Definition: shutter.h:32
void UpdateSpinner(int substate)
Definition: shutter.cpp:150
ShutterWdg(QWidget *parent=0, std::string name="undefined", int cmd_timeout=60000)
Definition: shutter.cpp:24
Definition: device.h:112
virtual void UpdateData(QList< QVariant > &data_list)
Definition: shutter.cpp:98
virtual void GetSubordinatedDevices(QStringList &dev_list)
Definition: shutter.cpp:186
void UpdateSubstate(int substate)
Definition: shutter.cpp:112
void GetMessage(std::shared_ptr<::elt::mal::Mal > mal, std::vector< std::shared_ptr<::fcfif::FcsUnion >> &setup_buffer, bool ignoreChecked=false)
Definition: shutter.cpp:78
virtual void StartSubscription()
Definition: shutter.cpp:191
void SetMessage(const azmq::message_vector &msg)
virtual std::vector< std::string > GetDbAttributes(std::string server_id)
Definition: shutter.cpp:177
WDGLIB DeviceWdg class declaration file.
void SetEnable(bool flag)
Definition: shutter.cpp:58