Version: 8.3.0
YACS::HMI::ElementaryNodeMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::ElementaryNodeMenu:
Collaboration diagram for YACS::HMI::ElementaryNodeMenu:

Public Member Functions

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

Constructor & Destructor Documentation

ElementaryNodeMenu::ElementaryNodeMenu ( )

Definition at line 384 of file Menus.cxx.

384  : MenusBase()
385 {
386 }
ElementaryNodeMenu::~ElementaryNodeMenu ( )
virtual

Definition at line 388 of file Menus.cxx.

389 {
390 }

Member Function Documentation

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

Reimplemented from YACS::HMI::MenusBase.

Definition at line 392 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::_getContainerLogAct, YACS::HMI::GenericGui::_getErrorDetailsAct, YACS::HMI::GenericGui::_getErrorReportAct, YACS::HMI::GenericGui::_hideCtrlLinksAct, YACS::HMI::GenericGui::_pasteItemAct, YACS::HMI::GenericGui::_putInBlocAct, YACS::HMI::GenericGui::_showCtrlLinksAct, YACS::HMI::GenericGui::_showOnlyCtrlLinksAct, YACS::HMI::GenericGui::_shrinkExpand, YACS::HMI::GenericGui::_zoomToBlocAct, YACS::HMI::MenusBase::addHeader(), YACS::HMI::QtGuiContext::getGMain(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::QtGuiContext::getSelectedSubject(), YACS::HMI::QtGuiContext::isEdition(), and YACS::HMI::SubjectNode::isValid().

Referenced by YACS::HMI::SchemaNodeItem::popupMenu(), and YACS::HMI::SceneElementaryNodeItem::popupMenu().

393 {
395  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
396  QMenu menu(m, caller);
397  addHeader(menu, m);
398  if (isEdition)
399  {
400 // Subject* sub = QtGuiContext::getQtCurrent()->getSelectedSubject();
401 // SubjectServiceNode *ssn = dynamic_cast<SubjectServiceNode*>(sub);
402 // if (ssn)
403 // {
404 // menu.addAction(gmain->_newContainerAct);
405 // menu.addSeparator();
406 // }
408  SubjectNode *sin = dynamic_cast<SubjectNode*>(sub);
409  if(sin && !sin->isValid())
410  {
411  menu.addAction(gmain->_getErrorReportAct);
412  menu.addSeparator();
413  }
414  menu.addAction(gmain->_deleteItemAct);
415  menu.addAction(gmain->_cutItemAct);
416  menu.addAction(gmain->_copyItemAct);
417  menu.addAction(gmain->_pasteItemAct);
418  menu.addAction(gmain->_putInBlocAct);
419  }
420  else
421  {
422  menu.addAction(gmain->_getErrorReportAct);
423  menu.addAction(gmain->_getErrorDetailsAct);
424  menu.addAction(gmain->_getContainerLogAct);
425  }
426  menu.addSeparator();
427  menu.addAction(gmain->_showOnlyCtrlLinksAct);
428  menu.addAction(gmain->_showCtrlLinksAct);
429  menu.addAction(gmain->_hideCtrlLinksAct);
430  menu.addAction(gmain->_emphasisPortLinksAct);
431  menu.addAction(gmain->_deEmphasizeAllAct);
432  menu.addSeparator();
433  menu.addAction(gmain->_zoomToBlocAct);
434  menu.addAction(gmain->_centerOnNodeAct);
435  menu.addAction(gmain->_shrinkExpand);
436 // menu.addSeparator();
437 // menu.addAction(gmain->_toggleSceneItemVisibleAct);
438  menu.exec(globalPos);
439 }

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