Olive
ui
menuhelper.h
1
/***
2
3
Olive - Non-Linear Video Editor
4
Copyright (C) 2019 Olive Team
5
6
This program is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19
***/
20
21
#ifndef MENUHELPER_H
22
#define MENUHELPER_H
23
24
#include <QObject>
25
#include <QMenu>
26
27
class
MenuHelper
:
public
QObject {
28
Q_OBJECT
29
public
:
40
void
make_new_menu
(QMenu* parent);
41
52
void
make_inout_menu
(QMenu* parent);
53
67
void
make_clip_functions_menu
(QMenu* parent);
68
76
void
make_edit_functions_menu
(QMenu* parent);
77
89
void
set_bool_action_checked
(QAction* a);
90
107
void
set_int_action_checked
(QAction* a,
const
int
& i);
108
117
void
set_button_action_checked
(QAction* a);
118
119
public
slots:
120
127
void
toggle_bool_action
();
128
140
void
set_titlesafe_from_menu
();
141
148
void
set_autoscroll
();
149
156
void
menu_click_button
();
157
164
void
set_timecode_view
();
165
172
void
open_recent_from_menu
();
173
174
private
slots:
175
176
177
};
178
179
namespace
Olive {
183
extern
MenuHelper
MenuHelper
;
184
}
185
186
#endif // MENUHELPER_H
MenuHelper::open_recent_from_menu
void open_recent_from_menu()
Calls open_recent() in Olive::Global using the index from a QAction.
Definition:
menuhelper.cpp:170
MenuHelper::set_bool_action_checked
void set_bool_action_checked(QAction *a)
Sets the checked state of a menu item based on a Boolean variable.
Definition:
menuhelper.cpp:72
MenuHelper::set_button_action_checked
void set_button_action_checked(QAction *a)
Sets the checked state of a menu item based on a QPushButton.
Definition:
menuhelper.cpp:86
MenuHelper::set_int_action_checked
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:79
MenuHelper::toggle_bool_action
void toggle_bool_action()
Sets a QAction's Boolean reference to the opposite of its current value.
Definition:
menuhelper.cpp:90
MenuHelper::make_new_menu
void make_new_menu(QMenu *parent)
Creates a menu of new items that can be created.
Definition:
menuhelper.cpp:38
MenuHelper::set_timecode_view
void set_timecode_view()
Sets the current timecode setting.
Definition:
menuhelper.cpp:164
MenuHelper::make_inout_menu
void make_inout_menu(QMenu *parent)
Creates a menu of options for working with in/out points.
Definition:
menuhelper.cpp:45
MenuHelper::make_edit_functions_menu
void make_edit_functions_menu(QMenu *parent)
Creates standard edit menu (cut, copy, paste, etc.)
Definition:
menuhelper.cpp:61
MenuHelper::menu_click_button
void menu_click_button()
Clicks a QPushButton referenced by a QAction when triggered.
Definition:
menuhelper.cpp:160
MenuHelper::set_autoscroll
void set_autoscroll()
Set Autoscroll setting from QAction.
Definition:
menuhelper.cpp:155
MenuHelper
Definition:
menuhelper.h:27
MenuHelper::make_clip_functions_menu
void make_clip_functions_menu(QMenu *parent)
Creates a menu of clip functions.
Definition:
menuhelper.cpp:54
MenuHelper::set_titlesafe_from_menu
void set_titlesafe_from_menu()
Set Title/Action Safe Area from QAction.
Definition:
menuhelper.cpp:97
Generated by
1.8.15