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
|
//===========================================
// Lumina-DE source code
// Copyright (c) 2014, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
// This is the dialog for showing currently running file operations
//===========================================
#ifndef _LUMINA_FILE_MANAGER_FILE_OP_DIALOG_H
#define _LUMINA_FILE_MANAGER_FILE_OP_DIALOG_H
// Qt includes
#include <QDialog>
#include <QMessageBox>
#include <QStringList>
#include <QTimer>
#include <QFileInfo>
#include <QDir>
#include <QFile>
// libLumina includes
#include <LuminaXDG.h>
#include <LuminaUtils.h>
namespace Ui{
class FODialog;
};
class FODialog : public QDialog{
Q_OBJECT
public:
FODialog(QWidget *parent = 0);
~FODialog();
bool noerrors;
void setOverwrite(bool);
void RemoveFiles(QStringList paths);
void CopyFiles(QStringList oldPaths, QStringList newPaths); //same permissions as old files
void RestoreFiles(QStringList oldPaths, QStringList newPaths); //user/group rw permissions
void MoveFiles(QStringList oldPaths, QStringList newPaths); //no change in permissions
private:
Ui::FODialog *ui;
bool isRM, isCP, isRESTORE, isMV;
bool stopped;
int overwrite; // [-1= auto, 0= no overwrite, 1= overwrite]
QStringList ofiles, nfiles; //original/new files
QStringList subfiles(QString dirpath, bool dirsfirst = false); //recursive function for fetching all "child" files/dirs (dirs last by default)
QString newFileName(QString path);
QStringList removeItem(QString path, bool recursive = false);
QStringList copyItem(QString oldpath, QString newpath);
private slots:
void slotStartOperations();
void on_push_stop_clicked();
};
#endif
|