SHAPER  9.12.0
XGUI_HistoryMenu Class Reference

Extends regular QToolButton of QAction with HistoryMenu (stack of actions) More...

Inheritance diagram for XGUI_HistoryMenu:
Inheritance graph

Public Slots

void setHistory (const QList< ActionInfo > &)
 Set list of actions. More...
 

Signals

void actionSelected (int)
 Signal. Emited then n-th action is selected in stack. More...
 

Public Member Functions

 XGUI_HistoryMenu (QToolButton *theParent)
 Creates history menu for button. More...
 
 XGUI_HistoryMenu (QAction *theParent)
 Creates history menu for action. More...
 

Protected Slots

void setStackSelectedTo (QListWidgetItem *)
 Selects all items in stack to the given item including it. More...
 
void onItemPressed (QListWidgetItem *)
 Emits actionSelected() signal. More...
 
void initMenu ()
 Initializes internal controls of the Menu. More...
 

Protected Member Functions

virtual void leaveEvent (QEvent *)
 Unselects all items when cursor leaves the list. More...
 

Detailed Description

Extends regular QToolButton of QAction with HistoryMenu (stack of actions)

Constructor & Destructor Documentation

◆ XGUI_HistoryMenu() [1/2]

XGUI_HistoryMenu::XGUI_HistoryMenu ( QToolButton *  theParent)
explicit

Creates history menu for button.

◆ XGUI_HistoryMenu() [2/2]

XGUI_HistoryMenu::XGUI_HistoryMenu ( QAction *  theParent)
explicit

Creates history menu for action.

Member Function Documentation

◆ actionSelected

void XGUI_HistoryMenu::actionSelected ( int  )
signal

Signal. Emited then n-th action is selected in stack.

◆ setHistory

void XGUI_HistoryMenu::setHistory ( const QList< ActionInfo > &  theActions)
slot

Set list of actions.

◆ leaveEvent()

void XGUI_HistoryMenu::leaveEvent ( QEvent theEvent)
protectedvirtual

Unselects all items when cursor leaves the list.

◆ setStackSelectedTo

void XGUI_HistoryMenu::setStackSelectedTo ( QListWidgetItem theItem)
protectedslot

Selects all items in stack to the given item including it.

◆ onItemPressed

void XGUI_HistoryMenu::onItemPressed ( QListWidgetItem theItem)
protectedslot

Emits actionSelected() signal.

◆ initMenu

void XGUI_HistoryMenu::initMenu ( )
protectedslot

Initializes internal controls of the Menu.