SelectDestinationDialog.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 <AzQtComponents/Components/StyledLineEdit.h>
  11. #include <QLabel>
  12. #include <QDialog>
  13. #include <QDialogButtonBox>
  14. #endif
  15. class StyledLineEdit;
  16. class QValidator;
  17. class DestinationDialogValidator;
  18. namespace Ui {
  19. class SelectDestinationDialog;
  20. }
  21. class SelectDestinationDialog
  22. : public QDialog
  23. {
  24. Q_OBJECT
  25. public:
  26. SelectDestinationDialog(QString message, QWidget* parent = nullptr, QString suggestedDestination = QString());
  27. ~SelectDestinationDialog();
  28. Q_SIGNALS:
  29. void GoBack();
  30. void DoCopyFiles();
  31. void DoMoveFiles();
  32. void BrowseDestinationPath(QLineEdit* destinationLineEdit);
  33. void Cancel();
  34. void UpdateImportButtonState(bool enabled);
  35. void SetDestinationDirectory(QString destinationDirectory);
  36. public Q_SLOTS:
  37. void accept();
  38. void reject();
  39. void ShowMessage();
  40. void OnBrowseDestinationFilePath();
  41. void ValidatePath();
  42. private:
  43. void UpdateMessage(QString message);
  44. void InitializeButtons();
  45. void SetPreviousOrSuggestedDestinationDirectory(QString suggestedDestination);
  46. QString DestinationDirectory() const;
  47. QScopedPointer<Ui::SelectDestinationDialog> m_ui;
  48. DestinationDialogValidator* m_validator;
  49. };