Version: 8.3.0
YACS::HMI::LinkMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::LinkMenu:
Collaboration diagram for YACS::HMI::LinkMenu:

Public Member Functions

 LinkMenu ()
 
virtual ~LinkMenu ()
 
virtual void popupMenu (QWidget *caller, const QPoint &globalPos, const QString &m="Link Menu")
 
- Public Member Functions inherited from YACS::HMI::MenusBase
 MenusBase ()
 
virtual ~MenusBase ()
 
virtual void addForEachMenu (QMenu *m, QActionGroup *actgroup)
 
virtual void addForEachMenuToPutGraph (QMenu *m, QActionGroup *actgroup)
 

Additional Inherited Members

- Protected Slots inherited from YACS::HMI::MenusBase
void dummyAction ()
 
void foreachAction (QAction *)
 
void putGraphInForeachAction (QAction *)
 
- Protected Member Functions inherited from YACS::HMI::MenusBase
virtual void buildForEachMenu (QMenu *m, QActionGroup *actgroup)
 
virtual void addHeader (QMenu &m, const QString &h)
 
- Protected Attributes inherited from YACS::HMI::MenusBase
QAction * _dummyAct
 

Detailed Description

Definition at line 97 of file Menus.hxx.

Constructor & Destructor Documentation

LinkMenu::LinkMenu ( )

Definition at line 355 of file Menus.cxx.

355  : MenusBase()
356 {
357 }
LinkMenu::~LinkMenu ( )
virtual

Definition at line 359 of file Menus.cxx.

360 {
361 }

Member Function Documentation

void LinkMenu::popupMenu ( QWidget caller,
const QPoint &  globalPos,
const QString &  m = "Link Menu" 
)
virtual

Reimplemented from YACS::HMI::MenusBase.

Definition at line 363 of file Menus.cxx.

References YACS::HMI::GenericGui::_deEmphasizeAllAct, YACS::HMI::GenericGui::_deleteItemAct, YACS::HMI::GenericGui::_emphasisLinkAct, YACS::HMI::GenericGui::_hideLinkAct, YACS::HMI::GenericGui::_showLinkAct, YACS::HMI::GenericGui::_showOnlyLinkAct, YACS::HMI::MenusBase::addHeader(), YACS::HMI::QtGuiContext::getGMain(), YACS::HMI::QtGuiContext::getQtCurrent(), and YACS::HMI::QtGuiContext::isEdition().

Referenced by YACS::HMI::SchemaLinkItem::popupMenu(), and YACS::HMI::SceneLinkItem::popupMenu().

364 {
366  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
367  QMenu menu(m, caller);
368  addHeader(menu, m);
369  menu.addAction(gmain->_showOnlyLinkAct);
370  menu.addAction(gmain->_showLinkAct);
371  menu.addAction(gmain->_hideLinkAct);
372  menu.addAction(gmain->_emphasisLinkAct);
373  menu.addAction(gmain->_deEmphasizeAllAct);
374  if (isEdition)
375  {
376  menu.addSeparator();
377  menu.addAction(gmain->_deleteItemAct);
378  }
379  menu.exec(globalPos);
380 }

The documentation for this class was generated from the following files: