v2.0.0
Loading...
Searching...
No Matches
fiff_file_sharer.h
Go to the documentation of this file.
1//=============================================================================================================
17
18#ifndef FIFF_FILE_SHARER_H
19#define FIFF_FILE_SHARER_H
20
21//=============================================================================================================
22// INCLUDES
23//=============================================================================================================
24
25#include "fiff_io.h"
26
27//=============================================================================================================
28// QT INCLUDES
29//=============================================================================================================
30
31#include <QFileSystemWatcher>
32
33//=============================================================================================================
34// DEFINE NAMESPACE FIFFLIB
35//=============================================================================================================
36
37namespace FIFFLIB
38{
39
40//=============================================================================================================
46class FIFFSHARED_EXPORT FiffFileSharer : public QObject
47{
48 Q_OBJECT
49public:
50 //=========================================================================================================
55
56 //=========================================================================================================
62 FiffFileSharer(const QString& sDirName);
63
64 //=========================================================================================================
71 void copyRealtimeFile(const QString& sSourcePath);
72
73 //=========================================================================================================
77 void initWatcher();
78
79private:
80 //=========================================================================================================
86 bool initSharedDirectory();
87
88 //=========================================================================================================
92 void clearSharedDirectory();
93
94 //=========================================================================================================
100 void onDirectoryChanged(const QString& sPath);
101
102 QFileSystemWatcher m_fileWatcher;
103
104 QString m_sDirectory;
105 int m_iFileIndex;
106
107signals:
108
109 //=========================================================================================================
115 void newFileAtPath(const QString& sPath);
116};
117} //namespace
118
119#endif // FIFF_FILE_SHARER_H
#define FIFFSHARED_EXPORT
Definition fiff_global.h:44
High-level convenience reader/writer that loads a whole FIFF measurement file into FIFFLIB containers...
FIFF file I/O, in-memory data structures and high-level readers/writers.
void newFileAtPath(const QString &sPath)
void copyRealtimeFile(const QString &sSourcePath)