Remoto - VFS: VFS_pulse.h Source File
Remoto - VFS
VFS_pulse.h
Go to the documentation of this file.
1 #ifndef VFS_PULSE_H
2 #define VFS_PULSE_H
3 
4 #include "VFS_base/VFS_node.h"
5 
6 class VFS_pulse : public VFS_node
7 {
8  Q_OBJECT
9 
10  public:
11  Q_INVOKABLE explicit VFS_pulse(int interval=1000);
12  virtual ~VFS_pulse();
13 
14  virtual bool isContainer();
15 
16  protected:
17  int _interval;
18  int _timerID;
19 
20  virtual void read(VFS_request *r);
21 
22  virtual void timerEvent(QTimerEvent *event);
23 
24  signals:
25 
26  public slots:
27 
28  protected slots:
29  void startPulse();
30  void stopPulse();
31 };
32 
33 #endif // VFS_PULSE_H
VFS_node is the base class from which all other VFS_node classes derive.
Definition: VFS_node.h:143
VFS_pulse provides an event pulse that can be subscribed to.
Definition: VFS_pulse.h:7
virtual void read(VFS_request *r)
Read the current time.
Definition: VFS_pulse.cpp:90
void startPulse()
Start generating pulses.
Definition: VFS_pulse.cpp:59
Q_INVOKABLE VFS_pulse(int interval=1000)
Definition: VFS_pulse.cpp:30
virtual ~VFS_pulse()
Definition: VFS_pulse.cpp:40
virtual bool isContainer()
A VFS_pulse node cannot contain children.
Definition: VFS_pulse.cpp:50
virtual void timerEvent(QTimerEvent *event)
When this timer event occurs, generate a VFS_request and emit it.
Definition: VFS_pulse.cpp:106
int _interval
The frequency of the pulse, in milliseconds.
Definition: VFS_pulse.h:17
void stopPulse()
Stop pulsing.
Definition: VFS_pulse.cpp:74
int _timerID
The timerID returned by QObject::startTimer()
Definition: VFS_pulse.h:18
The base class for all requests between nodes.
Definition: VFS_node.h:54