Version: 8.3.0
YACS::HMI::NodeMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::NodeMenu:
Collaboration diagram for YACS::HMI::NodeMenu:

Public Member Functions

 NodeMenu ()
 
virtual ~NodeMenu ()
 
virtual void popupMenu (QWidget *caller, const QPoint &globalPos, const QString &m="Node 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 53 of file Menus.hxx.

Constructor & Destructor Documentation

NodeMenu::NodeMenu ( )

Definition at line 297 of file Menus.cxx.

297  : MenusBase()
298 {
299 }
NodeMenu::~NodeMenu ( )
virtual

Definition at line 301 of file Menus.cxx.

302 {
303 }

Member Function Documentation

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

Reimplemented from YACS::HMI::MenusBase.

Definition at line 305 of file Menus.cxx.

References YACS::HMI::GenericGui::_centerOnNodeAct, YACS::HMI::GenericGui::_copyItemAct, YACS::HMI::GenericGui::_cutItemAct, YACS::HMI::GenericGui::_deEmphasizeAllAct, YACS::HMI::GenericGui::_deleteItemAct, YACS::HMI::GenericGui::_emphasisPortLinksAct, YACS::HMI::GenericGui::_hideCtrlLinksAct, YACS::HMI::GenericGui::_pasteItemAct, YACS::HMI::GenericGui::_showCtrlLinksAct, YACS::HMI::GenericGui::_showOnlyCtrlLinksAct, YACS::HMI::GenericGui::_zoomToBlocAct, YACS::HMI::MenusBase::addHeader(), YACS::HMI::QtGuiContext::getGMain(), YACS::HMI::QtGuiContext::getQtCurrent(), and YACS::HMI::QtGuiContext::isEdition().

Referenced by YACS::HMI::SceneNodeItem::popupMenu().

306 {
308  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
309  QMenu menu(m, caller);
310  addHeader(menu, m);
311  if (isEdition)
312  {
313  menu.addAction(gmain->_deleteItemAct);
314  menu.addAction(gmain->_cutItemAct);
315  menu.addAction(gmain->_copyItemAct);
316  menu.addAction(gmain->_pasteItemAct);
317  }
318  menu.addSeparator();
319  menu.addAction(gmain->_showOnlyCtrlLinksAct);
320  menu.addAction(gmain->_showCtrlLinksAct);
321  menu.addAction(gmain->_hideCtrlLinksAct);
322  menu.addAction(gmain->_emphasisPortLinksAct);
323  menu.addAction(gmain->_deEmphasizeAllAct);
324  menu.addSeparator();
325  menu.addAction(gmain->_zoomToBlocAct);
326  menu.addAction(gmain->_centerOnNodeAct);
327  menu.exec(globalPos);
328 }

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