Detailed Description

Classes

class  ContextMenuManager
 
class  MenuHelper
 

Class Documentation

◆ ContextMenuManager

class ContextMenuManager

Signals

void onOpen ()
 
void onClose ()
 

Public Member Functions

 ContextMenuManager ()
 
 ContextMenuManager (QWidget *parent)
 
 ~ContextMenuManager ()
 
QMenu * create ()
 
MenuInstanceshow (View *view)
 
MenuInstanceshow (QPoint pos, View *view)
 
MenuInstanceshow (Menu *source, UIActionHandler *handler)
 
MenuInstanceshow (QPoint pos, Menu *source, UIActionHandler *handler)
 
bool isActive ()
 

Constructor & Destructor Documentation

◆ ContextMenuManager() [1/2]

ContextMenuManager::ContextMenuManager ( )
inline

◆ ContextMenuManager() [2/2]

ContextMenuManager::ContextMenuManager ( QWidget *  parent)

◆ ~ContextMenuManager()

ContextMenuManager::~ContextMenuManager ( )

Member Function Documentation

◆ create()

QMenu * ContextMenuManager::create ( )

◆ show() [1/4]

MenuInstance * ContextMenuManager::show ( View view)

◆ show() [2/4]

MenuInstance * ContextMenuManager::show ( QPoint  pos,
View view 
)

◆ show() [3/4]

MenuInstance * ContextMenuManager::show ( Menu source,
UIActionHandler handler 
)

◆ show() [4/4]

MenuInstance * ContextMenuManager::show ( QPoint  pos,
Menu source,
UIActionHandler handler 
)

◆ isActive()

bool ContextMenuManager::isActive ( )
inline

◆ onOpen

void ContextMenuManager::onOpen ( )
signal

◆ onClose

void ContextMenuManager::onClose ( )
signal

◆ MenuHelper

class MenuHelper

Signals

void clicked ()
 

Public Member Functions

 MenuHelper ()
 
 MenuHelper (QWidget *parent)
 
void setBackgroundColorRole (QPalette::ColorRole role)
 
void setActiveBackgroundColorRole (QPalette::ColorRole role)
 
void setPressedBackgroundColorRole (QPalette::ColorRole role)
 
void setForegroundColorRole (QPalette::ColorRole role)
 
void setActiveForegroundColorRole (QPalette::ColorRole role)
 
void setPressedForegroundColorRole (QPalette::ColorRole role)
 

Protected Slots

virtual void showMenu ()=0
 

Protected Member Functions

void enterEvent (QEnterEvent *event) override
 
void leaveEvent (QEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
void updateColors ()
 

Protected Attributes

Menu m_menu
 
ContextMenuManagerm_contextMenuManager
 
QTimer * m_timer
 
bool m_active
 
bool m_pressed
 

Constructor & Destructor Documentation

◆ MenuHelper() [1/2]

MenuHelper::MenuHelper ( )
inline

◆ MenuHelper() [2/2]

MenuHelper::MenuHelper ( QWidget *  parent)
explicit

Member Function Documentation

◆ setBackgroundColorRole()

void MenuHelper::setBackgroundColorRole ( QPalette::ColorRole  role)

◆ setActiveBackgroundColorRole()

void MenuHelper::setActiveBackgroundColorRole ( QPalette::ColorRole  role)

◆ setPressedBackgroundColorRole()

void MenuHelper::setPressedBackgroundColorRole ( QPalette::ColorRole  role)

◆ setForegroundColorRole()

void MenuHelper::setForegroundColorRole ( QPalette::ColorRole  role)

◆ setActiveForegroundColorRole()

void MenuHelper::setActiveForegroundColorRole ( QPalette::ColorRole  role)

◆ setPressedForegroundColorRole()

void MenuHelper::setPressedForegroundColorRole ( QPalette::ColorRole  role)

◆ clicked

void MenuHelper::clicked ( )
signal

◆ showMenu

virtual void MenuHelper::showMenu ( )
protectedpure virtualslot

◆ enterEvent()

void MenuHelper::enterEvent ( QEnterEvent *  event)
overrideprotected

◆ leaveEvent()

void MenuHelper::leaveEvent ( QEvent *  event)
overrideprotected

◆ mousePressEvent()

void MenuHelper::mousePressEvent ( QMouseEvent *  event)
overrideprotected

◆ mouseReleaseEvent()

void MenuHelper::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

◆ updateColors()

void MenuHelper::updateColors ( )
protected

Member Data Documentation

◆ m_menu

Menu MenuHelper::m_menu
protected

◆ m_contextMenuManager

ContextMenuManager* MenuHelper::m_contextMenuManager
protected

◆ m_timer

QTimer* MenuHelper::m_timer
protected

◆ m_active

bool MenuHelper::m_active
protected

◆ m_pressed

bool MenuHelper::m_pressed
protected