PCManFM-Qt
bulkrename.h
1 /*
2  Copyright (C) 2017 Pedram Pourang (Tsu Jan) <tsujan2000@gmail.com>
3 
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 2 of the License, or
7  (at your option) any later version.
8 
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.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18 
19 #ifndef PCMANFM_BULKRENAME_H
20 #define PCMANFM_BULKRENAME_H
21 
22 #include "ui_bulk-rename.h"
23 #include <QDialog>
24 
25 #include <libfm-qt/core/fileinfo.h>
26 
27 namespace PCManFM {
28 
29 class BulkRenameDialog : public QDialog {
30 Q_OBJECT
31 
32 public:
33  explicit BulkRenameDialog(QWidget* parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
34 
35  QString getBaseName() const {
36  return ui.lineEdit->text();
37  }
38  int getStart() const {
39  return ui.spinBox->value();
40  }
41 
42 protected:
43  virtual void showEvent(QShowEvent* event) override;
44 
45 private:
46  Ui::BulkRenameDialog ui;
47 };
48 
49 class BulkRenamer {
50 public:
51  BulkRenamer(const Fm::FileInfoList& files, QWidget* parent = nullptr);
52  ~BulkRenamer();
53 };
54 
55 }
56 
57 #endif // PCMANFM_BULKRENAME_H
Definition: bulkrename.h:29
Definition: bulkrename.h:49