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