1 // case - file manager for N900
2 // Copyright (C) 2010 Lukas Hrazky <lukkash@email.cz>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef FILEOPERATOR_H
19 #define FILEOPERATOR_H
23 #include "progressbar.h"
24 #include "operationthread.h"
27 typedef QList<QPair<OperationThread*, ProgressBar*> > OperationList;
29 class FileOperator : public QWidget {
33 FileOperator(QWidget *parent = 0);
35 void deleteFiles(const QFileInfoList &files);
36 void copyFiles(const QFileInfoList &files, QDir &destination);
37 void moveFiles(const QFileInfoList &files, QDir &destination);
40 void showErrorPrompt(OperationThread* op,
41 const QString &message,
42 const QString &fileName,
44 void showOverwritePrompt(OperationThread* op,
45 const QString &fileName,
46 const bool dirOverDir);
47 void showInputFilenamePrompt(OperationThread* op,
48 const QFileInfo &fileName,
49 const bool dirOverDir);
51 void remove(OperationThread* op);
53 void togglePauseOperation(ProgressBar* bar);
54 void abortOperation(ProgressBar* bar);
57 void initOperation(OperationThread *thread, ProgressBar *bar);
58 ProgressBar *get(OperationThread *op) const;
59 OperationThread *get(ProgressBar *bar) const;
62 QPixmap deleteIcon, inverseDeleteIcon, copyIcon, inverseCopyIcon, moveIcon, inverseMoveIcon;
65 #endif // FILEOPERATOR_H