Olive
Public Slots | Public Member Functions | List of all members
MenuHelper Class Reference

#include <menuhelper.h>

Inheritance diagram for MenuHelper:

Public Slots

void toggle_bool_action ()
 Sets a QAction's Boolean reference to the opposite of its current value. More...
 
void set_titlesafe_from_menu ()
 Set Title/Action Safe Area from QAction. More...
 
void set_autoscroll ()
 Set Autoscroll setting from QAction. More...
 
void menu_click_button ()
 Clicks a QPushButton referenced by a QAction when triggered. More...
 
void set_timecode_view ()
 Sets the current timecode setting. More...
 
void open_recent_from_menu ()
 Calls open_recent() in Olive::Global using the index from a QAction. More...
 

Public Member Functions

void make_new_menu (QMenu *parent)
 Creates a menu of new items that can be created. More...
 
void make_inout_menu (QMenu *parent)
 Creates a menu of options for working with in/out points. More...
 
void make_clip_functions_menu (QMenu *parent)
 Creates a menu of clip functions. More...
 
void make_edit_functions_menu (QMenu *parent)
 Creates standard edit menu (cut, copy, paste, etc.) More...
 
void set_bool_action_checked (QAction *a)
 Sets the checked state of a menu item based on a Boolean variable. More...
 
void set_int_action_checked (QAction *a, const int &i)
 Sets the checked state of a menu item based on an integer variable. More...
 
void set_button_action_checked (QAction *a)
 Sets the checked state of a menu item based on a QPushButton. More...
 

Member Function Documentation

◆ make_clip_functions_menu()

void MenuHelper::make_clip_functions_menu ( QMenu *  parent)

Creates a menu of clip functions.

Adds a set of clip functions including:

  • Add Default Transition
  • Link/Unlink
  • Enable/Disable
  • Nest
Parameters
parentThe menu to add items to.

◆ make_edit_functions_menu()

void MenuHelper::make_edit_functions_menu ( QMenu *  parent)

Creates standard edit menu (cut, copy, paste, etc.)

Parameters
parentThe menu to add items to.

◆ make_inout_menu()

void MenuHelper::make_inout_menu ( QMenu *  parent)

Creates a menu of options for working with in/out points.

Adds a set of options for working with sequence/footage in/out points, e.g. setting in/out points, clearing in/out points, etc.

Parameters
parentThe menu to add items to.

◆ make_new_menu()

void MenuHelper::make_new_menu ( QMenu *  parent)

Creates a menu of new items that can be created.

Adds the full set of creatable items to a QMenu (e.g. new project, new sequence, new folder, etc.)

Parameters
parentThe menu to add items to.

◆ menu_click_button

void MenuHelper::menu_click_button ( )
slot

Clicks a QPushButton referenced by a QAction when triggered.

Some menu items function largely as a proxy to a QPushButton. Assuming the QAction's data variable is a pointer to a QPushButton, this triggers a click() event on that QPushButton.

◆ open_recent_from_menu

void MenuHelper::open_recent_from_menu ( )
slot

Calls open_recent() in Olive::Global using the index from a QAction.

Assumes the sender() is a QAction with an integer as its data variable. The data variable is an index of the internal auto-recovery project list.

◆ set_autoscroll

void MenuHelper::set_autoscroll ( )
slot

Set Autoscroll setting from QAction.

Assumes the sender() is a QAction with an integer as its data variable. The data variable should be AUTOSCROLL_NO_SCROLL, AUTOSCROLL_PAGE_SCROLL (default) or AUTOSCROLL_SMOOTH_SCROLL.

◆ set_bool_action_checked()

void MenuHelper::set_bool_action_checked ( QAction *  a)

Sets the checked state of a menu item based on a Boolean variable.

Many menu items simply toggle a Boolean variable. This is a convenience function, assuming the QAction's data variable is a pointer to a Boolean variable, that sets the checked state of the QAction to the enabled state of the Boolean. Used heavily in functions like toolMenu_About_To_Be_Shown()

Parameters
aThe QAction to set the checked state of.

◆ set_button_action_checked()

void MenuHelper::set_button_action_checked ( QAction *  a)

Sets the checked state of a menu item based on a QPushButton.

Some menu items function largely as a proxy to a QPushButton. Assuming the QAction's data variable is a pointer to a QPushButton, this sets a QAction's checked state to the checked state of the QPushButton.

Parameters
a

◆ set_int_action_checked()

void MenuHelper::set_int_action_checked ( QAction *  a,
const int &  i 
)

Sets the checked state of a menu item based on an integer variable.

Many menu items simply set a variable to a particular integer. This is a convenience function, assuming the QAction's data variable is an integer to set a variable to, that sets the checked state of the QAction to whether the QAction's integer equals the integer variable. Used heavily in functions like viewMenu_About_To_Be_Shown()

Parameters
aThe QAction to set the checked state of
iThe integer variable to compare the QAction's integer to

◆ set_timecode_view

void MenuHelper::set_timecode_view ( )
slot

Sets the current timecode setting.

Assumes the sender() is a QAction with an integer as its data variable. The data variable should be AUTOSCROLL_NO_AUTOSCROLL, AUTOSCROLL_PAGE_AUTOSCROLL (default) or AUTOSCROLL_SMOOTH_AUTOSCROLL.

◆ set_titlesafe_from_menu

void MenuHelper::set_titlesafe_from_menu ( )
slot

Set Title/Action Safe Area from QAction.

A receiver for several Title/Action Safe Area setting items. Assumes the sender() is a QAction with a data variable as a double. The double can be the following values:

  • NaN (qSNaN()) - Disable Title/Action Safe Area
  • 0 - Enable Title/Action Safe Area, default aspect ratio (match current active Sequence's aspect ratio).
  • Negative Value - Enable Title/Action Safe Area, any negative number assumes a custom aspect ratio. Will ask the user to enter an aspect ratio and will use the result.
  • Positive Value - Enable Title/Action Safe Area, use value as the aspect ratio.

◆ toggle_bool_action

void MenuHelper::toggle_bool_action ( )
slot

Sets a QAction's Boolean reference to the opposite of its current value.

Many menu items simply toggle a Boolean variable. This is a convenience function, assuming the QAction's data variable is a pointer to a Boolean variable, that sets the Boolean variable to the opposite of its current value.


The documentation for this class was generated from the following files: