blob: 5d473178271f7dc1a8f23dc7f3ac05c6bc487873 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef SYNCUPDATER_H
#define SYNCUPDATER_H
#include <QTimer>
#include <QHostInfo>
#include "Core/CoreObject/coreobject.h"
#include "Database/Common/commonactions.h"
#include "TcpTasks/SyncClient/syncclient.h"
class SyncUpdater: public QObject
{
Q_OBJECT
public:
SyncUpdater(const QSharedPointer<CoreObject> &coreObject);
bool scheduleUpdater();
private:
QSharedPointer<CoreObject> _coreObject;
const int _graceTime_ms = 30000;
// update/ticker timer
QTimer _updaterTimer;
QTimer _syncTicker;
// index
int _syncIndex = 0;
private slots:
void onSyncTickerAction();
};
#endif // SYNCUPDATER_H
|