Version: 8.3.0
YACS::HMI::ProcMenu Class Reference

#include <Menus.hxx>

Inheritance diagram for YACS::HMI::ProcMenu:
Collaboration diagram for YACS::HMI::ProcMenu:

Public Member Functions

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

Constructor & Destructor Documentation

ProcMenu::ProcMenu ( )

Definition at line 209 of file Menus.cxx.

209  : MenusBase()
210 {
211 }
ProcMenu::~ProcMenu ( )
virtual

Definition at line 213 of file Menus.cxx.

214 {
215 }

Member Function Documentation

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

Reimplemented from YACS::HMI::MenusBase.

Definition at line 217 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::_deEmphasizeAllAct, YACS::HMI::GenericGui::_FORNodeAct, YACS::HMI::GenericGui::_getErrorDetailsAct, YACS::HMI::GenericGui::_getErrorReportAct, YACS::HMI::GenericGui::_getYacsContainerLogAct, YACS::HMI::GenericGui::_hideAllLinksAct, YACS::HMI::GenericGui::_importDataTypeAct, YACS::HMI::GenericGui::_inDataNodeAct, YACS::HMI::GenericGui::_inlineFunctionNodeAct, YACS::HMI::GenericGui::_inlineScriptNodeAct, YACS::HMI::GenericGui::_inStudyNodeAct, YACS::HMI::GenericGui::_newContainerAct, YACS::HMI::GenericGui::_newHPContainerAct, YACS::HMI::GenericGui::_nodeFromCatalogAct, YACS::HMI::GenericGui::_OptimizerLoopAct, YACS::HMI::GenericGui::_outDataNodeAct, YACS::HMI::GenericGui::_outStudyNodeAct, YACS::HMI::GenericGui::_pasteItemAct, YACS::HMI::GenericGui::_putGraphInBlocAct, YACS::HMI::GenericGui::_putGraphInForLoopAct, YACS::HMI::GenericGui::_putGraphInOptimizerLoopAct, YACS::HMI::GenericGui::_putGraphInWhileLoopAct, YACS::HMI::GenericGui::_runLoadedSchemaAct, YACS::HMI::GenericGui::_showAllLinksAct, YACS::HMI::GenericGui::_shrinkExpand, YACS::HMI::GenericGui::_shrinkExpandChildren, YACS::HMI::GenericGui::_shrinkExpandElementaryRecursively, YACS::HMI::GenericGui::_shutdownProcAct, YACS::HMI::GenericGui::_SWITCHNodeAct, YACS::HMI::GenericGui::_WHILENodeAct, YACS::HMI::GenericGui::_zoomToBlocAct, YACS::HMI::MenusBase::addForEachMenu(), YACS::HMI::MenusBase::addForEachMenuToPutGraph(), YACS::HMI::MenusBase::addHeader(), YACS::HMI::QtGuiContext::getGMain(), YACS::HMI::QtGuiContext::getQtCurrent(), and YACS::HMI::QtGuiContext::isEdition().

Referenced by YACS::HMI::SchemaProcItem::popupMenu(), and YACS::HMI::SceneProcItem::popupMenu().

218 {
220  bool isEdition = QtGuiContext::getQtCurrent()->isEdition();
221  QMenu menu(m, caller);
222  addHeader(menu, m);
223  QActionGroup actgroup(this);
224  QActionGroup actgroup2(this);
225  if (isEdition)
226  {
227  menu.addAction(gmain->_runLoadedSchemaAct);
228  menu.addSeparator();
229  menu.addAction(gmain->_importDataTypeAct);
230  menu.addAction(gmain->_newContainerAct);
231  menu.addAction(gmain->_newHPContainerAct);
232  QMenu *CNmenu = menu.addMenu(tr("Create Node"));
233  CNmenu->addAction(gmain->_nodeFromCatalogAct);
234  // CNmenu->addSeparator();
235  // CNmenu->addAction(gmain->_cppNodeAct);
236  // CNmenu->addAction(gmain->_XMLNodeAct);
237  CNmenu->addSeparator();
238  CNmenu->addAction(gmain->_inlineScriptNodeAct);
239  CNmenu->addAction(gmain->_inlineFunctionNodeAct);
240  CNmenu->addSeparator();
241  CNmenu->addAction(gmain->_inDataNodeAct);
242  CNmenu->addAction(gmain->_outDataNodeAct);
243  CNmenu->addAction(gmain->_inStudyNodeAct);
244  CNmenu->addAction(gmain->_outStudyNodeAct);
245  CNmenu->addSeparator();
246  CNmenu->addAction(gmain->_blockNodeAct);
247  CNmenu->addSeparator();
248  CNmenu->addAction(gmain->_FORNodeAct);
249  addForEachMenu(CNmenu,&actgroup);
250  CNmenu->addAction(gmain->_WHILENodeAct);
251  CNmenu->addAction(gmain->_SWITCHNodeAct);
252  CNmenu->addAction(gmain->_OptimizerLoopAct);
253  menu.addSeparator();
254  menu.addAction(gmain->_pasteItemAct);
255 
256  QMenu *PINmenu = menu.addMenu(tr("Put Graph Content in Node"));
257  PINmenu->addAction(gmain->_putGraphInBlocAct);
258  PINmenu->addSeparator();
259  PINmenu->addAction(gmain->_putGraphInForLoopAct);
260  addForEachMenuToPutGraph(PINmenu,&actgroup2);
261  PINmenu->addAction(gmain->_putGraphInWhileLoopAct);
262  PINmenu->addAction(gmain->_putGraphInOptimizerLoopAct);
263 
264  menu.addSeparator();
265  }
266  menu.addAction(gmain->_getYacsContainerLogAct);
267  menu.addSeparator();
268  menu.addAction(gmain->_showAllLinksAct);
269  menu.addAction(gmain->_hideAllLinksAct);
270  menu.addAction(gmain->_deEmphasizeAllAct);
271  menu.addSeparator();
272 // menu.addAction(gmain->_toggleSceneItemVisibleAct);
273  menu.addAction(gmain->_arrangeLocalNodesAct);
274  menu.addAction(gmain->_arrangeRecurseNodesAct);
275  menu.addSeparator();
276  menu.addAction(gmain->_zoomToBlocAct);
277  menu.addAction(gmain->_centerOnNodeAct);
278  menu.addAction(gmain->_shrinkExpand);
279  menu.addAction(gmain->_shrinkExpandChildren);
280  menu.addAction(gmain->_shrinkExpandElementaryRecursively);
281  menu.addAction(gmain->_computeLinkAct);
282 // menu.addAction(gmain->_toggleAutomaticComputeLinkAct);
283 // menu.addAction(gmain->_toggleSimplifyLinkAct);
284 // menu.addAction(gmain->_toggleForce2NodesLinkAct);
285 // menu.addAction(gmain->_toggleAddRowColsAct);
286  if (!isEdition)
287  {
288  menu.addAction(gmain->_getErrorReportAct);
289  menu.addAction(gmain->_getErrorDetailsAct);
290  menu.addAction(gmain->_shutdownProcAct);
291  }
292  menu.exec(globalPos);
293 }

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