Menu.hpp
1 #pragma once
2 #include <score/plugins/StringFactoryKey.hpp>
3 
4 #include <score_lib_base_export.h>
5 
6 #include <limits>
7 
8 class QMenu;
9 namespace score
10 {
14 class SCORE_LIB_BASE_EXPORT Menu
15 {
16 public:
17  struct is_toplevel
18  {
19  };
20  Menu(QMenu* menu, StringKey<Menu> m);
21 
22  Menu(
23  QMenu* menu, StringKey<Menu> m, is_toplevel,
24  int c = std::numeric_limits<int>::max() - 1);
25 
26  StringKey<Menu> key() const;
27 
28  QMenu* menu() const;
29 
30  int column() const;
31 
33  bool toplevel() const;
34 
35 private:
36  QMenu* m_impl{};
37  StringKey<Menu> m_key;
38  int m_col = std::numeric_limits<int>::max() - 1;
39  bool m_toplevel{};
40 };
41 
42 struct SCORE_LIB_BASE_EXPORT Menus
43 {
44  static StringKey<Menu> File();
45  static StringKey<Menu> Export();
46  static StringKey<Menu> Edit();
47  static StringKey<Menu> Object();
48  static StringKey<Menu> Play();
49  static StringKey<Menu> View();
50  static StringKey<Menu> Windows();
51  static StringKey<Menu> Scripts();
52  static StringKey<Menu> Settings();
53  static StringKey<Menu> About();
54 };
55 }
Definition: StringFactoryKey.hpp:8
Represents a menu in the software.
Definition: Menu.hpp:15
Application-wide user settings registering and handling.
Definition: lib/core/settings/Settings.hpp:42
The main display of the application.
Definition: lib/core/view/Window.hpp:41
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: Menu.hpp:18
Definition: Menu.hpp:43