Torc  0.1
torcnetworkbuttonoutput.h
Go to the documentation of this file.
1 #ifndef TORCNETWORKBUTTONOUTPUT_H
2 #define TORCNETWORKBUTTONOUTPUT_H
3 
4 // Qt
5 #include <QTimer>
6 
7 // Torc
9 
11 {
12  Q_OBJECT
13 
14  public:
15  TorcNetworkButtonOutput(double Default, const QVariantMap &Details);
16  ~TorcNetworkButtonOutput() = default;
17 
18  QStringList GetDescription(void) override;
19  TorcOutput::Type GetType (void) override;
20 
21  signals:
22  void Pushed (void);
23 
24  public slots:
25  void SetValue (double Value) override;
26 
27  private slots:
28  void EndPulse (void);
29  void StartTimer (void);
30 
31  private:
32  QTimer m_pulseTimer;
33 };
34 
35 #endif // TORCNETWORKBUTTONOUTPUT_H
~TorcNetworkButtonOutput()=default
A network output that mimics the behaviour of a mechanical push button.
TorcOutput::Type GetType(void) override
QStringList GetDescription(void) override
void SetValue(double Value) override
Toggle the value of the button.
TorcNetworkButtonOutput(double Default, const QVariantMap &Details)