Sayonara Player
|
A context menu with some standard actions. More...
#include <ContextMenu.h>
Public Types | |
enum | Entry { EntryNone = 0 , EntryNew = (1 << 0) , EntryEdit = (1 << 1) , EntryUndo = (1 << 2) , EntrySave = (1 << 3) , EntrySaveAs = (1 << 4) , EntryRename = (1 << 5) , EntryDelete = (1 << 6) , EntryOpen = (1 << 7) , EntryDefault = (1 << 8) } |
The Entry enum. | |
Public Slots | |
void | showActions (ContextMenuEntries entries) |
show actions defined by ContextMenuEntry mask. Hide other actions | |
void | showAction (ContextMenu::Entry entry, bool visible) |
show/hide specific action | |
void | showAll () |
show all actions | |
void | addPreferenceAction (PreferenceAction *action) |
Signals | |
void | sigNew () |
void | sigEdit () |
void | sigUndo () |
void | sigSave () |
void | sigSaveAs () |
void | sigRename () |
void | sigDelete () |
void | sigOpen () |
void | sigDefault () |
Public Member Functions | |
ContextMenu (QWidget *parent=nullptr) | |
void | registerAction (QAction *action) |
register a custom action | |
bool | hasActions () |
query, if there are visible actions | |
ContextMenuEntries | entries () const |
get all visible entries | |
Protected Member Functions | |
void | showEvent (QShowEvent *e) override |
void | languageChanged () override |
void | skinChanged () override |
A context menu with some standard actions.
ContextMenuEntries Gui::ContextMenu::entries | ( | ) | const |
get all visible entries
bool Gui::ContextMenu::hasActions | ( | ) |
query, if there are visible actions
|
overrideprotectedvirtual |
Reimplemented from Gui::WidgetTemplateParent.
void Gui::ContextMenu::registerAction | ( | QAction * | action | ) |
register a custom action
action | the action. You have to set up the connection manually |
|
slot |
show/hide specific action
entry | the entry of interes |
visible | show/hide |
|
slot |
show actions defined by ContextMenuEntry mask. Hide other actions
mask | of ContextMenu::Entry |
|
overrideprotectedvirtual |
Reimplemented from Gui::WidgetTemplate< QMenu >.
|
overrideprotectedvirtual |
Reimplemented from Gui::WidgetTemplateParent.