Olive
menuhelper.h
1 #ifndef MENUHELPER_H
2 #define MENUHELPER_H
3 
4 #include <QObject>
5 #include <QMenu>
6 
7 class MenuHelper : public QObject {
8  Q_OBJECT
9 public:
20  void make_new_menu(QMenu* parent);
21 
32  void make_inout_menu(QMenu* parent);
33 
47  void make_clip_functions_menu(QMenu* parent);
48 
56  void make_edit_functions_menu(QMenu* parent);
57 
69  void set_bool_action_checked(QAction* a);
70 
87  void set_int_action_checked(QAction* a, const int& i);
88 
97  void set_button_action_checked(QAction* a);
98 
99 public slots:
100 
107  void toggle_bool_action();
108 
121 
128  void set_autoscroll();
129 
136  void menu_click_button();
137 
144  void set_timecode_view();
145 
152  void open_recent_from_menu();
153 
154 private slots:
155 
156 
157 };
158 
159 namespace Olive {
163  extern MenuHelper MenuHelper;
164 }
165 
166 #endif // MENUHELPER_H
void open_recent_from_menu()
Calls open_recent() in Olive::Global using the index from a QAction.
Definition: menuhelper.cpp:150
void set_bool_action_checked(QAction *a)
Sets the checked state of a menu item based on a Boolean variable.
Definition: menuhelper.cpp:52
void set_button_action_checked(QAction *a)
Sets the checked state of a menu item based on a QPushButton.
Definition: menuhelper.cpp:66
void set_int_action_checked(QAction *a, const int &i)
Sets the checked state of a menu item based on an integer variable.
Definition: menuhelper.cpp:59
void toggle_bool_action()
Sets a QAction's Boolean reference to the opposite of its current value.
Definition: menuhelper.cpp:70
void make_new_menu(QMenu *parent)
Creates a menu of new items that can be created.
Definition: menuhelper.cpp:18
void set_timecode_view()
Sets the current timecode setting.
Definition: menuhelper.cpp:144
void make_inout_menu(QMenu *parent)
Creates a menu of options for working with in/out points.
Definition: menuhelper.cpp:25
void make_edit_functions_menu(QMenu *parent)
Creates standard edit menu (cut, copy, paste, etc.)
Definition: menuhelper.cpp:41
void menu_click_button()
Clicks a QPushButton referenced by a QAction when triggered.
Definition: menuhelper.cpp:140
void set_autoscroll()
Set Autoscroll setting from QAction.
Definition: menuhelper.cpp:135
Definition: menuhelper.h:7
void make_clip_functions_menu(QMenu *parent)
Creates a menu of clip functions.
Definition: menuhelper.cpp:34
void set_titlesafe_from_menu()
Set Title/Action Safe Area from QAction.
Definition: menuhelper.cpp:77