2015-04-22 19:33:53 +02:00
|
|
|
#ifndef RENAMEFILESDIALOG_H
|
|
|
|
#define RENAMEFILESDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QDir>
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
2015-09-06 15:41:17 +02:00
|
|
|
QT_FORWARD_DECLARE_CLASS(QItemSelection)
|
2015-04-22 19:33:53 +02:00
|
|
|
|
|
|
|
namespace RenamingUtility {
|
|
|
|
class RemamingEngine;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace QtGui {
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class RenameFilesDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class JavaScriptHighlighter;
|
|
|
|
|
|
|
|
class RenameFilesDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(QString directory READ directory WRITE setDirectory)
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit RenameFilesDialog(QWidget *parent = nullptr);
|
|
|
|
~RenameFilesDialog();
|
|
|
|
|
|
|
|
QString directory() const;
|
|
|
|
void setDirectory(const QString &directory);
|
|
|
|
|
2016-01-09 03:38:58 +01:00
|
|
|
protected:
|
|
|
|
bool event(QEvent *event);
|
|
|
|
|
2015-04-22 19:33:53 +02:00
|
|
|
private slots:
|
|
|
|
void showScriptFileSelectionDlg();
|
|
|
|
void startGeneratingPreview();
|
|
|
|
void startApplyChangings();
|
|
|
|
void showPreviewProgress(int itemsProcessed, int errorsOccured);
|
|
|
|
void showPreviewResults();
|
|
|
|
void showChangsingsResults();
|
2016-04-21 23:55:22 +02:00
|
|
|
void currentItemSelected(const QItemSelection &selected, const QItemSelection &deselected);
|
|
|
|
void previewItemSelected(const QItemSelection &selected, const QItemSelection &deselected);
|
2015-04-22 19:33:53 +02:00
|
|
|
void pasteScriptFromFile(const QString &fileName);
|
|
|
|
void pasteScriptFromClipboard();
|
|
|
|
void pasteDefaultExampleScript();
|
|
|
|
void showTreeViewContextMenu();
|
|
|
|
void showSelectScriptFileDlg();
|
|
|
|
void abortClose();
|
|
|
|
void toggleScriptSource();
|
2016-05-06 22:48:11 +02:00
|
|
|
void setScriptModified(bool scriptModified);
|
2015-04-22 19:33:53 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::unique_ptr<Ui::RenameFilesDialog> m_ui;
|
|
|
|
JavaScriptHighlighter *m_highlighter;
|
|
|
|
RenamingUtility::RemamingEngine *m_engine;
|
|
|
|
int m_itemsProcessed;
|
|
|
|
int m_errorsOccured;
|
|
|
|
bool m_changingSelection;
|
2016-05-06 22:48:11 +02:00
|
|
|
bool m_scriptModified;
|
2015-04-22 19:33:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // RENAMEFILESDIALOG_H
|