QXRD  0.11.16
qcepsettingssaver.h
Go to the documentation of this file.
1 #ifndef QCEPSETTINGSSAVER_H
2 #define QCEPSETTINGSSAVER_H
3 
4 #include "qcepmacros.h"
5 #include <QObject>
6 #include <QTimer>
7 #include <QMutex>
8 #include <QDateTime>
9 
10 #include "qcepproperty-ptr.h"
11 
12 class QcepSettingsSaver : public QObject
13 {
14  Q_OBJECT
15 public:
16  explicit QcepSettingsSaver(QObject *owner);
18 
19  void changed(QcepProperty *prop = NULL);
20 
21 public slots:
22  void start();
23  void performSave();
24  void printMessage(QString msg, QDateTime ts=QDateTime::currentDateTime());
25 
26 private:
27  QMutex m_Mutex;
28  QObject *m_Owner;
29  QAtomicInt m_ChangeCount;
30  QTimer m_Timer;
32 };
33 
34 #endif // QCEPSETTINGSSAVER_H
QAtomicInt m_ChangeCount
void printMessage(QString msg, QDateTime ts=QDateTime::currentDateTime())
void changed(QcepProperty *prop=NULL)
QcepSettingsSaver(QObject *owner)