tageditor/gui/renamefilesdialog.h

70 lines
1.8 KiB
C
Raw Normal View History

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 {
2017-01-06 21:29:43 +01:00
class RenamingEngine;
2015-04-22 19:33:53 +02:00
}
namespace QtGui {
namespace Ui {
class RenameFilesDialog;
}
class JavaScriptHighlighter;
2018-03-07 01:18:01 +01:00
class RenameFilesDialog : public QDialog {
2015-04-22 19:33:53 +02:00
Q_OBJECT
Q_PROPERTY(QString directory READ directory WRITE setDirectory)
2018-03-07 01:18:01 +01:00
2015-04-22 19:33:53 +02:00
public:
explicit RenameFilesDialog(QWidget *parent = nullptr);
2019-06-01 12:45:12 +02:00
~RenameFilesDialog() override;
2018-03-07 01:18:01 +01:00
2015-04-22 19:33:53 +02:00
QString directory() const;
void setDirectory(const QString &directory);
2016-01-09 03:38:58 +01:00
protected:
2019-06-01 12:45:12 +02:00
bool event(QEvent *event) override;
2016-01-09 03:38:58 +01:00
2020-03-08 14:04:29 +01:00
private Q_SLOTS:
2015-04-22 19:33:53 +02:00
void showScriptFileSelectionDlg();
void startGeneratingPreview();
void startApplyChangings();
void showPreviewProgress(int itemsProcessed, int errorsOccured);
void showPreviewResults();
void showChangsingsResults();
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 pasteSimpleExampleScript();
void pasteAdvancedExampleScript();
void showTreeViewContextMenu(const QPoint &position);
2015-04-22 19:33:53 +02:00
void showSelectScriptFileDlg();
void abortClose();
void toggleScriptSource();
void setScriptModified(bool scriptModified);
2023-03-26 22:19:27 +02:00
void updateStyleSheet();
2015-04-22 19:33:53 +02:00
private:
std::unique_ptr<Ui::RenameFilesDialog> m_ui;
JavaScriptHighlighter *m_highlighter;
2017-01-06 21:29:43 +01:00
RenamingUtility::RenamingEngine *m_engine;
2015-04-22 19:33:53 +02:00
int m_itemsProcessed;
int m_errorsOccured;
bool m_changingSelection;
bool m_scriptModified;
2015-04-22 19:33:53 +02:00
};
2018-03-07 01:18:01 +01:00
} // namespace QtGui
2015-04-22 19:33:53 +02:00
#endif // RENAMEFILESDIALOG_H