NewLevelDialog.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 <QScopedPointer>
  11. #include <QAbstractButton>
  12. #include <QDialog>
  13. #endif
  14. namespace Ui {
  15. class CNewLevelDialog;
  16. }
  17. class CNewLevelDialog
  18. : public QDialog
  19. {
  20. Q_OBJECT
  21. public:
  22. CNewLevelDialog(QWidget* pParent = nullptr);
  23. ~CNewLevelDialog();
  24. QString GetLevel() const;
  25. bool ValidateLevel();
  26. QString GetTemplateName() const;
  27. protected:
  28. void UpdateData(bool fromUi = true);
  29. void OnInitDialog();
  30. void ReloadLevelFolder();
  31. void showEvent(QShowEvent* event) override;
  32. QString GetLevelsFolder() const;
  33. void InitTemplateListWidget() const;
  34. protected slots:
  35. void OnLevelNameChange();
  36. void OnClearButtonClicked();
  37. void PopupAssetPicker();
  38. void OnStartup();
  39. public:
  40. QString m_level;
  41. QString m_levelFolders;
  42. QScopedPointer<Ui::CNewLevelDialog> ui;
  43. bool m_initialized;
  44. };