-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfileActionPerformer.h
61 lines (43 loc) · 1.02 KB
/
fileActionPerformer.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef ACTIONPERFOMER_H
#define ACTIONPERFOMER_H
#include <QObject>
#include <QList>
class ActionSaver;
class ActionLoader;
class QString;
class QTimer;
class FileActionPerformer : public QObject
{
Q_OBJECT
public:
FileActionPerformer();
~FileActionPerformer();
bool isSaved() const { return mIsStartSave; }
bool isLoaded() const { return mIsStartLoad; }
bool isWork() const { return (isSaved() || isLoaded()); }
QString currentFileName() const { return mFileName; }
void startSave(const int &freq
, const int &numOfDOF
, const QString &fileName);
void writeData(const QList<int> &data);
void stopSave();
void startLoad(const QString &fileName);
QList<int> data();
bool isFileEnd() const;
bool isFileCorrect() const;
void stopLoad();
signals:
void onReadyLoad();
private slots:
void isTime() { mIsTime = true; }
private:
bool mIsStartSave;
bool mIsStartLoad;
bool mIsTime;
QString mFileName;
int mFreq;
QTimer *mTimer;
ActionSaver *mSaver;
ActionLoader *mLoader;
};
#endif // ACTIONPERFOMER_H