MainToolbar.h 1.3 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 <QToolBar>
  11. #include <AzQtComponents/Components/Widgets/SpinBox.h>
  12. #endif
  13. class EditorWindow;
  14. class NewElementToolbarSection;
  15. class CoordinateSystemToolbarSection;
  16. class CanvasSizeToolbarSection;
  17. class QLabel;
  18. class MainToolbar
  19. : public QToolBar
  20. {
  21. Q_OBJECT
  22. public:
  23. explicit MainToolbar(EditorWindow* parent);
  24. NewElementToolbarSection* GetNewElementToolbarSection()
  25. {
  26. return m_newElementToolbarSection.get();
  27. }
  28. CoordinateSystemToolbarSection* GetCoordinateSystemToolbarSection()
  29. {
  30. return m_coordinateSystemToolbarSection.get();
  31. }
  32. CanvasSizeToolbarSection* GetCanvasSizeToolbarSection()
  33. {
  34. return m_canvasSizeToolbarSection.get();
  35. }
  36. void SetZoomPercent(float zoomPercent);
  37. private:
  38. std::unique_ptr<NewElementToolbarSection> m_newElementToolbarSection;
  39. std::unique_ptr<CoordinateSystemToolbarSection> m_coordinateSystemToolbarSection;
  40. std::unique_ptr<CanvasSizeToolbarSection> m_canvasSizeToolbarSection;
  41. AzQtComponents::DoubleSpinBox* m_zoomFactorSpinBox;
  42. };