Changeset 115 in pacpusframework for trunk/include/Pacpus/PacpusTools
- Timestamp:
- Jun 25, 2013, 11:37:38 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/Pacpus/PacpusTools/PeriodicWorker.h
r106 r115 19 19 #include <Pacpus/PacpusTools/AsyncWorkerBase.h> 20 20 21 22 21 class QTimer; 23 22 24 23 namespace pacpus 25 24 { 26 /** PeriodicWorker 27 * @brief A simple base class for periodic worker. 28 * 29 * @example 30 * class MyWorker 31 * : public PeriodicWorkder 32 * { 33 * public: 34 * void doWork() { std::cout << "Hey, I'm working!" << std::endl; } 35 * }; 36 * 37 * // Do its work every second. 38 * MyWorker worker; 39 * worker.startWork(1000); 40 */ 41 class PACPUSTOOLS_API PeriodicWorker 42 : public AsyncWorkerBase 43 { 25 /// @brief A simple base class for periodic worker. 26 /// 27 /// @example 28 /// To use the PeriodicWorker, simply inherit from this class when creating your worker. 29 /// ~~~ 30 /// class MyWorker 31 /// : public PeriodicWorkder 32 /// { 33 /// public: 34 /// void doWork() { std::cout << "Hey, I'm working!" << std::endl; } 35 /// }; 36 /// 37 /// // Do its work every second. 38 /// MyWorker worker; 39 /// worker.startWork(1000); 40 /// ~~~ 41 class PACPUSTOOLS_API PeriodicWorker 42 : public AsyncWorkerBase 43 { 44 44 Q_OBJECT 45 45 public:
Note:
See TracChangeset
for help on using the changeset viewer.