PCManFM-Qt
Loading...
Searching...
No Matches
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
27namespace PCManFM {
28
29class BulkRenameDialog : public QDialog {
30Q_OBJECT
31
32public:
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 bool getZeroPadding() const {
42 return ui.zeroBox->isChecked();
43 }
44 bool getRespectLocale() const {
45 return ui.localeBox->isChecked();
46 }
47
48protected:
49 virtual void showEvent(QShowEvent* event) override;
50
51private:
52 Ui::BulkRenameDialog ui;
53};
54
56public:
57 BulkRenamer(const Fm::FileInfoList& files, QWidget* parent = nullptr);
59};
60
61}
62
63#endif // PCMANFM_BULKRENAME_H
Definition: bulkrename.h:29
Definition: bulkrename.h:55