![]() |
Sayonara Player
|
#include <MenuTool.h>
This is the little button you often see near comboboxes
It opens up a menu when clicked. The actions in the menu a configurable.
Signals | |
| void | sig_open () |
| void | sig_new () |
| void | sig_undo () |
| void | sig_save () |
| void | sig_save_as () |
| void | sig_rename () |
| void | sig_delete () |
| void | sig_default () |
| void | sig_triggered (QPoint) |
Public Member Functions | |
| MenuToolButton (QWidget *parent=nullptr) | |
| void | register_action (QAction *action) |
| Use this to add custom actions. More... | |
| ContextMenuEntries | get_entries () const |
| get current visible entries in menu calls ContextMenu::get_entries() More... | |
| void | set_show_title (bool show_title) |
Public Slots | |
| void | show_action (ContextMenu::Entry entry, bool visible) |
| show/hide an action calls ContextMenu::show_action(ContextMenu::Entry entry, bool visible) More... | |
| void | show_actions (ContextMenuEntries options) |
| shows all actions specified in options. Hide every other action calls ContextMenu::show_actions(ContextMenuEntries options) More... | |
| void | show_all () |
| show all actions | |
Protected Member Functions | |
| virtual void | mouseReleaseEvent (QMouseEvent *e) override |
| virtual void | mousePressEvent (QMouseEvent *e) override |
| virtual void | enterEvent (QEvent *e) override |
| virtual void | leaveEvent (QEvent *e) override |
| void | set_std_icon () |
| sets the icon depending on the skin | |
Protected Slots | |
| void | _sl_skin_changed () |
| void | _sl_language_changed () |
Protected Attributes | |
| Settings * | _settings =nullptr |
| ContextMenuEntries MenuToolButton::get_entries | ( | ) | const |
get current visible entries in menu
calls ContextMenu::get_entries()
| void MenuToolButton::register_action | ( | QAction * | action | ) |
Use this to add custom actions.
| action | a custom action |
|
slot |
show/hide an action calls ContextMenu::show_action(ContextMenu::Entry entry, bool visible)
| entry | the entry of interes |
| visible | show/hide the action |
|
slot |
shows all actions specified in options. Hide every other action
calls ContextMenu::show_actions(ContextMenuEntries options)
| options | option mask |
1.8.13