-
Notifications
You must be signed in to change notification settings - Fork 0
/
agfilesystem.h
48 lines (32 loc) · 1.37 KB
/
agfilesystem.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
#ifndef AGFILESYSTEM_H
#define AGFILESYSTEM_H
#include "aderperviewvideo.h"
#include "agprocessthread.h"
#include <QFileSystemModel>
#include <QFileSystemWatcher>
#include <QGraphicsItem>
class AGFileSystem: public QObject
{
Q_OBJECT
void recursiveFirstFile(QModelIndex parentIndex);
void loadClips(AGProcessAndThread *process, QFileInfo fileInfo);
void loadItem(AGProcessAndThread *process, QFileInfo fileInfo, bool isNewFile);
QList<AGProcessAndThread *> processes;
QStringList excludedFilesFromWatch;
public:
AGFileSystem(QObject *parent = nullptr);
void loadFilesAndFolders(QDir dir, AGProcessAndThread *process);
QFileSystemWatcher *fileSystemWatcher;
bool processStopped = false;
private slots:
void onFileChanged(const QString &path);
void onDirectoryChanged(const QString &path);
public slots:
void onStopThreadProcess();
void onFileWatch(QString folderFileName, bool on, bool triggerFileChanged = false);
signals:
void addItem(bool changed, QString parentName, QString mediaType, QFileInfo fileInfo = QFileInfo(), int duration = 0, int clipIn = 0, int clipOut = 0, QString tag = "");
void deleteItem(bool changed, QString mediaType, QFileInfo fileInfo, int clipIn = -1, QString tagName = "");
void fileChanged(QFileInfo fileInfo);
};
#endif // AGFILESYSTEM_H