FormBrowseEditWidget.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 <FormLineEditWidget.h>
  11. #endif
  12. namespace O3DE::ProjectManager
  13. {
  14. class FormBrowseEditWidget
  15. : public FormLineEditWidget
  16. {
  17. Q_OBJECT
  18. public:
  19. explicit FormBrowseEditWidget(
  20. const QString& labelText,
  21. const QString& valueText,
  22. const QString& placeholderText,
  23. const QString& errorText,
  24. QWidget* parent = nullptr);
  25. explicit FormBrowseEditWidget(const QString& labelText, const QString& valueText = "", QWidget* parent = nullptr);
  26. explicit FormBrowseEditWidget(const QString& labelText = "", QWidget* parent = nullptr);
  27. ~FormBrowseEditWidget() = default;
  28. signals:
  29. void OnBrowse();
  30. protected:
  31. void keyPressEvent(QKeyEvent* event) override;
  32. protected slots:
  33. virtual void HandleBrowseButton() {};
  34. };
  35. } // namespace O3DE::ProjectManager