Version: 8.3.0
YACS::HMI::OutPortMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::OutPortMenu:
Collaboration diagram for YACS::HMI::OutPortMenu:

Public Member Functions

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

Constructor & Destructor Documentation

OutPortMenu::OutPortMenu ( )

Definition at line 480 of file Menus.cxx.

480  : MenusBase()
481 {
482 }
OutPortMenu::~OutPortMenu ( )
virtual

Definition at line 484 of file Menus.cxx.

485 {
486 }

Member Function Documentation

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

Reimplemented from YACS::HMI::MenusBase.

Definition at line 488 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::SceneOutPortItem::popupMenu(), and YACS::HMI::SchemaOutPortItem::popupMenu().

489 {
491  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
492  QMenu menu(m, caller);
493  addHeader(menu, m);
494  menu.addAction(gmain->_showOnlyPortLinksAct);
495  menu.addAction(gmain->_showPortLinksAct);
496  menu.addAction(gmain->_hidePortLinksAct);
497  menu.addAction(gmain->_emphasisPortLinksAct);
498  menu.addAction(gmain->_deEmphasizeAllAct);
499  if (isEdition)
500  {
502  SubjectDataPort *sdp = dynamic_cast<SubjectDataPort*>(sub);
503  Node *parent = 0;
504  if (sdp) parent = sdp->getPort()->getNode();
505  if (parent)
506  if (dynamic_cast<DataNode*>(parent) || dynamic_cast<InlineNode*>(parent))
507  {
508  menu.addSeparator();
509  menu.addAction(gmain->_deleteItemAct);
510  }
511  }
512  menu.exec(globalPos);
513 }

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