Files
oak-editor/app/project/projectimportmanager.h
T
itsmattkc 653709dc84 try to index media immediately on import
Since indexing is supplemental, it can be made a background task that can occur
at more or less any time. So we run it as soon as possible.
2020-01-17 03:58:29 +11:00

38 lines
706 B
C++

#ifndef PROJECTIMPORTMANAGER_H
#define PROJECTIMPORTMANAGER_H
#include <QFileInfoList>
#include <QUndoCommand>
#include "projectviewmodel.h"
#include "task/task.h"
class ProjectImportManager : public Task
{
Q_OBJECT
public:
ProjectImportManager(ProjectViewModel* model, Folder* folder, const QStringList& filenames);
const int& GetFileCount();
protected:
virtual void Action() override;
signals:
void ImportComplete(QUndoCommand* command);
private:
void Import(Folder* folder, const QFileInfoList &import, int& counter, QUndoCommand *parent_command);
ProjectViewModel* model_;
Folder* folder_;
QFileInfoList filenames_;
int file_count_;
};
#endif // PROJECTIMPORTMANAGER_H