Sayonara Player
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
Gui::MenuToolButton Class Reference

This is the little button you often see near comboboxes
It opens up a menu when clicked. The actions in the menu a configurable. More...

#include <MenuToolButton.h>

Inheritance diagram for Gui::MenuToolButton:
Gui::WidgetTemplate< QPushButton > Gui::WidgetTemplateParent Library::MenuButtonViews

Public Slots

void showAction (ContextMenu::Entry entry, bool visible)
 show/hide an action calls ContextMenu::show_action(ContextMenu::Entry entry, bool visible) More...
 
void showActions (ContextMenuEntries options)
 shows all actions specified in options. Hide every other action
calls ContextMenu::show_actions(ContextMenuEntries options) More...
 
void showAll ()
 show all actions
 

Signals

void sigOpen ()
 
void sigNew ()
 
void sigUndo ()
 
void sigSave ()
 
void sigSaveAs ()
 
void sigRename ()
 
void sigDelete ()
 
void sigEdit ()
 
void sigDefault ()
 

Public Member Functions

 MenuToolButton (QWidget *parent)
 
 MenuToolButton (QMenu *menu, QWidget *parent)
 
void registerAction (QAction *action)
 Use this to add custom actions. More...
 
void registerPreferenceAction (Gui::PreferenceAction *action)
 Use this to add a preference Action. More...
 
Gui::ContextMenuEntries entries () const
 get current visible entries in menu
calls ContextMenu::get_entries() More...
 
void setOverrideText (bool b)
 
virtual void showEvent (QShowEvent *e) override
 

Protected Member Functions

void languageChanged () override
 
void skinChanged () override
 

Detailed Description

This is the little button you often see near comboboxes
It opens up a menu when clicked. The actions in the menu a configurable.

Member Function Documentation

◆ entries()

Gui::ContextMenuEntries Gui::MenuToolButton::entries ( ) const

get current visible entries in menu
calls ContextMenu::get_entries()

Returns
a mask indicating which entries are shown. See ContextMenu::Entry

◆ languageChanged()

void Gui::MenuToolButton::languageChanged ( )
overrideprotectedvirtual

Reimplemented from Gui::WidgetTemplateParent.

◆ registerAction()

void Gui::MenuToolButton::registerAction ( QAction *  action)

Use this to add custom actions.

Parameters
actiona custom action

◆ registerPreferenceAction()

void Gui::MenuToolButton::registerPreferenceAction ( Gui::PreferenceAction action)

Use this to add a preference Action.

Parameters
PreferenceActionfor accessing preference dialog

◆ showAction

void Gui::MenuToolButton::showAction ( ContextMenu::Entry  entry,
bool  visible 
)
slot

show/hide an action calls ContextMenu::show_action(ContextMenu::Entry entry, bool visible)

Parameters
entrythe entry of interes
visibleshow/hide the action

◆ showActions

void Gui::MenuToolButton::showActions ( ContextMenuEntries  options)
slot

shows all actions specified in options. Hide every other action
calls ContextMenu::show_actions(ContextMenuEntries options)

Parameters
optionsoption mask

◆ skinChanged()

void Gui::MenuToolButton::skinChanged ( )
overrideprotectedvirtual

Reimplemented from Gui::WidgetTemplateParent.