FilesAlreadyExistDialog.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #if !defined(Q_MOC_RUN)
  10. #include <QDialog>
  11. #endif
  12. class QTreeView;
  13. namespace Ui {
  14. class FilesAlreadyExistDialog;
  15. }
  16. class FilesAlreadyExistDialog
  17. : public QDialog
  18. {
  19. Q_OBJECT
  20. public:
  21. FilesAlreadyExistDialog(QString message, int numberOfFiles, QWidget* parent = nullptr);
  22. ~FilesAlreadyExistDialog();
  23. Q_SIGNALS:
  24. void OverWriteFiles();
  25. void KeepBothFiles();
  26. void SkipCurrentProcess();
  27. void CancelAllProcesses();
  28. void ApplyActionToAllFiles(bool result);
  29. public Q_SLOTS:
  30. void DoSkipCurrentProcess();
  31. void DoOverwrite();
  32. void DoKeepBoth();
  33. void DoApplyActionToAllFiles();
  34. private:
  35. void InitializeButtons();
  36. void UpdateMessage(QString message);
  37. void UpdateCheckBoxState(int numberOfFiles);
  38. void closeEvent(QCloseEvent* ev) override;
  39. QScopedPointer<Ui::FilesAlreadyExistDialog> m_ui;
  40. };