ModeToolbar.h 806 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #endif
  12. class EditorWindow;
  13. class QActionGroup;
  14. class QAction;
  15. class AlignToolbarSection;
  16. class ModeToolbar
  17. : public QToolBar
  18. {
  19. Q_OBJECT
  20. public:
  21. explicit ModeToolbar(EditorWindow* parent);
  22. void SetCheckedItem(int index);
  23. AlignToolbarSection* GetAlignToolbarSection()
  24. {
  25. return m_alignToolbarSection.get();
  26. }
  27. private:
  28. void AddModes(EditorWindow* parent);
  29. QActionGroup* m_group;
  30. QAction* m_previousAction;
  31. std::unique_ptr<AlignToolbarSection> m_alignToolbarSection;
  32. };