Version: 8.3.0
YACS::HMI::ComposedNodeMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::ComposedNodeMenu:
Collaboration diagram for YACS::HMI::ComposedNodeMenu:

Public Member Functions

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

Constructor & Destructor Documentation

ComposedNodeMenu::ComposedNodeMenu ( )

Definition at line 121 of file Menus.cxx.

121  : MenusBase()
122 {
123 }
ComposedNodeMenu::~ComposedNodeMenu ( )
virtual

Definition at line 125 of file Menus.cxx.

126 {
127 }

Member Function Documentation

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

Reimplemented from YACS::HMI::MenusBase.

Definition at line 129 of file Menus.cxx.

References YACS::HMI::GenericGui::_arrangeLocalNodesAct, YACS::HMI::GenericGui::_arrangeRecurseNodesAct, YACS::HMI::GenericGui::_blockNodeAct, YACS::HMI::GenericGui::_centerOnNodeAct, YACS::HMI::GenericGui::_computeLinkAct, YACS::HMI::GenericGui::_copyItemAct, YACS::HMI::GenericGui::_cutItemAct, YACS::HMI::GenericGui::_deEmphasizeAllAct, YACS::HMI::GenericGui::_deleteItemAct, YACS::HMI::GenericGui::_emphasisPortLinksAct, YACS::HMI::GenericGui::_FORNodeAct, YACS::HMI::GenericGui::_getErrorDetailsAct, YACS::HMI::GenericGui::_getErrorReportAct, YACS::HMI::GenericGui::_hideCtrlLinksAct, YACS::HMI::GenericGui::_inDataNodeAct, YACS::HMI::GenericGui::_inlineFunctionNodeAct, YACS::HMI::GenericGui::_inlineScriptNodeAct, YACS::HMI::GenericGui::_inStudyNodeAct, YACS::HMI::GenericGui::_nodeFromCatalogAct, YACS::HMI::GenericGui::_OptimizerLoopAct, YACS::HMI::GenericGui::_outDataNodeAct, YACS::HMI::GenericGui::_outStudyNodeAct, YACS::HMI::GenericGui::_pasteItemAct, YACS::HMI::GenericGui::_putInBlocAct, YACS::HMI::GenericGui::_showCtrlLinksAct, YACS::HMI::GenericGui::_showOnlyCtrlLinksAct, YACS::HMI::GenericGui::_shrinkExpand, YACS::HMI::GenericGui::_shrinkExpandChildren, YACS::HMI::GenericGui::_shrinkExpandElementaryRecursively, YACS::HMI::GenericGui::_SWITCHNodeAct, YACS::HMI::GenericGui::_WHILENodeAct, YACS::HMI::GenericGui::_zoomToBlocAct, YACS::HMI::MenusBase::addForEachMenu(), 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::SchemaComposedNodeItem::popupMenu(), and YACS::HMI::SceneComposedNodeItem::popupMenu().

130 {
132  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
133  QMenu menu(m, caller);
134  QActionGroup actgroup(this);
135  addHeader(menu, m);
136  if (isEdition)
137  {
138  QMenu *CNmenu = menu.addMenu(tr("Create Node"));
139  CNmenu->addAction(gmain->_nodeFromCatalogAct);
140  // CNmenu->addSeparator();
141  // CNmenu->addAction(gmain->_cppNodeAct);
142  // CNmenu->addAction(gmain->_XMLNodeAct);
143  CNmenu->addSeparator();
144  CNmenu->addAction(gmain->_inlineScriptNodeAct);
145  CNmenu->addAction(gmain->_inlineFunctionNodeAct);
146  CNmenu->addSeparator();
147  CNmenu->addAction(gmain->_inDataNodeAct);
148  CNmenu->addAction(gmain->_outDataNodeAct);
149  CNmenu->addAction(gmain->_inStudyNodeAct);
150  CNmenu->addAction(gmain->_outStudyNodeAct);
151  CNmenu->addSeparator();
152  CNmenu->addAction(gmain->_blockNodeAct);
153  CNmenu->addSeparator();
154  CNmenu->addAction(gmain->_FORNodeAct);
155  addForEachMenu(CNmenu,&actgroup);
156  CNmenu->addAction(gmain->_WHILENodeAct);
157  CNmenu->addAction(gmain->_SWITCHNodeAct);
158  CNmenu->addAction(gmain->_OptimizerLoopAct);
159  menu.addSeparator();
160  }
161 // menu.addAction(gmain->_toggleSceneItemVisibleAct);
162  menu.addAction(gmain->_arrangeLocalNodesAct);
163  menu.addAction(gmain->_arrangeRecurseNodesAct);
164  menu.addSeparator();
165  menu.addAction(gmain->_showOnlyCtrlLinksAct);
166  menu.addAction(gmain->_showCtrlLinksAct);
167  menu.addAction(gmain->_hideCtrlLinksAct);
168  menu.addAction(gmain->_emphasisPortLinksAct);
169  menu.addAction(gmain->_deEmphasizeAllAct);
170  menu.addSeparator();
171  menu.addAction(gmain->_zoomToBlocAct);
172  menu.addAction(gmain->_centerOnNodeAct);
173  menu.addAction(gmain->_shrinkExpand);
174  menu.addAction(gmain->_shrinkExpandChildren);
175  menu.addAction(gmain->_shrinkExpandElementaryRecursively);
176  menu.addAction(gmain->_computeLinkAct);
177 // menu.addAction(gmain->_toggleAutomaticComputeLinkAct);
178 // menu.addAction(gmain->_toggleSimplifyLinkAct);
179 // menu.addAction(gmain->_toggleForce2NodesLinkAct);
180 // menu.addAction(gmain->_toggleAddRowColsAct);
181  if (isEdition)
182  {
183  menu.addSeparator();
184  menu.addAction(gmain->_deleteItemAct);
185  menu.addAction(gmain->_cutItemAct);
186  menu.addAction(gmain->_copyItemAct);
187  menu.addAction(gmain->_pasteItemAct);
188  menu.addAction(gmain->_putInBlocAct);
189 
191  SubjectNode *sin = dynamic_cast<SubjectNode*>(sub);
192  if(sin && !sin->isValid())
193  {
194  menu.addSeparator();
195  menu.addAction(gmain->_getErrorReportAct);
196  menu.addAction(gmain->_getErrorDetailsAct);
197  }
198  }
199  else
200  {
201  menu.addAction(gmain->_getErrorReportAct);
202  menu.addAction(gmain->_getErrorDetailsAct);
203  }
204  menu.exec(globalPos);
205 }

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