v2.0.0
Loading...
Searching...
No Matches
fiff_file_sharer.h
Go to the documentation of this file.
1//=============================================================================================================
34
35#ifndef FIFF_FILE_SHARER_H
36#define FIFF_FILE_SHARER_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "fiff_io.h"
43
44//=============================================================================================================
45// QT INCLUDES
46//=============================================================================================================
47
48#include <QFileSystemWatcher>
49
50//=============================================================================================================
51// DEFINE NAMESPACE FIFFLIB
52//=============================================================================================================
53
54namespace FIFFLIB
55{
56
57//=============================================================================================================
63class FIFFSHARED_EXPORT FiffFileSharer : public QObject
64{
65 Q_OBJECT
66public:
67
68 //=========================================================================================================
73
74 //=========================================================================================================
80 FiffFileSharer(const QString& sDirName);
81
82 //=========================================================================================================
88 void copyRealtimeFile(const QString &sSourcePath);
89
90 //=========================================================================================================
94 void initWatcher();
95
96private:
97
98 //=========================================================================================================
104 bool initSharedDirectory();
105
106 //=========================================================================================================
110 void clearSharedDirectory();
111
112 //=========================================================================================================
119 void onDirectoryChanged(const QString &sPath);
120
121 //=========================================================================================================
128 void onFileChanged(const QString &sPath);
129
130 QFileSystemWatcher m_fileWatcher;
131
132 QString m_sDirectory;
133 int m_iFileIndex;
134
135signals:
136
137 //=========================================================================================================
143 void newFileAtPath(const QString& sPath);
144
145};
146} //namespace
147
148#endif // FIFF_FILE_SHARER_H
#define FIFFSHARED_EXPORT
Definition fiff_global.h:52
Definition of a generic Fiff IO interface.
FIFF file I/O and data structures (raw, epochs, evoked, covariance, forward).
void newFileAtPath(const QString &sPath)
void copyRealtimeFile(const QString &sSourcePath)