From 3958fa914c8a524ed4b6a5b035b794e12708fa1d Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Thu, 1 Mar 2018 22:42:01 +0000 Subject: Import ultracopier_1.4.0.4.orig.tar.xz [dgit import orig ultracopier_1.4.0.4.orig.tar.xz] --- plugins/CopyEngine/Ultracopier/FileExistsDialog.h | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 plugins/CopyEngine/Ultracopier/FileExistsDialog.h (limited to 'plugins/CopyEngine/Ultracopier/FileExistsDialog.h') diff --git a/plugins/CopyEngine/Ultracopier/FileExistsDialog.h b/plugins/CopyEngine/Ultracopier/FileExistsDialog.h new file mode 100644 index 0000000..05ff7e0 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier/FileExistsDialog.h @@ -0,0 +1,60 @@ +/** \file fileExistsDialog.h +\brief Define the dialog when file already exists +\author alpha_one_x86 +\licence GPL3, see the file COPYING */ + +#include +#include +#include +#include +#include +#include +#include "Environment.h" + +#ifndef FILEEXISTSDIALOG_H +#define FILEEXISTSDIALOG_H + +namespace Ui { + class fileExistsDialog; +} + +/// \brief to show file exists dialog, and ask what do +class FileExistsDialog : public QDialog +{ + Q_OBJECT +public: + /// \brief create the object and pass all the informations to it + explicit FileExistsDialog(QWidget *parent,QFileInfo source,QFileInfo destination,std::string firstRenamingRule,std::string otherRenamingRule); + ~FileExistsDialog(); + /// \brief return the the always checkbox is checked + bool getAlways(); + /// \brief return the action clicked + FileExistsAction getAction(); + /// \brief return the new rename is case in manual renaming + std::string getNewName(); +protected: + void changeEvent(QEvent *e); +private slots: + void on_SuggestNewName_clicked(); + void on_Rename_clicked(); + void on_Overwrite_clicked(); + void on_Skip_clicked(); + void on_Cancel_clicked(); + void on_actionOverwrite_if_newer_triggered(); + void on_actionOverwrite_if_not_same_modification_date_triggered(); + void updateRenameButton(); + void on_checkBoxAlways_toggled(bool checked); + void on_lineEditNewName_textChanged(const QString &arg1); + void on_lineEditNewName_returnPressed(); + void on_actionOverwrite_if_older_triggered(); + void on_lineEditNewName_editingFinished(); +private: + Ui::fileExistsDialog *ui; + FileExistsAction action; + std::string oldName; + QFileInfo destinationInfo; + std::string firstRenamingRule; + std::string otherRenamingRule; +}; + +#endif // FILEEXISTSDIALOG_H -- cgit v1.2.3