PreviewToolbar.h 766 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 "CanvasSizeToolbarSection.h"
  12. #endif
  13. class EditorWindow;
  14. class QResizeEvent;
  15. class PreviewToolbar
  16. : public QToolBar
  17. {
  18. Q_OBJECT
  19. public:
  20. explicit PreviewToolbar(EditorWindow* parent);
  21. void ViewportHasResized(QResizeEvent* ev);
  22. void UpdatePreviewCanvasScale(float scale);
  23. private:
  24. QPushButton* m_editButton;
  25. QLabel* m_viewportSizeLabel;
  26. QLabel* m_canvasScaleLabel;
  27. std::unique_ptr<CanvasSizeToolbarSection> m_canvasSizeToolbarSection;
  28. };