diff options
author | Kris Moore <kris@pcbsd.org> | 2014-09-04 11:42:13 -0400 |
---|---|---|
committer | Kris Moore <kris@pcbsd.org> | 2014-09-04 11:42:13 -0400 |
commit | 71737f70949bd25f9aa8bc4e7d03039ba83c6cb1 (patch) | |
tree | ab29e864d1ae59d10cc6875af9541e3ad306b2fb /lumina-fm/FODialog.h | |
parent | Initial commit (diff) | |
download | lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.gz lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.bz2 lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.zip |
Initial import of the lumina code from pcbsd git repo
Diffstat (limited to 'lumina-fm/FODialog.h')
-rw-r--r-- | lumina-fm/FODialog.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/lumina-fm/FODialog.h b/lumina-fm/FODialog.h new file mode 100644 index 00000000..e823fe2e --- /dev/null +++ b/lumina-fm/FODialog.h @@ -0,0 +1,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); //recursive function for fetching all "child" files/dirs (dirs last) + QString newFileName(QString path); + QStringList removeItem(QString path); + QStringList copyItem(QString oldpath, QString newpath); + +private slots: + void slotStartOperations(); + void on_push_stop_clicked(); +}; + +#endif |