ToolBar.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Copyright 2015 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <QToolBar>
  5. class QAction;
  6. namespace Core
  7. {
  8. enum class State;
  9. }
  10. class ToolBar final : public QToolBar
  11. {
  12. Q_OBJECT
  13. public:
  14. explicit ToolBar(QWidget* parent = nullptr);
  15. void closeEvent(QCloseEvent*) override;
  16. signals:
  17. void OpenPressed();
  18. void RefreshPressed();
  19. void PlayPressed();
  20. void PausePressed();
  21. void StopPressed();
  22. void FullScreenPressed();
  23. void ScreenShotPressed();
  24. void SettingsPressed();
  25. void ControllersPressed();
  26. void GraphicsPressed();
  27. void StepPressed();
  28. void StepOverPressed();
  29. void StepOutPressed();
  30. void SkipPressed();
  31. void ShowPCPressed();
  32. void SetPCPressed();
  33. private:
  34. void OnEmulationStateChanged(Core::State state);
  35. void OnDebugModeToggled(bool enabled);
  36. void MakeActions();
  37. void UpdateIcons();
  38. void UpdatePausePlayButtonState(bool playing_state);
  39. QAction* m_open_action;
  40. QAction* m_refresh_action;
  41. QAction* m_pause_play_action;
  42. QAction* m_stop_action;
  43. QAction* m_fullscreen_action;
  44. QAction* m_screenshot_action;
  45. QAction* m_config_action;
  46. QAction* m_controllers_action;
  47. QAction* m_graphics_action;
  48. QAction* m_step_action;
  49. QAction* m_step_over_action;
  50. QAction* m_step_out_action;
  51. QAction* m_skip_action;
  52. QAction* m_show_pc_action;
  53. QAction* m_set_pc_action;
  54. };