Version: 8.3.0
YACS::HMI::InPortMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::InPortMenu:
Collaboration diagram for YACS::HMI::InPortMenu:

Public Member Functions

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

Constructor & Destructor Documentation

InPortMenu::InPortMenu ( )

Definition at line 443 of file Menus.cxx.

443  : MenusBase()
444 {
445 }
InPortMenu::~InPortMenu ( )
virtual

Definition at line 447 of file Menus.cxx.

448 {
449 }

Member Function Documentation

void InPortMenu::popupMenu ( QWidget caller,
const QPoint &  globalPos,
const QString &  m = "In Port Menu" 
)
virtual

Reimplemented from YACS::HMI::MenusBase.

Definition at line 451 of file Menus.cxx.

References YACS::HMI::GenericGui::_deEmphasizeAllAct, YACS::HMI::GenericGui::_deleteItemAct, YACS::HMI::GenericGui::_emphasisPortLinksAct, YACS::HMI::GenericGui::_hidePortLinksAct, YACS::HMI::GenericGui::_showOnlyPortLinksAct, YACS::HMI::GenericGui::_showPortLinksAct, YACS::HMI::MenusBase::addHeader(), YACS::HMI::QtGuiContext::getGMain(), YACS::ENGINE::Port::getNode(), YACS::HMI::SubjectDataPort::getPort(), YACS::HMI::QtGuiContext::getQtCurrent(), YACS::HMI::QtGuiContext::getSelectedSubject(), and YACS::HMI::QtGuiContext::isEdition().

Referenced by YACS::HMI::SceneInPortItem::popupMenu(), and YACS::HMI::SchemaInPortItem::popupMenu().

452 {
454  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
455  QMenu menu(m, caller);
456  addHeader(menu, m);
457  menu.addAction(gmain->_showOnlyPortLinksAct);
458  menu.addAction(gmain->_showPortLinksAct);
459  menu.addAction(gmain->_hidePortLinksAct);
460  menu.addAction(gmain->_emphasisPortLinksAct);
461  menu.addAction(gmain->_deEmphasizeAllAct);
462  if (isEdition)
463  {
465  SubjectDataPort *sdp = dynamic_cast<SubjectDataPort*>(sub);
466  Node *parent = 0;
467  if (sdp) parent = sdp->getPort()->getNode();
468  if (parent)
469  if (dynamic_cast<DataNode*>(parent) || dynamic_cast<InlineNode*>(parent))
470  {
471  menu.addSeparator();
472  menu.addAction(gmain->_deleteItemAct);
473  }
474  }
475  menu.exec(globalPos);
476 }

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