PCManFM-Qt
fileoperationdialog.h
1 /*
2 
3  Copyright (C) 2013 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 
21 #ifndef FM_FILEOPERATIONDIALOG_H
22 #define FM_FILEOPERATIONDIALOG_H
23 
24 #include "libfmqtglobals.h"
25 #include <QDialog>
26 #include <libfm/fm.h>
27 
28 namespace Ui {
29  class FileOperationDialog;
30 };
31 
32 namespace Fm {
33 
34 class FileOperation;
35 
36 class LIBFM_QT_API FileOperationDialog : public QDialog {
37 Q_OBJECT
38 public:
39  explicit FileOperationDialog(FileOperation* _operation);
40  virtual ~FileOperationDialog();
41 
42  void setSourceFiles(FmPathList* srcFiles);
43  void setDestPath(FmPath* dest);
44 
45  int ask(QString question, char* const* options);
46  int askRename(FmFileInfo* src, FmFileInfo* dest, QString& new_name);
47  FmJobErrorAction error(GError* err, FmJobErrorSeverity severity);
48  void setPrepared();
49  void setCurFile(QString cur_file);
50  void setPercent(unsigned int percent);
51  void setRemainingTime(unsigned int sec);
52 
53  virtual void reject();
54 
55 private:
56  Ui::FileOperationDialog* ui;
57  FileOperation* operation;
58  int defaultOption;
59 };
60 
61 }
62 
63 #endif // FM_FILEOPERATIONDIALOG_H
Definition: appchoosercombobox.cpp:26
Definition: appchooserdialog.h:28
Definition: fileoperationdialog.h:36
Definition: fileoperation.h:35