Version: 9.15.0
YACS::HMI::GenericGui Class Reference

#include <GenericGui.hxx>

Inheritance diagram for YACS::HMI::GenericGui:
Collaboration diagram for YACS::HMI::GenericGui:

Public Slots

void onCleanOnExit ()
 

Public Member Functions

 GenericGui (YACS::HMI::SuitWrapper *wrapper, QMainWindow *parent=0)
 
virtual ~GenericGui ()
 
void createActions ()
 
void createMenus ()
 
void createTools ()
 
void initialMenus ()
 
void hideAllMenus ()
 
void showBaseMenus (bool show)
 
void showEditionMenus (bool show)
 
void showExecMenus (bool show)
 
void showCommonMenus (bool show)
 
void switchContext (QWidget *view, bool onExit=false)
 
bool closeContext (QWidget *view, bool onExit=false)
 
void showDockWidgets (bool isVisible)
 
void raiseStacked ()
 
CatalogWidgetgetCatalogWidget ()
 
std::list< std::string > getMachineList ()
 
void createForEachLoop (std::string type="double")
 
void putGraphInForeachLoop (std::string type)
 
virtual void loadSchema (const std::string &filename, bool edit=true, bool arrangeLocalNodes=false)
 
virtual void onHelpContextModule (const QString &, const QString &, const QString &=QString())
 
void createContext (YACS::ENGINE::Proc *proc, const QString &schemaName, const QString &runName, bool forEdition)
 
YACSGuiLoadergetLoader ()
 
void setLoadedPresentation (YACS::ENGINE::Proc *proc)
 

Public Attributes

QAction * _newSchemaAct
 
QAction * _importSchemaAct
 
QAction * _chooseBatchJobAct
 
QAction * _importSupervSchemaAct
 
QAction * _exportSchemaAct
 
QAction * _exportSchemaAsAct
 
QAction * _importCatalogAct
 
QAction * _runLoadedSchemaAct
 
QAction * _loadRunStateSchemaAct
 
QAction * _loadAndRunSchemaAct
 
QAction * _startResumeAct
 
QAction * _abortAct
 
QAction * _pauseAct
 
QAction * _resetAct
 
QAction * _saveRunStateAct
 
QAction * _newEditionAct
 
QActionGroup * _execModeGroup
 
QAction * _withoutStopModeAct
 
QAction * _breakpointsModeAct
 
QAction * _stepByStepModeAct
 
QAction * _toggleStopOnErrorAct
 
QAction * _getYacsContainerLogAct
 
QAction * _getErrorReportAct
 
QAction * _getErrorDetailsAct
 
QAction * _getContainerLogAct
 
QAction * _shutdownProcAct
 
QAction * _editDataTypesAct
 
QAction * _createDataTypeAct
 
QAction * _importDataTypeAct
 
QAction * _newContainerAct
 
QAction * _newHPContainerAct
 
QAction * _selectComponentInstanceAct
 
QAction * _newSalomeComponentAct
 
QAction * _newSalomePythonComponentAct
 
QAction * _newCorbaComponentAct
 
QAction * _salomeServiceNodeAct
 
QAction * _serviceInlineNodeAct
 
QAction * _CORBAServiceNodeAct
 
QAction * _nodeNodeServiceNodeAct
 
QAction * _cppNodeAct
 
QAction * _XMLNodeAct
 
QAction * _inDataNodeAct
 
QAction * _outDataNodeAct
 
QAction * _inStudyNodeAct
 
QAction * _outStudyNodeAct
 
QAction * _inlineScriptNodeAct
 
QAction * _inlineFunctionNodeAct
 
QAction * _blockNodeAct
 
QAction * _FORNodeAct
 
QAction * _FOREACHNodeAct
 
QAction * _WHILENodeAct
 
QAction * _SWITCHNodeAct
 
QAction * _OptimizerLoopAct
 
QAction * _nodeFromCatalogAct
 
QAction * _deleteItemAct
 
QAction * _cutItemAct
 
QAction * _copyItemAct
 
QAction * _pasteItemAct
 
QAction * _putInBlocAct
 
QAction * _putGraphInBlocAct
 
QAction * _putGraphInForLoopAct
 
QAction * _putGraphInWhileLoopAct
 
QAction * _putGraphInOptimizerLoopAct
 
QAction * _arrangeLocalNodesAct
 
QAction * _arrangeRecurseNodesAct
 
QAction * _computeLinkAct
 
QAction * _zoomToBlocAct
 
QAction * _centerOnNodeAct
 
QAction * _shrinkExpand
 
QAction * _shrinkExpandChildren
 
QAction * _shrinkExpandElementaryRecursively
 
QAction * _toggleStraightLinksAct
 
QAction * _toggleAutomaticComputeLinkAct
 
QAction * _toggleSimplifyLinkAct
 
QAction * _toggleForce2NodesLinkAct
 
QAction * _toggleAddRowColsAct
 
QAction * _toggleSceneItemVisibleAct
 
QAction * _selectReferenceAct
 
QAction * _whatsThisAct
 
QAction * _showAllLinksAct
 
QAction * _hideAllLinksAct
 
QAction * _showOnlyPortLinksAct
 
QAction * _showPortLinksAct
 
QAction * _hidePortLinksAct
 
QAction * _emphasisPortLinksAct
 
QAction * _showOnlyCtrlLinksAct
 
QAction * _showCtrlLinksAct
 
QAction * _hideCtrlLinksAct
 
QAction * _emphasisCtrlLinksAct
 
QAction * _showOnlyLinkAct
 
QAction * _showLinkAct
 
QAction * _hideLinkAct
 
QAction * _emphasisLinkAct
 
QAction * _deEmphasizeAllAct
 
QAction * _undoAct
 
QAction * _redoAct
 
QAction * _showUndoAct
 
QAction * _showRedoAct
 
YACS::HMI::GuiEditor_guiEditor
 

Protected Member Functions

int getMenuId ()
 
QString getSaveFileName (const QString &fileName=QString())
 bug confirmOverwrite : correction Qt 4.3.5 More...
 

Protected Attributes

YACSGuiLoader_loader
 
SuitWrapper_wrapper
 
QMainWindow_parent
 
QDockWidget * _dwTree
 
QDockWidget * _dwStacked
 
QDockWidget * _dwCatalogs
 
BatchJobsListDialog_BJLdialog
 
YACS::ENGINE::Catalog_builtinCatalog
 
YACS::ENGINE::Catalog_sessionCatalog
 
CatalogWidget_catalogsWidget
 
std::map< QWidget *, YACS::HMI::QtGuiContext * > _mapViewContext
 
int _menuId
 
int _toolId
 
int _schemaCnt
 
bool _isSaved
 
std::list< std::string > _machineList
 

Private Slots

void onNewSchema ()
 
void onImportSchema ()
 
void onChooseBatchJob ()
 
void onImportSupervSchema ()
 
void onExportSchema ()
 
void onExportSchemaAs ()
 
void onImportCatalog ()
 
void onRunLoadedSchema (bool withState=false)
 
void onLoadRunStateSchema ()
 
void onLoadAndRunSchema ()
 
void onStartResume ()
 
void onAbort ()
 
void onPause ()
 
void onReset ()
 
void onSaveRunState ()
 
void onNewEdition ()
 
void onWithoutStopMode (bool checked)
 
void onBreakpointsMode (bool checked)
 
void onStepByStepMode (bool checked)
 
void onToggleStopOnError (bool checked)
 
void onGetYacsContainerLog ()
 
void onGetErrorReport ()
 
void onGetErrorDetails ()
 
void onGetContainerLog ()
 
void onShutdownProc ()
 
void onEditDataTypes ()
 
void onCreateDataType ()
 
void onImportDataType ()
 
void onNewContainer ()
 
void onNewHPContainer ()
 
void onSelectComponentInstance ()
 
void onNewSalomeComponent ()
 
void onNewSalomePythonComponent ()
 
void onNewCorbaComponent ()
 
void onSalomeServiceNode ()
 
void onServiceInlineNode ()
 
void onCORBAServiceNode ()
 
void onNodeNodeServiceNode ()
 
void onCppNode ()
 
void onXMLNode ()
 
void onInDataNode ()
 
void onOutDataNode ()
 
void onInStudyNode ()
 
void onOutStudyNode ()
 
void onInlineScriptNode ()
 
void onInlineFunctionNode ()
 
void onBlockNode ()
 
void onFORNode ()
 
void onFOREACHNode ()
 
void onWHILENode ()
 
void onSWITCHNode ()
 
void onOptimizerLoop ()
 
void onNodeFromCatalog ()
 
void onDeleteItem ()
 
void onCutItem ()
 
void onCopyItem ()
 
void onPasteItem ()
 
void onPutInBloc ()
 
void onPutGraphInBloc ()
 
void onPutGraphInForLoop ()
 
void onPutGraphInWhileLoop ()
 
void onPutGraphInOptimizerLoop ()
 
void onArrangeLocalNodes ()
 
void onArrangeRecurseNodes ()
 
void onRebuildLinks ()
 
void onZoomToBloc ()
 
void onCenterOnNode ()
 
void onShrinkExpand ()
 
void onShrinkExpandChildren ()
 
void onShrinkExpandElementaryRecursively ()
 
void onToggleStraightLinks (bool checked)
 
void onToggleAutomaticComputeLinks (bool checked)
 
void onToggleSimplifyLinks (bool checked)
 
void onToggleForce2NodesLinks (bool checked)
 
void onToggleAddRowCols (bool checked)
 
void onToggleSceneItemVisible (bool checked)
 
void onShowAllLinks ()
 
void onHideAllLinks ()
 
void onShowOnlyPortLinks ()
 
void onShowPortLinks ()
 
void onHidePortLinks ()
 
void onEmphasisPortLinks ()
 
void onShowOnlyCtrlLinks ()
 
void onShowCtrlLinks ()
 
void onHideCtrlLinks ()
 
void onEmphasisCtrlLinks ()
 
void onShowOnlyLink ()
 
void onShowLink ()
 
void onHideLink ()
 
void onEmphasisLink ()
 
void onDeEmphasizeAll ()
 
void onSelectReference ()
 
void onWhatsThis ()
 
void onUndo ()
 
void onRedo ()
 
void onShowUndo ()
 
void onShowRedo ()
 

Private Member Functions

void displayLinks (bool isShown)
 
void displayControlLinks (bool isShown)
 
void displayPortLinks (bool isShown)
 
void displayALink (bool isShown)
 
void emphasizePortLink (YACS::HMI::SubjectDataPort *sub, bool emphasize)
 

Detailed Description

Definition at line 56 of file GenericGui.hxx.

Constructor & Destructor Documentation

◆ GenericGui()

GenericGui::GenericGui ( YACS::HMI::SuitWrapper wrapper,
QMainWindow parent = 0 
)

Definition at line 81 of file GenericGui.cxx.

82 {
83  _wrapper = wrapper;
84  _parent = parent;
85  _dwTree = 0;
86  _dwStacked = 0;
87  _dwCatalogs = 0;
88  _catalogsWidget = 0;
89  _sessionCatalog = 0;
90  _schemaCnt = 0;
91  _isSaved = false;
92  _mapViewContext.clear();
93  _machineList.clear();
94  _menuId = 190;
95  _BJLdialog = NULL;
97  srand((unsigned)time(0));
98 
100 
101  string iconPath = getenv("YACS_ROOT_DIR");
102  iconPath += "/share/salome/resources/yacs";
103  DEBTRACE(iconPath);
104  QDir::addSearchPath("icons", iconPath.c_str());
105 
106  _guiEditor = new GuiEditor();
107 
109  _loader = new YACSGuiLoader();
112 
113  try
114  {
116  CORBA::ORB_ptr orb = runTime->getOrb();
117  if (orb)
118  {
119  SALOME_NamingService_Wrapper namingService(orb);
120  CORBA::Object_ptr obj = namingService.Resolve("/Kernel/ModulCatalog");
121  SALOME_ModuleCatalog::ModuleCatalog_var aModuleCatalog =
122  SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj);
123  if (! CORBA::is_nil(aModuleCatalog))
124  {
125  DEBTRACE("SALOME_ModuleCatalog::ModuleCatalog found");
126  std::string anIOR = orb->object_to_string( aModuleCatalog );
127  _sessionCatalog = runTime->loadCatalog( "session", anIOR );
128  runTime->addCatalog(_sessionCatalog);
129  {
130  std::map< std::string, YACS::ENGINE::ComponentDefinition * >::iterator it;
131  for (it = _sessionCatalog->_componentMap.begin();
132  it != _sessionCatalog->_componentMap.end(); ++it)
133  DEBTRACE("Component: " <<(*it).first);
134  }
135  {
136  std::map< std::string, YACS::ENGINE::TypeCode*>::iterator it;
137  for (it = _sessionCatalog->_typeMap.begin();
138  it != _sessionCatalog->_typeMap.end(); ++it)
139  DEBTRACE("Type : " <<(*it).first
140  << " " << (*it).second->getKindRepr()
141  << " " << (*it).second->name()
142  << " " << (*it).second->shortName()
143  << " " << (*it).second->id() );
144  }
145  DEBTRACE("_sessionCatalog " << _sessionCatalog);
146  }
147  }
148  }
149  catch(ServiceUnreachable& e)
150  {
151  DEBTRACE("Caught Exception. "<<e);
152  }
153 
154  _dwTree = new QDockWidget(_parent);
155  _dwTree->setVisible(false);
156  _dwTree->setWindowTitle("Tree View: edition mode");
157  _dwTree->setObjectName("yacsTreeViewDock");
158  _parent->addDockWidget(Qt::LeftDockWidgetArea, _dwTree);
159  _dwStacked = new QDockWidget(_parent);
160  _dwStacked->setVisible(false);
161  _dwStacked->setWindowTitle("Input Panel");
162  _dwStacked->setObjectName("yacsInputPanelDock");
163  _dwStacked->setMinimumWidth(270); // --- force a minimum until display
164  _parent->addDockWidget(Qt::RightDockWidgetArea, _dwStacked);
165  _dwCatalogs = new QDockWidget(_parent);
166  _dwCatalogs->setVisible(false);
167  _dwCatalogs->setWindowTitle("Catalogs");
168  _dwCatalogs->setObjectName("yacsCatalogsDock");
169  _parent->addDockWidget(Qt::RightDockWidgetArea, _dwCatalogs);
173  _dwCatalogs->setWidget(_catalogsWidget);
174 
175  _parent->tabifyDockWidget(_dwStacked, _dwCatalogs);
176  if (_wrapper->objectBrowser())
177  _parent->tabifyDockWidget(_dwTree, _wrapper->objectBrowser());
178  _parent->setTabPosition(Qt::AllDockWidgetAreas, Resource::tabPanelsUp? QTabWidget::North: QTabWidget::South);
179  //Import user catalog
180  std::string usercata=Resource::userCatalog.toStdString();
182 }
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
std::map< std::string, ComponentDefinition * > _componentMap
Definition: Catalog.hxx:50
std::map< std::string, TypeCode * > _typeMap
Definition: Catalog.hxx:49
static void setRuntime(long flags=UsePython+UseCorba+UseXml+UseCpp+UseSalome, int argc=0, char *argv[]=NULL)
CORBA::ORB_ptr getOrb() const
Catalog * getBuiltinCatalog()
Get the catalog of base nodes (elementary and composed)
Definition: Runtime.cxx:314
virtual void addCatalog(Catalog *catalog)
Add a catalog of types and nodes to the runtime.
Definition: Runtime.cxx:323
virtual Catalog * loadCatalog(const std::string &sourceKind, const std::string &path)
Load a catalog of calculation to use as factory.
Definition: Runtime.cxx:285
virtual bool addCatalogFromFile(std::string fileName)
std::list< std::string > _machineList
Definition: GenericGui.hxx:226
std::map< QWidget *, YACS::HMI::QtGuiContext * > _mapViewContext
Definition: GenericGui.hxx:221
YACS::HMI::GuiEditor * _guiEditor
Definition: GenericGui.hxx:201
QMainWindow * _parent
Definition: GenericGui.hxx:213
QDockWidget * _dwStacked
Definition: GenericGui.hxx:215
YACS::ENGINE::Catalog * _builtinCatalog
Definition: GenericGui.hxx:218
QDockWidget * _dwTree
Definition: GenericGui.hxx:214
YACSGuiLoader * _loader
Definition: GenericGui.hxx:211
CatalogWidget * _catalogsWidget
Definition: GenericGui.hxx:220
BatchJobsListDialog * _BJLdialog
Definition: GenericGui.hxx:217
YACS::ENGINE::Catalog * _sessionCatalog
Definition: GenericGui.hxx:219
SuitWrapper * _wrapper
Definition: GenericGui.hxx:212
QDockWidget * _dwCatalogs
Definition: GenericGui.hxx:216
static void setEventMap()
static counters * _counters
static bool tabPanelsUp
Definition: Resource.hxx:324
static QString userCatalog
Definition: Resource.hxx:207
QDockWidget * objectBrowser()
void registerProcCataLoader()
Definition: parsers.cxx:57
YACSRUNTIMESALOME_EXPORT RuntimeSALOME * getSALOMERuntime()
CORBA::ORB_ptr orb
Definition: yacsSrv.cxx:39

References YACS::ENGINE::Runtime::addCatalog(), DEBTRACE, YACS::ENGINE::Runtime::getBuiltinCatalog(), YACS::ENGINE::RuntimeSALOME::getOrb(), YACS::ENGINE::getSALOMERuntime(), YACS::ENGINE::Runtime::loadCatalog(), orb, SALOME_NamingService_Wrapper::Resolve(), and YACS::ENGINE::RuntimeSALOME::setRuntime().

◆ ~GenericGui()

GenericGui::~GenericGui ( )
virtual

Definition at line 184 of file GenericGui.cxx.

185 {
186  if(_BJLdialog) delete _BJLdialog;
187 }

Member Function Documentation

◆ closeContext()

bool GenericGui::closeContext ( QWidget view,
bool  onExit = false 
)

Definition at line 863 of file GenericGui.cxx.

864 {
865  DEBTRACE("GenericGui::closeContext " << onExit);
866  if (! _mapViewContext.count(view))
867  return true;
868  QtGuiContext* context = _mapViewContext[view];
869  switchContext(view);
870 
871  bool tryToSave = false;
872 
873  if (QtGuiContext::getQtCurrent()->isEdition())
874  {
875  if (!QtGuiContext::getQtCurrent()->_setOfModifiedSubjects.empty())
876  {
877  QMessageBox msgBox;
878  msgBox.setText("Some elements are modified and not taken into account.");
879  string info = "do you want to apply your changes ?\n";
880  info += " - Save : do not take into account edition in progress,\n";
881  info += " but if there are other modifications, select a file name for save\n";
882  info += " - Discard : discard all modifications and close the schema";
883  if (!onExit)
884  info += "\n - Cancel : do not close the schema, return to edition";
885  msgBox.setInformativeText(info.c_str());
886  if (!onExit)
887  {
888  msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
889  msgBox.setDefaultButton(QMessageBox::Cancel);
890  }
891  else
892  {
893  msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard);
894  msgBox.setDefaultButton(QMessageBox::Save);
895  }
896  int ret = msgBox.exec();
897  switch (ret)
898  {
899  case QMessageBox::Save:
900  tryToSave = true;
901  break;
902  case QMessageBox::Discard:
903  tryToSave = false;
904  break;
905  case QMessageBox::Cancel:
906  default:
907  DEBTRACE("Cancel or default");
908  return false;
909  break;
910  }
911  }
912  else
913  if (QtGuiContext::getQtCurrent()->isNotSaved())
914  {
915  QMessageBox msgBox;
916  msgBox.setWindowTitle("Close the active schema");
917  msgBox.setText("The schema has been modified");
918  string info = "do you want to save the schema ?\n";
919  info += " - Save : select a file name for save\n";
920  info += " - Discard : discard all modifications and close the schema";
921  if (!onExit)
922  info += "\n - Cancel : do not close the schema, return to edition";
923  msgBox.setInformativeText(info.c_str());
924  if (!onExit)
925  {
926  msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
927  msgBox.setDefaultButton(QMessageBox::Cancel);
928  }
929  else
930  {
931  msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard);
932  msgBox.setDefaultButton(QMessageBox::Save);
933  }
934  int ret = msgBox.exec();
935  switch (ret)
936  {
937  case QMessageBox::Save:
938  tryToSave = true;
939  break;
940  case QMessageBox::Discard:
941  tryToSave = false;
942  break;
943  case QMessageBox::Cancel:
944  DEBTRACE("Cancel or default");
945  default:
946  return false;
947  break;
948  }
949  }
950 
951  if (tryToSave)
952  {
954  if ((!onExit) && (!_isSaved)) // --- probably, user has cancelled the save dialog. Do not close
955  return false;
956  }
957  }
958 
959  map<QWidget*, YACS::HMI::QtGuiContext*>::iterator it = _mapViewContext.begin();
960  QtGuiContext* newContext = 0;
961  QWidget* newView = 0;
962  for (; it != _mapViewContext.end(); ++it)
963  {
964  if ((*it).second != context)
965  {
966  newView = (*it).first;
967  newContext = (*it).second;
968  break;
969  }
970  }
971  _wrapper->deleteSchema(view);
972  DEBTRACE("delete context");
973  if (GuiExecutor* exec = context->getGuiExecutor())
974  {
975  exec->closeContext();
976  }
977  delete context;
978  _mapViewContext.erase(view);
979  switchContext(newView, onExit);
980  return true;
981 }
void switchContext(QWidget *view, bool onExit=false)
Definition: GenericGui.cxx:824
static QtGuiContext * getQtCurrent()
YACS::HMI::GuiExecutor * getGuiExecutor()
bool deleteSchema(QWidget *viewWindow)

References DEBTRACE, YACS::HMI::Subject::erase(), and YACS::HMI::QtGuiContext::getGuiExecutor().

Referenced by Yacsgui::onTryClose().

◆ createActions()

void GenericGui::createActions ( )

Definition at line 189 of file GenericGui.cxx.

190 {
191  // QAction* createAction(const int id,
192  // const QString& toolTip,
193  // const QIcon& icon,
194  // const QString& menu,
195  // const QString& status,
196  // const int shortCut,
197  // QObject* parent =0,
198  // bool checkable = false,
199  // QObject* receiver =0,
200  // const char* member =0);
201 
202  _newSchemaAct = _wrapper->createAction(getMenuId(), tr("Create a new YACS Schema"), QIcon("icons:schema.png"),
203  tr("New Schema"), tr("Create a new YACS Schema"),
204  0, _parent, false, this, SLOT(onNewSchema()));
205  _newSchemaAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_N); // --- QKeySequence::New ambiguous in SALOME
206 
207  _importSchemaAct = _wrapper->createAction(getMenuId(), tr("Import a YACS Schema for edition"), QIcon("icons:import_dataflow.png"),
208  tr("Import Schema"), tr("Import a YACS Schema for edition"),
209  0, _parent, false, this, SLOT(onImportSchema()));
210  _importSchemaAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_O); // --- QKeySequence::Open ambiguous in SALOME
211 
212  _importSupervSchemaAct = _wrapper->createAction(getMenuId(), tr("Import a SUPERV Schema for edition"), QIcon("icons:import_superv_dataflow.png"),
213  tr("Import SUPERV Schema"), tr("Import a SUPERV Schema for edition"),
214  0, _parent, false, this, SLOT(onImportSupervSchema()));
215 
216  _exportSchemaAct = _wrapper->createAction(getMenuId(), tr("Save the current YACS Schema"), QIcon("icons:save_dataflow.png"),
217  tr("Save Schema"), tr("Save the current YACS Schema"),
218  0, _parent, false, this, SLOT(onExportSchema()));
219  _exportSchemaAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_S); // --- QKeySequence::Save ambiguous in SALOME
220 
221  _exportSchemaAsAct = _wrapper->createAction(getMenuId(), tr("Save the current YACS Schema As..."), QIcon("icons:export_dataflow.png"),
222  tr("Save Schema As"), tr("Save the current YACS Schema As..."),
223  0, _parent, false, this, SLOT(onExportSchemaAs()));
224  //_exportSchemaAsAct->setShortcut(QKeySequence::SaveAs); // --- ambiguous in SALOME
225 
226  _importCatalogAct = _wrapper->createAction(getMenuId(), tr("Import a Schema as a Catalog"), QIcon("icons:insert_file.png"),
227  tr("Import Catalog"), tr("Import a Schema as a Catalog"),
228  0, _parent, false, this, SLOT(onImportCatalog()));
229 
230 
231  _runLoadedSchemaAct = _wrapper->createAction(getMenuId(), tr("Prepare the current edited schema for run"), QIcon("icons:run_active.png"),
232  tr("Run Current Schema"), tr("Prepare the current edited schema for run"),
233  0, _parent, false, this, SLOT(onRunLoadedSchema()));
234 
235  _loadRunStateSchemaAct = _wrapper->createAction(getMenuId(), tr("Load a previous run state for this schema, prepare to run"), QIcon("icons:load_execution_state.png"),
236  tr("Load Run State"), tr("Load a previous run state for this schema, prepare to run"),
237  0, _parent, false, this, SLOT(onLoadRunStateSchema()));
238 
239  _loadAndRunSchemaAct = _wrapper->createAction(getMenuId(), tr("Load a schema for run"), QIcon("icons:run.png"),
240  tr("Load Schema to run"), tr("Load a schema for run"),
241  0, _parent, false, this, SLOT(onLoadAndRunSchema()));
242 
243  _chooseBatchJobAct = _wrapper->createAction(getMenuId(), tr("Choose Batch Job to watch"), QIcon("icons:batch.png"),
244  tr("Choose Batch Job to watch"), tr("Choose Batch Job to watch"),
245  0, _parent, false, this, SLOT(onChooseBatchJob()));
246 
247  _startResumeAct = _wrapper->createAction(getMenuId(), tr("Start or Resume Schema execution"), QIcon("icons:suspend_resume.png"),
248  tr("Start/Resume execution"), tr("Start or Resume Schema execution"),
249  0, _parent, false, this, SLOT(onStartResume()));
250 
251  _abortAct = _wrapper->createAction(getMenuId(), tr("Abort the current execution"), QIcon("icons:kill.png"),
252  tr("Abort execution"), tr("Abort the current execution"),
253  0, _parent, false, this, SLOT(onAbort()));
254 
255  _pauseAct = _wrapper->createAction(getMenuId(), tr("Suspend the current execution"), QIcon("icons:pause.png"),
256  tr("Suspend execution"), tr("Suspend the current execution"),
257  0, _parent, false, this, SLOT(onPause()));
258 
259  _resetAct = _wrapper->createAction(getMenuId(), tr("Reset error nodes and restart the current execution"), QIcon("icons:reset.png"),
260  tr("Restart execution"), tr("Restart the current execution with reset of error nodes"),
261  0, _parent, false, this, SLOT(onReset()));
262 
263 
264  _saveRunStateAct = _wrapper->createAction(getMenuId(), tr("Save the current run state"), QIcon("icons:save_dataflow_state.png"),
265  tr("Save State"), tr("Save the current run state"),
266  0, _parent, false, this, SLOT(onSaveRunState()));
267 
268  _newEditionAct = _wrapper->createAction(getMenuId(), tr("Edit again the current schema in a new context"), QIcon("icons:new_edition.png"),
269  tr("Edit Again"), tr("Edit again the current schema in a new context"),
270  0, _parent, false, this, SLOT(onNewEdition()));
271 
272 
273  _getYacsContainerLogAct = _wrapper->createAction(getMenuId(), tr("get YACS container log"), QIcon("icons:change_informations.png"),
274  tr("YACS Container Log"), tr("get YACS container log"),
275  0, _parent, false, this, SLOT(onGetYacsContainerLog()));
276 
277  _getErrorReportAct = _wrapper->createAction(getMenuId(), tr("get Node Error Report"), QIcon("icons:filter_notification.png"),
278  tr("Node Error Report"), tr("get Node Error Report"),
279  0, _parent, false, this, SLOT(onGetErrorReport()));
280 
281  _getErrorDetailsAct = _wrapper->createAction(getMenuId(), tr("get Node Error Details"), QIcon("icons:icon_text.png"),
282  tr("Node Error Details"), tr("get Node Error Details"),
283  0, _parent, false, this, SLOT(onGetErrorDetails()));
284 
285  _getContainerLogAct = _wrapper->createAction(getMenuId(), tr("get Node Container Log"), QIcon("icons:change_informations.png"),
286  tr("Node Container Log"), tr("get Node Container Log"),
287  0, _parent, false, this, SLOT(onGetContainerLog()));
288 
289  _shutdownProcAct = _wrapper->createAction(getMenuId(), tr("Shutdown Proc"), QIcon("icons:kill.png"),
290  tr("Shutdown Proc"), tr("Shutdown Proc"),
291  0, _parent, false, this, SLOT(onShutdownProc()));
292 
293 
294  _editDataTypesAct = _wrapper->createAction(getMenuId(), tr("Edit Data Types"), QIcon("icons:kill.png"),
295  tr("Edit Data Types"), tr("Edit Data Types"),
296  0, _parent, false, this, SLOT(onEditDataTypes()));
297 
298  _createDataTypeAct = _wrapper->createAction(getMenuId(), tr("Create Data Types"), QIcon("icons:kill.png"),
299  tr("Create Data Types"), tr("Create Data Types"),
300  0, _parent, false, this, SLOT(onCreateDataType()));
301 
302  _importDataTypeAct = _wrapper->createAction(getMenuId(), tr("Import Data Types, use drag and drop from catalog"), QIcon("icons:folder_cyan.png"),
303  tr("Import Data Types"), tr("Import Data Types, use drag and drop from catalog"),
304  0, _parent, false, this, SLOT(onImportDataType()));
305 
306  _newContainerAct = _wrapper->createAction(getMenuId(), tr("Create a New Container"), QIcon("icons:container.png"),
307  tr("Create Container"), tr("Create a New Container"),
308  0, _parent, false, this, SLOT(onNewContainer()));
309 
310  _newHPContainerAct = _wrapper->createAction(getMenuId(), tr("Create a New HP Container"), QIcon("icons:container.png"),
311  tr("Create HP Container"), tr("Create a New Homogeneous Pool Container."),
312  0, _parent, false, this, SLOT(onNewHPContainer()));
313 
314  _selectComponentInstanceAct = _wrapper->createAction(getMenuId(), tr("Select a Component Instance"), QIcon("icons:icon_select.png"),
315  tr("Select a Component Instance"), tr("Select a Component Instance"),
316  0, _parent, false, this, SLOT(onSelectComponentInstance()));
317 
318  _newSalomeComponentAct = _wrapper->createAction(getMenuId(), tr("Create a New SALOME Component Instance"), QIcon("icons:new_salome_component.png"),
319  tr("Create Component Instance"), tr("Create a New SALOME Component Instance"),
320  0, _parent, false, this, SLOT(onNewSalomeComponent()));
321 
322  _newSalomePythonComponentAct = _wrapper->createAction(getMenuId(), tr("Create a New SALOME Python Component"), QIcon("icons:new_salomepy_component.png"),
323  tr("SALOME Python Component"), tr("Create a New SALOME Python Component"),
324  0, _parent, false, this, SLOT(onNewSalomePythonComponent()));
325 
326  _newCorbaComponentAct = _wrapper->createAction(getMenuId(), tr("Create a New CORBA Component"), QIcon("icons:new_corba_component.png"),
327  tr("CORBA Component"), tr("Create a New CORBA Component"),
328  0, _parent, false, this, SLOT(onNewCorbaComponent()));
329 
330  _salomeServiceNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New SALOME Service Node"), QIcon("icons:new_salome_service_node.png"),
331  tr("SALOME Service Node"), tr("Create a New SALOME Service Node"),
332  0, _parent, false, this, SLOT(onSalomeServiceNode()));
333 
334  _serviceInlineNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Inline Service Node"), QIcon("icons:new_service_inline_node.png"),
335  tr("Inline Service Node"), tr("Create a New Inline Service Node"),
336  0, _parent, false, this, SLOT(onServiceInlineNode()));
337 
338  _CORBAServiceNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New CORBA Service Node"), QIcon("icons:new_corba_service_node.png"),
339  tr("CORBA Node"), tr("Create a New CORBA Service Node"),
340  0, _parent, false, this, SLOT(onCORBAServiceNode()));
341 
342  _nodeNodeServiceNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Node referencing a Node"), QIcon("icons:new_nodenode_service_node.png"),
343  tr("Ref on Node"), tr("Create a New Node referencing a Node"),
344  0, _parent, false, this, SLOT(onNodeNodeServiceNode()));
345 
346  _cppNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New C++ Node"), QIcon("icons:new_cpp_node.png"),
347  tr("Cpp Node"), tr("Create a New C++ Node"),
348  0, _parent, false, this, SLOT(onCppNode()));
349 
350  _inDataNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Input data Node"), QIcon("icons:node.png"),
351  tr("Input Data Node"), tr("Create a New Input data Node"),
352  0, _parent, false, this, SLOT(onInDataNode()));
353 
354  _outDataNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Output data Node"), QIcon("icons:node.png"),
355  tr("Output Data Node"), tr("Create a New Output data Node"),
356  0, _parent, false, this, SLOT(onOutDataNode()));
357 
358  _inStudyNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Input Study Node"), QIcon("icons:node.png"),
359  tr("Input Study Node"), tr("Create a New Input Study Node"),
360  0, _parent, false, this, SLOT(onInStudyNode()));
361 
362  _outStudyNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Output Study Node"), QIcon("icons:node.png"),
363  tr("Output Study Node"), tr("Create a New Output Study Node"),
364  0, _parent, false, this, SLOT(onOutStudyNode()));
365 
366  _inlineScriptNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Inline Python Script Node"), QIcon("icons:new_inline_script_node.png"),
367  tr("Inline Script Node"), tr("Create a New Inline Python Script Node"),
368  0, _parent, false, this, SLOT(onInlineScriptNode()));
369 
370  _inlineFunctionNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Inline Python Function Node"), QIcon("icons:new_inline_function_node.png"),
371  tr("Inline Function Node"), tr("Create a New Inline Python Function Node"),
372  0, _parent, false, this, SLOT(onInlineFunctionNode()));
373 
374  _blockNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Bloc Node"), QIcon("icons:new_block_node.png"),
375  tr("bloc Node"), tr("Create a New Bloc Node"),
376  0, _parent, false, this, SLOT(onBlockNode()));
377 
378  _FORNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New For Loop Node"), QIcon("icons:new_for_loop_node.png"),
379  tr("For Loop Node"), tr("Create a New For Loop Node"),
380  0, _parent, false, this, SLOT(onFORNode()));
381 
382  _FOREACHNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New For Each Loop Node"), QIcon("icons:new_foreach_loop_node.png"),
383  tr("For Each Loop Node"), tr("Create a New For Each Loop Node"),
384  0, _parent, false, this, SLOT(onFOREACHNode()));
385 
386  _WHILENodeAct = _wrapper->createAction(getMenuId(), tr("Create a New While Loop Node"), QIcon("icons:new_while_loop_node.png"),
387  tr("While Loop Node"), tr("Create a New While Loop Node"),
388  0, _parent, false, this, SLOT(onWHILENode()));
389 
390  _SWITCHNodeAct = _wrapper->createAction(getMenuId(), tr("Create a New Switch Node"), QIcon("icons:new_switch_loop_node.png"),
391  tr("Switch Node"), tr("Create a New Switch Node"),
392  0, _parent, false, this, SLOT(onSWITCHNode()));
393 
394  _OptimizerLoopAct = _wrapper->createAction(getMenuId(), tr("Create a New Optimizer Loop Node"), QIcon("icons:new_for_loop_node.png"),
395  tr("Optimizer Loop"), tr("Create a New Optimizer Loop"),
396  0, _parent, false, this, SLOT(onOptimizerLoop()));
397 
398  _nodeFromCatalogAct = _wrapper->createAction(getMenuId(), tr("Create a New Node from Catalog, use drag and drop from catalog"), QIcon("icons:new_from_library_node.png"),
399  tr("Node from Catalog"), tr("Create a New Node from Catalog, use drag and drop from catalog"),
400  0, _parent, false, this, SLOT(onNodeFromCatalog()));
401 
402  _deleteItemAct = _wrapper->createAction(getMenuId(), tr("Delete a Schema Item"), QIcon("icons:delete.png"),
403  tr("Delete Item"), tr("Delete a Schema Item"),
404  0, _parent, false, this, SLOT(onDeleteItem()));
405  _deleteItemAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_D); // --- QKeySequence::Delete dangerous...
406 
407  _cutItemAct = _wrapper->createAction(getMenuId(), tr("Cut a Schema Item"), QIcon("icons:cut.png"),
408  tr("Cut Item"), tr("Cut a Schema Item"),
409  0, _parent, false, this, SLOT(onCutItem()));
410  _cutItemAct->setShortcut(QKeySequence::Cut);
411 
412  _copyItemAct = _wrapper->createAction(getMenuId(), tr("Copy a Schema Item"), QIcon("icons:copy.png"),
413  tr("Copy Item"), tr("Copy a Schema Item"),
414  0, _parent, false, this, SLOT(onCopyItem()));
415  _copyItemAct->setShortcut(QKeySequence::Copy);
416 
417  _pasteItemAct = _wrapper->createAction(getMenuId(), tr("Paste a Schema Item"), QIcon("icons:paste.png"),
418  tr("Paste Item"), tr("Paste a Schema Item"),
419  0, _parent, false, this, SLOT(onPasteItem()));
420  _pasteItemAct->setShortcut(QKeySequence::Paste);
421 
422  _putInBlocAct = _wrapper->createAction(getMenuId(), tr("Put node in block"), QIcon("icons:paste.png"),
423  tr("Put node in block"), tr("Put node in block"),
424  0, _parent, false, this, SLOT(onPutInBloc()));
425 
426  _putGraphInBlocAct = _wrapper->createAction(getMenuId(), tr("Bloc"), QIcon("icons:new_block_node.png"),
427  tr("Bloc"), tr("Bloc"),
428  0, _parent, false, this, SLOT(onPutGraphInBloc()));
429 
430  _putGraphInForLoopAct = _wrapper->createAction(getMenuId(), tr("For Loop"), QIcon("icons:new_for_loop_node.png"),
431  tr("For Loop"), tr("For Loop"),
432  0, _parent, false, this, SLOT(onPutGraphInForLoop()));
433 
434  _putGraphInWhileLoopAct = _wrapper->createAction(getMenuId(), tr("While Loop"), QIcon("icons:new_while_loop_node.png"),
435  tr("While Loop"), tr("While Loop"),
436  0, _parent, false, this, SLOT(onPutGraphInWhileLoop()));
437 
438  _putGraphInOptimizerLoopAct = _wrapper->createAction(getMenuId(), tr("Optimizer Loop"), QIcon("icons:new_for_loop_node.png"),
439  tr("Optimizer Loop"), tr("Optimizer Loop"),
440  0, _parent, false, this, SLOT(onPutGraphInOptimizerLoop()));
441 
442  _arrangeLocalNodesAct = _wrapper->createAction(getMenuId(), tr("arrange nodes on that bloc level, without recursion"), QIcon("icons:arrange_nodes.png"),
443  tr("arrange local nodes"), tr("arrange nodes on that bloc level, without recursion"),
444  0, _parent, false, this, SLOT(onArrangeLocalNodes()));
445 
446  _arrangeRecurseNodesAct = _wrapper->createAction(getMenuId(), tr("arrange nodes on that bloc level, with recursion"), QIcon("icons:sample.png"),
447  tr("arrange nodes recursion"), tr("arrange nodes on that bloc level, with recursion"),
448  0, _parent, false, this, SLOT(onArrangeRecurseNodes()));
449 
450  _computeLinkAct = _wrapper->createAction(getMenuId(), tr("compute orthogonal links"), QIcon("icons:rebuild_links.png"),
451  tr("compute links"), tr("compute orthogonal links"),
452  0, _parent, false, this, SLOT(onRebuildLinks()));
453 
454  _zoomToBlocAct = _wrapper->createAction(getMenuId(), tr("zoom 2D view to selected bloc"), QIcon("icons:zoomToBloc.png"),
455  tr("zoom to bloc"), tr("zoom 2D view to the selected composed node"),
456  0, _parent, false, this, SLOT(onZoomToBloc()));
457 
458  _centerOnNodeAct = _wrapper->createAction(getMenuId(), tr("center 2D view on selected node"), QIcon("icons:centerOnNode.png"),
459  tr("center on node"), tr("center 2D view on selected node"),
460  0, _parent, false, this, SLOT(onCenterOnNode()));
461  _centerOnNodeAct->setShortcut(QKeySequence::Find);
462 
463  _shrinkExpand = _wrapper->createAction(getMenuId(), tr("shrink or expand the selected node"), QIcon("icons:shrinkExpand.png"),
464  tr("shrink/expand"), tr("shrink or expand the selected node"),
465  0, _parent, false, this, SLOT(onShrinkExpand()));
466 
467  _shrinkExpandChildren = _wrapper->createAction(getMenuId(), tr("shrink or expand direct children of the selected node"), QIcon("icons:shrinkExpand.png"),
468  tr("shrink/expand children"), tr("shrink or expand direct children of the selected node"),
469  0, _parent, false, this, SLOT(onShrinkExpandChildren()));
470 
471  _shrinkExpandElementaryRecursively = _wrapper->createAction(getMenuId(), tr("shrink or expand elementary nodes of the selected node recursively"), QIcon("icons:shrinkExpand.png"),
472  tr("shrink/expand elementary"), tr("shrink or expand elementary nodes of the selected node recursively"),
473  0, _parent, false, this, SLOT(onShrinkExpandElementaryRecursively()));
474 
475  _toggleStraightLinksAct = _wrapper->createAction(getMenuId(), tr("draw straight or orthogonal links"), QIcon("icons:straightLink.png"),
476  tr("straight/orthogonal"), tr("draw straight or orthogonal links"),
477  0, _parent, true, this, SLOT(onToggleStraightLinks(bool)));
478 
481 
482  _toggleAutomaticComputeLinkAct = _wrapper->createAction(getMenuId(), tr("compute othogonal links automatically when nodes move"), QIcon("icons:autoComputeLink.png"),
483  tr("automatic link"), tr("compute othogonal links automatically when nodes move"),
484  0, _parent, true, this, SLOT(onToggleAutomaticComputeLinks(bool)));
485 
488 
489  _toggleSimplifyLinkAct = _wrapper->createAction(getMenuId(), tr("simplify links by removing unnecessary direction changes"), QIcon("icons:simplifyLink.png"),
490  tr("simplify links"), tr("simplify links by removing unnecessary direction changes"),
491  0, _parent, true, this, SLOT(onToggleSimplifyLinks(bool)));
494 
495  _toggleForce2NodesLinkAct = _wrapper->createAction(getMenuId(), tr("force orthogonal links by adding an edge on simples links"), QIcon("icons:force2nodeLink.png"),
496  tr("force ortho links"), tr("force orthogonal links by adding an edge on simples links"),
497  0, _parent, true, this, SLOT(onToggleForce2NodesLinks(bool)));
498  _toggleForce2NodesLinkAct->setChecked(true);
499 
500  _toggleAddRowColsAct = _wrapper->createAction(getMenuId(), tr("allow more path for the links, for a better separation"), QIcon("icons:addRowCols.png"),
501  tr("separate links"), tr("allow more path for the links, for a better separation"),
502  0, _parent, true, this, SLOT(onToggleAddRowCols(bool)));
505 
506  _selectReferenceAct = _wrapper->createAction(getMenuId(), tr("select reference"), QIcon("icons:ob_service_node.png"),
507  tr("select reference"), tr("select reference"),
508  0, _parent, false, this, SLOT(onSelectReference()));
509 
510  _whatsThisAct = _wrapper->createAction(getMenuId(), tr("active whatsThis Mode to get help on widgets"), QIcon("icons:whatsThis.png"),
511  tr("whatsThis Mode"), tr("active whatsThis Mode to get help on widgets"),
512  0, _parent, false, this, SLOT(onWhatsThis()));
513  _whatsThisAct->setShortcut(QKeySequence::WhatsThis);
514 
515  _withoutStopModeAct = _wrapper->createAction(getMenuId(), tr("set execution mode without stop"), QIcon("icons:run_active.png"),
516  tr("mode without stop"), tr("set execution mode without stop"),
517  0, _parent, true, this, SLOT(onWithoutStopMode(bool)));
518 
519  _breakpointsModeAct = _wrapper->createAction(getMenuId(), tr("set execution mode with stop on breakpoints"), QIcon("icons:breakpoints_active.png"),
520  tr("mode breakpoints"), tr("set execution mode with stop on breakpoints"),
521  0, _parent, true, this, SLOT(onBreakpointsMode(bool)));
522 
523  _stepByStepModeAct = _wrapper->createAction(getMenuId(), tr("set execution mode step by step"), QIcon("icons:step_by_step_active.png"),
524  tr("mode step by step"), tr("set execution mode step by step"),
525  0, _parent, true, this, SLOT(onStepByStepMode(bool)));
526 
527  _toggleStopOnErrorAct = _wrapper->createAction(getMenuId(), tr("Force stop on first error during execution"), QIcon("icons:toggle_stop_on_error.png"),
528  tr("stop on error"), tr("Force stop on first error during execution"),
529  0, _parent, true, this, SLOT(onToggleStopOnError(bool)));
530 
531  _toggleSceneItemVisibleAct = _wrapper->createAction(getMenuId(), tr("toggle 2D scene item visibility"), QIcon("icons:toggleVisibility.png"),
532  tr("visible/hidden"), tr("toggle 2D scene item visibility"),
533  0, _parent, true, this, SLOT(onToggleSceneItemVisible(bool)));
534 
535 
536 
537  _showAllLinksAct = _wrapper->createAction(getMenuId(), tr("Show all the links"), QIcon("icons:showLink.png"),
538  tr("show all links"), tr("Show all the links"),
539  0, _parent, false, this, SLOT(onShowAllLinks()));
540 
541  _hideAllLinksAct = _wrapper->createAction(getMenuId(), tr("Hide all the links"), QIcon("icons:hideLink.png"),
542  tr("hide all links"), tr("Hide all the links"),
543  0, _parent, false, this, SLOT(onHideAllLinks()));
544 
545 
546  _showOnlyPortLinksAct = _wrapper->createAction(getMenuId(), tr("Show only links from/to this port"), QIcon("icons:showLink.png"),
547  tr("show only links"), tr("Show only links from/to this port"),
548  0, _parent, false, this, SLOT(onShowOnlyPortLinks()));
549 
550  _showPortLinksAct = _wrapper->createAction(getMenuId(), tr("Show links from/to this port"), QIcon("icons:showLink.png"),
551  tr("show links"), tr("Show links from/to this port"),
552  0, _parent, false, this, SLOT(onShowPortLinks()));
553 
554  _hidePortLinksAct = _wrapper->createAction(getMenuId(), tr("Hide links from/to this port"), QIcon("icons:hideLink.png"),
555  tr("hide links"), tr("Hide links from/to this port"),
556  0, _parent, false, this, SLOT(onHidePortLinks()));
557 
558 
559  _showOnlyCtrlLinksAct = _wrapper->createAction(getMenuId(), tr("Show only control links from/to this node"), QIcon("icons:showLink.png"),
560  tr("show only Control links"), tr("Show only control links from/to this node"),
561  0, _parent, false, this, SLOT(onShowOnlyCtrlLinks()));
562 
563  _showCtrlLinksAct = _wrapper->createAction(getMenuId(), tr("Show control links from/to this node"), QIcon("icons:showLink.png"),
564  tr("show control links"), tr("Show control links from/to this node"),
565  0, _parent, false, this, SLOT(onShowCtrlLinks()));
566 
567  _hideCtrlLinksAct = _wrapper->createAction(getMenuId(), tr("Hide control links from/to this node"), QIcon("icons:hideLink.png"),
568  tr("hide control links"), tr("Hide control links from/to this node"),
569  0, _parent, false, this, SLOT(onHideCtrlLinks()));
570 
571 
572  _showOnlyLinkAct = _wrapper->createAction(getMenuId(), tr("Show only this link"), QIcon("icons:showLink.png"),
573  tr("show only"), tr("Show only this link"),
574  0, _parent, false, this, SLOT(onShowOnlyLink()));
575 
576  _showLinkAct = _wrapper->createAction(getMenuId(), tr("Show this link"), QIcon("icons:showLink.png"),
577  tr("show"), tr("Show this link"),
578  0, _parent, false, this, SLOT(onShowLink()));
579 
580  _hideLinkAct = _wrapper->createAction(getMenuId(), tr("Hide this link"), QIcon("icons:hideLink.png"),
581  tr("hide"), tr("Hide this link"),
582  0, _parent, false, this, SLOT(onHideLink()));
583 
584 
585  _emphasisPortLinksAct = _wrapper->createAction(getMenuId(), tr("emphasis on links from/to this port"), QIcon("icons:emphasisLink.png"),
586  tr("emphasize links"), tr("emphasis on links from/to this port"),
587  0, _parent, false, this, SLOT(onEmphasisPortLinks()));
588 
589  _emphasisCtrlLinksAct = _wrapper->createAction(getMenuId(), tr("emphasis on control links from/to this node"), QIcon("icons:emphasisLink.png"),
590  tr("emphasize control links"), tr("emphasis on control links from/to this node"),
591  0, _parent, false, this, SLOT(onEmphasisCtrlLinks()));
592 
593  _emphasisLinkAct = _wrapper->createAction(getMenuId(), tr("emphasis on this link"), QIcon("icons:emphasisLink.png"),
594  tr("emphasize"), tr("emphasis on this link"),
595  0, _parent, false, this, SLOT(onEmphasisLink()));
596 
597  _deEmphasizeAllAct = _wrapper->createAction(getMenuId(), tr("remove all emphasis"), QIcon("icons:deEmphasisLink.png"),
598  tr("remove all emphasis"), tr("remove all emphasis"),
599  0, _parent, false, this, SLOT(onDeEmphasizeAll()));
600 
601 
602  _undoAct = _wrapper->createAction(getMenuId(), tr("undo last action"), QIcon("icons:undo.png"),
603  tr("undo"), tr("undo last action"),
604  0, _parent, false, this, SLOT(onUndo()));
605  _undoAct->setShortcut(QKeySequence::Undo);
606 
607  _redoAct = _wrapper->createAction(getMenuId(), tr("redo last action"), QIcon("icons:redo.png"),
608  tr("redo"), tr("redo last action"),
609  0, _parent, false, this, SLOT(onRedo()));
610  _redoAct->setShortcut(QKeySequence::Redo);
611 
612  _showUndoAct = _wrapper->createAction(getMenuId(), tr("show undo commands"), QIcon("icons:undo.png"),
613  tr("show undo"), tr("show undo commands"),
614  0, _parent, false, this, SLOT(onShowUndo()));
615 
616  _showRedoAct = _wrapper->createAction(getMenuId(), tr("show redo commands"), QIcon("icons:redo.png"),
617  tr("show redo"), tr("show redo commands"),
618  0, _parent, false, this, SLOT(onShowRedo()));
619 
620 
621  _execModeGroup = new QActionGroup(this);
625  _withoutStopModeAct->setChecked(true);
626 }
QAction * _CORBAServiceNodeAct
Definition: GenericGui.hxx:133
QAction * _stepByStepModeAct
Definition: GenericGui.hxx:112
QAction * _getErrorReportAct
Definition: GenericGui.hxx:117
QAction * _OptimizerLoopAct
Definition: GenericGui.hxx:148
QAction * _nodeNodeServiceNodeAct
Definition: GenericGui.hxx:134
QAction * _inlineScriptNodeAct
Definition: GenericGui.hxx:141
QAction * _arrangeRecurseNodesAct
Definition: GenericGui.hxx:160
QAction * _getYacsContainerLogAct
Definition: GenericGui.hxx:116
QAction * _getContainerLogAct
Definition: GenericGui.hxx:119
QAction * _importSupervSchemaAct
Definition: GenericGui.hxx:92
QAction * _showCtrlLinksAct
Definition: GenericGui.hxx:186
QAction * _emphasisPortLinksAct
Definition: GenericGui.hxx:183
QAction * _newCorbaComponentAct
Definition: GenericGui.hxx:130
QAction * _putGraphInForLoopAct
Definition: GenericGui.hxx:156
QAction * _withoutStopModeAct
Definition: GenericGui.hxx:110
QAction * _selectReferenceAct
Definition: GenericGui.hxx:174
QAction * _inlineFunctionNodeAct
Definition: GenericGui.hxx:142
QAction * _toggleSceneItemVisibleAct
Definition: GenericGui.hxx:173
QAction * _toggleStopOnErrorAct
Definition: GenericGui.hxx:114
void onToggleStopOnError(bool checked)
QAction * _breakpointsModeAct
Definition: GenericGui.hxx:111
QAction * _getErrorDetailsAct
Definition: GenericGui.hxx:118
QAction * _newHPContainerAct
Definition: GenericGui.hxx:126
QAction * _hideCtrlLinksAct
Definition: GenericGui.hxx:187
void onStepByStepMode(bool checked)
QAction * _emphasisLinkAct
Definition: GenericGui.hxx:193
QAction * _chooseBatchJobAct
Definition: GenericGui.hxx:91
QAction * _importSchemaAct
Definition: GenericGui.hxx:90
void onWithoutStopMode(bool checked)
QActionGroup * _execModeGroup
Definition: GenericGui.hxx:109
QAction * _putGraphInBlocAct
Definition: GenericGui.hxx:155
QAction * _emphasisCtrlLinksAct
Definition: GenericGui.hxx:188
QAction * _showOnlyCtrlLinksAct
Definition: GenericGui.hxx:185
void onRunLoadedSchema(bool withState=false)
QAction * _salomeServiceNodeAct
Definition: GenericGui.hxx:131
void onToggleForce2NodesLinks(bool checked)
QAction * _hidePortLinksAct
Definition: GenericGui.hxx:182
QAction * _serviceInlineNodeAct
Definition: GenericGui.hxx:132
QAction * _importDataTypeAct
Definition: GenericGui.hxx:124
QAction * _newSalomeComponentAct
Definition: GenericGui.hxx:128
QAction * _toggleAutomaticComputeLinkAct
Definition: GenericGui.hxx:169
QAction * _editDataTypesAct
Definition: GenericGui.hxx:122
QAction * _toggleSimplifyLinkAct
Definition: GenericGui.hxx:170
QAction * _runLoadedSchemaAct
Definition: GenericGui.hxx:97
void onBreakpointsMode(bool checked)
QAction * _outStudyNodeAct
Definition: GenericGui.hxx:140
QAction * _shrinkExpandElementaryRecursively
Definition: GenericGui.hxx:166
void onToggleSimplifyLinks(bool checked)
void onToggleAutomaticComputeLinks(bool checked)
QAction * _nodeFromCatalogAct
Definition: GenericGui.hxx:149
QAction * _saveRunStateAct
Definition: GenericGui.hxx:106
QAction * _hideAllLinksAct
Definition: GenericGui.hxx:178
QAction * _arrangeLocalNodesAct
Definition: GenericGui.hxx:159
QAction * _loadAndRunSchemaAct
Definition: GenericGui.hxx:99
QAction * _shrinkExpandChildren
Definition: GenericGui.hxx:165
void onShrinkExpandElementaryRecursively()
QAction * _putGraphInWhileLoopAct
Definition: GenericGui.hxx:157
QAction * _toggleStraightLinksAct
Definition: GenericGui.hxx:168
QAction * _toggleForce2NodesLinkAct
Definition: GenericGui.hxx:171
QAction * _showOnlyLinkAct
Definition: GenericGui.hxx:190
QAction * _exportSchemaAct
Definition: GenericGui.hxx:93
QAction * _showOnlyPortLinksAct
Definition: GenericGui.hxx:180
QAction * _shutdownProcAct
Definition: GenericGui.hxx:120
void onToggleAddRowCols(bool checked)
QAction * _selectComponentInstanceAct
Definition: GenericGui.hxx:127
QAction * _centerOnNodeAct
Definition: GenericGui.hxx:163
QAction * _deEmphasizeAllAct
Definition: GenericGui.hxx:194
QAction * _showAllLinksAct
Definition: GenericGui.hxx:177
QAction * _importCatalogAct
Definition: GenericGui.hxx:95
QAction * _toggleAddRowColsAct
Definition: GenericGui.hxx:172
QAction * _newContainerAct
Definition: GenericGui.hxx:125
QAction * _newSalomePythonComponentAct
Definition: GenericGui.hxx:129
void onToggleSceneItemVisible(bool checked)
QAction * _showPortLinksAct
Definition: GenericGui.hxx:181
QAction * _putGraphInOptimizerLoopAct
Definition: GenericGui.hxx:158
QAction * _exportSchemaAsAct
Definition: GenericGui.hxx:94
QAction * _createDataTypeAct
Definition: GenericGui.hxx:123
void onToggleStraightLinks(bool checked)
QAction * _loadRunStateSchemaAct
Definition: GenericGui.hxx:98
static bool simplifyLink
Definition: Resource.hxx:212
static bool straightLinks
Definition: Resource.hxx:210
static bool addRowCols
Definition: Resource.hxx:209
static bool autoComputeLinks
Definition: Resource.hxx:211
QAction * createAction(const int id, const QString &toolTip, const QIcon &icon, const QString &menu, const QString &status, const int shortCut, QObject *parent=0, bool checkable=false, QObject *receiver=0, const char *member=0)

Referenced by Yacsgui::initialize().

◆ createContext()

void GenericGui::createContext ( YACS::ENGINE::Proc proc,
const QString &  schemaName,
const QString &  runName,
bool  forEdition 
)

a QtGuiContext instance is created for each schema in edition or each execution or run of a schema. The context stores references of a lot of objects related to the edition or execution.

Parameters
procthe schema to run or edit, loaded from file or just created empty.
schemaNamefilename of the schema in edition, also used in execution to publish a run under the edition name in Salome object browser.
runNamefilename of the schema in execution, not used in edition.
forEditionif true, edition mode, if false, execution mode.

Definition at line 1043 of file GenericGui.cxx.

1047 {
1048  DEBTRACE("GenericGui::createContext");
1049  clock_t start_t;
1050  clock_t end_t;
1051  start_t = clock();
1052 
1053 
1054  QWidget* central = _parent->centralWidget();
1055  if (central)
1056  central->setFocus();
1057  else
1058  DEBTRACE("No Central Widget");
1059 
1060  QString fileName;
1061  QWidget* refWindow = 0; // --- used only on run to refer to the schema in edition
1062  if (forEdition)
1063  {
1064  fileName = schemaName;
1065  }
1066  else
1067  {
1068  fileName = runName;
1070  refWindow = QtGuiContext::getQtCurrent()->getWindow();
1071  }
1072 
1073  QtGuiContext* context = new QtGuiContext(this);
1074  QtGuiContext::setQtCurrent(context);
1075 
1076  // --- catalogs
1077 
1078  context->setEdition(forEdition);
1080  context->setFileName(fileName);
1082 
1083  // --- scene, viewWindow & GraphicsView
1084 
1085  Scene *scene = new Scene();
1086  QWidget *viewWindow = _wrapper->getNewWindow(scene);
1087  _mapViewContext[viewWindow] = context;
1088  GraphicsView* gView = new GraphicsView(viewWindow);
1089  gView->setScene(scene);
1090  gView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
1091  _wrapper->AssociateViewToWindow(gView, viewWindow);
1092  context->setScene(scene);
1093  context->setView(gView);
1094  context->setWindow(viewWindow);
1095  gView->show();
1096 
1097  // --- Schema Model
1098 
1099  SchemaModel *schemaModel = new SchemaModel(context, viewWindow);
1100  schemaModel->setEdition(forEdition);
1101  context->setSchemaModel(schemaModel);
1102  RootSceneItem *rootSceneItem = new RootSceneItem(context);
1103 
1104  // --- tree associated to model
1105 
1106  FormEditTree *editTree = new FormEditTree(_dwTree);
1107  editTree->setMinimumHeight(400);
1108  _dwTree->setWidget(editTree);
1109  editTree->show();
1110  context->setEditTree(editTree);
1111  editTree->tv_schema->setModel(schemaModel);
1112  context->setSelectionModel(editTree->tv_schema->selectionModel());
1113  _dwTree->raise();
1114 
1115  QObject::connect(editTree->tv_schema->selectionModel(),
1116  SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
1117  schemaModel,
1118  SLOT(updateSelection(const QItemSelection &, const QItemSelection &)));
1119 
1120  // --- stacked widget
1121 
1122  QStackedWidget *stacked = new QStackedWidget(_dwStacked);
1123  _dwStacked->setWidget(stacked);
1124  context->setStackedWidget(stacked);
1126  0,
1127  context->getName().c_str());
1128  context->setEditionRoot(rootEdit);
1129 
1130  QObject::connect(schemaModel,
1131  SIGNAL(signalSelection(const QModelIndex &)),
1132  editTree->tv_schema,
1133  SLOT(viewSelection(const QModelIndex &)));
1134 
1135  // --- load schema
1136 
1137  proc->setEdition(forEdition);
1138 
1139  {
1140  end_t = clock();
1141  double passe = (end_t -start_t);
1142  passe = passe/CLOCKS_PER_SEC;
1143  DEBTRACE("create context -1- : " << passe);
1144  start_t = end_t;
1145  }
1146 
1147  context->setLoading(true);
1148 
1149  context->setProc(proc);
1150  setLoadedPresentation(proc);
1151 
1152  {
1153  end_t = clock();
1154  double passe = (end_t -start_t);
1155  passe = passe/CLOCKS_PER_SEC;
1156  DEBTRACE("create context - load proc- : " << passe);
1157  start_t = end_t;
1158  }
1159 
1160  context->setLoading(false);
1161 
1162  if (forEdition && _wrapper) // --- Edition mode
1163  {
1164  _wrapper->createNewSchema(fileName, viewWindow);
1165  }
1166  else if (_wrapper) // --- Execution Mode
1167  {
1168  GuiExecutor *guiExec = new GuiExecutor(proc);
1169  context->setGuiExecutor(guiExec);
1170  _wrapper->createNewRun(schemaName, fileName, refWindow, viewWindow);
1171  }
1172 
1173 
1176  0); // --- force validity check
1177 
1178  // --- adjust widgets
1179 
1180  TreeView *vtree = dynamic_cast<TreeView*>(editTree->tv_schema);
1181  YASSERT(vtree);
1182  vtree->resizeColumns();
1183  _catalogsWidget->setMinimumWidth(10); // --- reset the constraint on width
1184  editTree->setMinimumHeight(40);
1185  _dwStacked->setMinimumWidth(10);
1186  // --- show menus
1187 
1188  if (forEdition)
1189  {
1190  showExecMenus(false);
1191  showEditionMenus(true);
1192  showCommonMenus(true);
1193  if (_dwTree) _dwTree->setWindowTitle("Tree View: edition mode");
1194  }
1195  else
1196  {
1197  showEditionMenus(false);
1198  showExecMenus(true);
1199  showCommonMenus(true);
1200  _withoutStopModeAct->setChecked(true);
1201  if (_dwTree) _dwTree->setWindowTitle("Tree View: execution mode");
1202  }
1203 
1205  {
1206  end_t = clock();
1207  double passe = (end_t -start_t);
1208  passe = passe/CLOCKS_PER_SEC;
1209  DEBTRACE("create context - end - : " << passe);
1210  start_t = end_t;
1211  }
1212 }
#define YASSERT(val)
YASSERT macro is always defined, used like assert, but throw a YACS::Exception instead of abort.
Definition: YacsTrace.hxx:59
virtual void setEdition(bool edition)
Definition: Proc.cxx:448
void showEditionMenus(bool show)
Definition: GenericGui.cxx:759
void showExecMenus(bool show)
Definition: GenericGui.cxx:780
void showCommonMenus(bool show)
Definition: GenericGui.cxx:805
void setLoadedPresentation(YACS::ENGINE::Proc *proc)
void setSessionCatalog(YACS::ENGINE::Catalog *cata)
Definition: guiContext.hxx:59
void setCurrentCatalog(YACS::ENGINE::Catalog *cata)
Definition: guiContext.hxx:61
void setNotSaved(bool isNotSaved)
Definition: guiContext.hxx:64
YACS::HMI::SubjectProc * getSubjectProc()
Definition: guiContext.hxx:52
void setLoading(bool isLoading)
Definition: guiContext.hxx:65
static TypeOfElem getTypeOfNode(YACS::ENGINE::Node *node)
void setEditionRoot(YACS::HMI::ItemEditionRoot *re)
void setSelectionModel(QItemSelectionModel *selmod)
void setView(YACS::HMI::GraphicsView *view)
void setEditTree(FormEditTree *editTree)
void setStackedWidget(QStackedWidget *sw)
void setWindow(QWidget *window)
void setGuiExecutor(YACS::HMI::GuiExecutor *guiEx)
void setFileName(const QString &fileName)
void setScene(QGraphicsScene *scene)
void setEdition(bool isEdition)
void setSchemaModel(YACS::HMI::SchemaModel *model)
virtual void setProc(YACS::ENGINE::Proc *proc)
static void setQtCurrent(QtGuiContext *context)
void setEdition(bool isEdition=true)
virtual void update(GuiEvent event, int type, Subject *son)
virtual std::string getName()
void AssociateViewToWindow(QGraphicsView *gView, QWidget *viewWindow)
Definition: SuitWrapper.cxx:63
void createNewRun(const QString &schemaName, const QString &runName, QWidget *refWindow, QWidget *viewWindow)
QWidget * getNewWindow(QGraphicsScene *scene)
Definition: SuitWrapper.cxx:57
void createNewSchema(const QString &schemaName, QWidget *viewWindow)

References DEBTRACE, YACS::HMI::Subject::getName(), YACS::HMI::TreeView::resizeColumns(), YACS::HMI::GuiContext::setCurrentCatalog(), YACS::ENGINE::Proc::setEdition(), YACS::HMI::QtGuiContext::setEdition(), YACS::HMI::SchemaModel::setEdition(), YACS::HMI::QtGuiContext::setEditionRoot(), YACS::HMI::QtGuiContext::setEditTree(), YACS::HMI::QtGuiContext::setFileName(), YACS::HMI::QtGuiContext::setGuiExecutor(), YACS::HMI::GuiContext::setLoading(), YACS::HMI::QtGuiContext::setProc(), YACS::HMI::QtGuiContext::setScene(), YACS::HMI::QtGuiContext::setSchemaModel(), YACS::HMI::QtGuiContext::setSelectionModel(), YACS::HMI::GuiContext::setSessionCatalog(), YACS::HMI::QtGuiContext::setStackedWidget(), YACS::HMI::QtGuiContext::setView(), YACS::HMI::QtGuiContext::setWindow(), YACS::HMI::UPDATE, and YASSERT.

Referenced by YACS::HMI::BatchJobsListDialog::userOK().

◆ createForEachLoop()

void GenericGui::createForEachLoop ( std::string  type = "double")

Definition at line 2070 of file GenericGui.cxx.

2071 {
2072  DEBTRACE("GenericGui::createForEachLoop");
2074 }
void CreateForEachLoop(std::string type)
Definition: GuiEditor.cxx:231

References DEBTRACE.

Referenced by YACS::HMI::MenusBase::foreachAction().

◆ createMenus()

void GenericGui::createMenus ( )

Definition at line 628 of file GenericGui.cxx.

629 {
630  int aMenuId;
631  aMenuId = _wrapper->createMenu( tr( "File" ), -1, -1 );
632  _wrapper->createMenu( _wrapper->separator(), aMenuId, -1, 10 );
633  aMenuId = _wrapper->createMenu( "YACS", aMenuId, -1, 10 );
634  _wrapper->createMenu( _newSchemaAct, aMenuId );
635  _wrapper->createMenu( _importSchemaAct, aMenuId );
636 
637  aMenuId = _wrapper->createMenu( "YACS", -1, -1, 30 );
638  _wrapper->createMenu( _newSchemaAct, aMenuId );//, 10
639  _wrapper->createMenu( _importSchemaAct, aMenuId );
641  _wrapper->createMenu( _wrapper->separator(), aMenuId);
642  _wrapper->createMenu( _exportSchemaAct, aMenuId );
644  _wrapper->createMenu( _wrapper->separator(), aMenuId);
649  _wrapper->createMenu( _wrapper->separator(), aMenuId);
650  _wrapper->createMenu( _undoAct, aMenuId );
651  _wrapper->createMenu( _redoAct, aMenuId );
652  _wrapper->createMenu( _showUndoAct, aMenuId );
653  _wrapper->createMenu( _showRedoAct, aMenuId );
654  _wrapper->createMenu( _wrapper->separator(), aMenuId);
655  _wrapper->createMenu( _startResumeAct, aMenuId );
656  _wrapper->createMenu( _abortAct, aMenuId );
657  _wrapper->createMenu( _pauseAct, aMenuId );
658  _wrapper->createMenu( _resetAct, aMenuId );
659  _wrapper->createMenu( _wrapper->separator(), aMenuId);
660  _wrapper->createMenu( _saveRunStateAct, aMenuId );
661  //_wrapper->createMenu( _newEditionAct, aMenuId );
662  _wrapper->createMenu( _wrapper->separator(), aMenuId);
666  _wrapper->createMenu( _wrapper->separator(), aMenuId);
668  _wrapper->createMenu( _wrapper->separator(), aMenuId);
670  _wrapper->createMenu( _wrapper->separator(), aMenuId);
676  _wrapper->createMenu( _wrapper->separator(), aMenuId);
677  _wrapper->createMenu( _showAllLinksAct, aMenuId );
678  _wrapper->createMenu( _hideAllLinksAct, aMenuId );
679  _wrapper->createMenu( _wrapper->separator(), aMenuId);
680  _wrapper->createMenu( _whatsThisAct, aMenuId );
681 }
int createMenu(const QString &subMenu, const int parentMenuId, const int menuId=-1, const int groupId=-1, const int index=-1)
static QAction * separator()

Referenced by Yacsgui::initialize().

◆ createTools()

void GenericGui::createTools ( )

Definition at line 683 of file GenericGui.cxx.

684 {
685  int aToolId = _wrapper->createTool ( tr( "YACS Toolbar" ), QString( "YACSToolbar" ) );
686  _wrapper->createTool( _newSchemaAct, aToolId );
687  _wrapper->createTool( _importSchemaAct, aToolId );
688  _wrapper->createTool( _wrapper->separator(), aToolId );
689  _wrapper->createTool( _exportSchemaAct, aToolId );
691  _wrapper->createTool( _wrapper->separator(), aToolId);
696  _wrapper->createTool( _wrapper->separator(), aToolId );
697  _wrapper->createTool( _undoAct, aToolId );
698  _wrapper->createTool( _redoAct, aToolId );
699  _wrapper->createTool( _wrapper->separator(), aToolId );
700  _wrapper->createTool( _startResumeAct, aToolId );
701  _wrapper->createTool( _abortAct, aToolId );
702  _wrapper->createTool( _pauseAct, aToolId );
703  _wrapper->createTool( _resetAct, aToolId );
704  _wrapper->createTool( _wrapper->separator(), aToolId );
705  _wrapper->createTool( _saveRunStateAct, aToolId );
706  //_wrapper->createTool( _newEditionAct, aToolId );
710  _wrapper->createTool( _wrapper->separator(), aToolId );
712  _wrapper->createTool( _wrapper->separator(), aToolId );
714  _wrapper->createTool( _wrapper->separator(), aToolId );
718  //_wrapper->createTool( _toggleForce2NodesLinkAct, aToolId );
720  _wrapper->createTool( _wrapper->separator(), aToolId );
721  _wrapper->createTool( _showAllLinksAct, aToolId );
722  _wrapper->createTool( _hideAllLinksAct, aToolId );
723  _wrapper->createTool( _wrapper->separator(), aToolId );
724  _wrapper->createTool( _whatsThisAct, aToolId );
725 }
int createTool(const QString &title, const QString &name=QString())

Referenced by Yacsgui::initialize().

◆ displayALink()

void GenericGui::displayALink ( bool  isShown)
private

Definition at line 2374 of file GenericGui.cxx.

2375 {
2377  if (! QtGuiContext::getQtCurrent()->_mapOfSceneItem.count(sub)) return;
2379  item->setVisible(isShown);
2380 }
std::map< YACS::HMI::Subject *, YACS::HMI::SceneItem * > _mapOfSceneItem
YACS::HMI::Subject * getSelectedSubject()

◆ displayControlLinks()

void GenericGui::displayControlLinks ( bool  isShown)
private

Definition at line 2323 of file GenericGui.cxx.

2324 {
2325  if (!QtGuiContext::getQtCurrent()) return;
2326  map<pair<YACS::ENGINE::Node*, YACS::ENGINE::Node*>,YACS::HMI::SubjectControlLink*>::const_iterator it;
2327  for (it = QtGuiContext::getQtCurrent()->_mapOfSubjectControlLink.begin();
2329  ++it)
2330  {
2331  YACS::HMI::SubjectControlLink* sub = (*it).second;
2332  if (!sub) continue;
2334  item->setVisible(isShown);
2335  }
2336 }
std::map< std::pair< YACS::ENGINE::Node *, YACS::ENGINE::Node * >, YACS::HMI::SubjectControlLink * > _mapOfSubjectControlLink
Definition: guiContext.hxx:73

◆ displayLinks()

void GenericGui::displayLinks ( bool  isShown)
private

Definition at line 2308 of file GenericGui.cxx.

2309 {
2310  if (!QtGuiContext::getQtCurrent()) return;
2311  map<pair<YACS::ENGINE::OutPort*, YACS::ENGINE::InPort*>,YACS::HMI::SubjectLink*>::const_iterator it;
2312  for (it = QtGuiContext::getQtCurrent()->_mapOfSubjectLink.begin();
2314  ++it)
2315  {
2316  YACS::HMI::SubjectLink* sub = (*it).second;
2317  if (!sub) continue;
2319  item->setVisible(isShown);
2320  }
2321 }
std::map< std::pair< YACS::ENGINE::OutPort *, YACS::ENGINE::InPort * >, YACS::HMI::SubjectLink * > _mapOfSubjectLink
Definition: guiContext.hxx:72

◆ displayPortLinks()

void GenericGui::displayPortLinks ( bool  isShown)
private

Definition at line 2338 of file GenericGui.cxx.

2339 {
2341  DEBTRACE("displayPortLinks, subject : " << sub->getName());
2342  SubjectDataPort *sport = dynamic_cast<SubjectDataPort*>(sub);
2343  if (sport)
2344  {
2345  DEBTRACE("dataPort : " << sport->getName());
2346  list<SubjectLink*> linkList = sport->getListOfSubjectLink();
2347  list<SubjectLink*>::const_iterator it = linkList.begin();
2348  for( ; it != linkList.end(); ++it)
2349  {
2350  YACS::HMI::SubjectLink* sub = (*it);
2351  if (!sub) continue;
2353  item->setVisible(isShown);
2354  }
2355  return;
2356  }
2357  SubjectNode *snode = dynamic_cast<SubjectNode*>(sub);
2358  if (snode)
2359  {
2360  DEBTRACE("Node : " << snode->getName());
2361  list<SubjectControlLink*> linkList = snode->getSubjectControlLinks();
2362  list<SubjectControlLink*>::const_iterator it = linkList.begin();
2363  for( ; it != linkList.end(); ++it)
2364  {
2365  YACS::HMI::SubjectControlLink* sub = (*it);
2366  if (!sub) continue;
2368  item->setVisible(isShown);
2369  }
2370  return;
2371  }
2372 }
std::list< SubjectLink * > getListOfSubjectLink()
virtual std::string getName()
virtual std::string getName()
std::list< SubjectControlLink * > getSubjectControlLinks() const

References DEBTRACE, YACS::HMI::SubjectDataPort::getListOfSubjectLink(), YACS::HMI::Subject::getName(), YACS::HMI::SubjectDataPort::getName(), YACS::HMI::SubjectNode::getName(), and YACS::HMI::SubjectNode::getSubjectControlLinks().

◆ emphasizePortLink()

void GenericGui::emphasizePortLink ( YACS::HMI::SubjectDataPort sub,
bool  emphasize 
)
private

Definition at line 2591 of file GenericGui.cxx.

2592 {
2593  DEBTRACE("dataPort : " << sub->getName());
2594  list<SubjectLink*> linkList = sub->getListOfSubjectLink();
2595  list<SubjectLink*>::const_iterator it = linkList.begin();
2596  for( ; it != linkList.end(); ++it)
2597  {
2598  YACS::HMI::SubjectLink* subli = (*it);
2599  if (!subli) continue;
2600  subli->update(EMPHASIZE, emphasize, sub);
2601  Subject *sin = subli->getSubjectInPort();
2602  Subject *sout = subli->getSubjectOutPort();
2603  sin->update(EMPHASIZE, emphasize, sub);
2604  sout->update(EMPHASIZE, emphasize, sub);
2605  }
2606 }
virtual void update(GuiEvent event, int type, Subject *son)

References DEBTRACE, YACS::HMI::EMPHASIZE, YACS::HMI::SubjectDataPort::getListOfSubjectLink(), YACS::HMI::SubjectDataPort::getName(), YACS::HMI::SubjectLink::getSubjectInPort(), YACS::HMI::SubjectLink::getSubjectOutPort(), and YACS::HMI::Subject::update().

◆ getCatalogWidget()

CatalogWidget* YACS::HMI::GenericGui::getCatalogWidget ( )
inline

◆ getLoader()

YACSGuiLoader* YACS::HMI::GenericGui::getLoader ( )
inline

Definition at line 87 of file GenericGui.hxx.

87 { return _loader; };

Referenced by YACS::HMI::BatchJobsListDialog::userOK().

◆ getMachineList()

std::list< std::string > GenericGui::getMachineList ( )

Definition at line 999 of file GenericGui.cxx.

1000 {
1001  if (!_machineList.empty()) return _machineList;
1002 
1004  CORBA::ORB_ptr orb = runTime->getOrb();
1005  if (!orb) return _machineList;
1006 
1007  SALOME_NamingService_Wrapper namingService(orb);
1008  SALOME_LifeCycleCORBA lcc(&namingService);
1009 
1010  CORBA::Object_var obj =
1011  namingService.Resolve(SALOME_ResourcesManager::_ResourcesManagerNameInNS);
1012  if (CORBA::is_nil(obj)) return _machineList;
1013 
1014  Engines::ResourcesManager_var resManager = Engines::ResourcesManager::_narrow(obj);
1015  if(!resManager) return _machineList;
1016 
1017  Engines::ResourceParameters params;
1018  lcc.preSet(params);
1019 
1020  Engines::ResourceList* resourceList =
1021  resManager->GetFittingResources(params);
1022 
1023  for (int i = 0; i < resourceList->length(); i++)
1024  {
1025  const char* aResource = (*resourceList)[i];
1026  _machineList.push_back(aResource);
1027  }
1028 
1029  return _machineList;
1030 }

References YACS::ENGINE::RuntimeSALOME::getOrb(), YACS::ENGINE::getSALOMERuntime(), yacsorb.CORBAEngineTest::i, orb, and SALOME_NamingService_Wrapper::Resolve().

◆ getMenuId()

int YACS::HMI::GenericGui::getMenuId ( )
inlineprotected

Definition at line 208 of file GenericGui.hxx.

208 { return _menuId++; }

◆ getSaveFileName()

QString GenericGui::getSaveFileName ( const QString &  fileName = QString())
protected

bug confirmOverwrite : correction Qt 4.3.5

Definition at line 1504 of file GenericGui.cxx.

1505 {
1506  QFileDialog dialog(_parent, "Save schema", fileName);
1507  QStringList filters;
1508  filters << "XML files (*.xml)"
1509  << "Any files (*)";
1510  dialog.setFileMode(QFileDialog::AnyFile);
1511  dialog.setNameFilters(filters);
1512  dialog.selectNameFilter("(*.xml)");
1513  dialog.setDefaultSuffix("xml");
1514  dialog.setConfirmOverwrite(true);
1515  //dialog.setConfirmOverwrite(false); // bug Qt4.3.3
1516  dialog.setAcceptMode(QFileDialog::AcceptSave);
1517  QString selectedFile;
1518  QStringList fileNames;
1519  fileNames.clear();
1520  if (bool ret = dialog.exec())
1521  {
1522  DEBTRACE(ret << " " << dialog.confirmOverwrite());
1523  fileNames = dialog.selectedFiles();
1524  if (!fileNames.isEmpty())
1525  selectedFile = fileNames.first();
1526  }
1527  QString filteredName = _guiEditor->asciiFilter(selectedFile);
1528  DEBTRACE(filteredName.toStdString());
1529  return filteredName;
1530 }
QString asciiFilter(const QString &name)
Definition: GuiEditor.cxx:716

References DEBTRACE.

◆ hideAllMenus()

void GenericGui::hideAllMenus ( )

Definition at line 735 of file GenericGui.cxx.

736 {
737  showBaseMenus (false);
738  showCommonMenus (false);
739  showEditionMenus(false);
740  showExecMenus (false);
741 }
void showBaseMenus(bool show)
Definition: GenericGui.cxx:743

◆ initialMenus()

void GenericGui::initialMenus ( )

Definition at line 727 of file GenericGui.cxx.

728 {
729  showEditionMenus(false);
730  showExecMenus(false);
731  showCommonMenus(false);
732  showBaseMenus(true);
733 }

◆ loadSchema()

void GenericGui::loadSchema ( const std::string &  filename,
bool  edit = true,
bool  arrangeLocalNodes = false 
)
virtual

Definition at line 1299 of file GenericGui.cxx.

1300 {
1301  YACS::ENGINE::Proc *proc = _loader->load(filename.c_str());
1302  if (!proc)
1303  return;
1304  YACS::ENGINE::Logger* logger= proc->getLogger("parser");
1305  if(!logger->isEmpty())
1306  {
1307  DEBTRACE(logger->getStr());
1308  }
1309  QString fn=QString::fromUtf8(filename.c_str());
1310  if(edit)
1311  createContext(proc, fn, "", true);
1312  else
1313  createContext(proc, fn, fn, false);
1314  if (arrangeLocalNodes)
1315  {
1317  }
1318 }
Class for logging error messages.
Definition: Logger.hxx:38
virtual bool isEmpty()
Definition: Logger.cxx:96
virtual std::string getStr()
Definition: Logger.cxx:85
Base class for all schema objects.
Definition: Proc.hxx:44
virtual Logger * getLogger(const std::string &name)
Definition: Proc.cxx:431
void createContext(YACS::ENGINE::Proc *proc, const QString &schemaName, const QString &runName, bool forEdition)
virtual YACS::ENGINE::Proc * load(const char *filename)

References DEBTRACE, YACS::ENGINE::Proc::getLogger(), YACS::ENGINE::Logger::getStr(), and YACS::ENGINE::Logger::isEmpty().

Referenced by Yacsgui::loadSchema().

◆ onAbort

void GenericGui::onAbort ( )
privateslot

Definition at line 1777 of file GenericGui.cxx.

1778 {
1779  DEBTRACE("GenericGui::onAbort");
1780  if (!QtGuiContext::getQtCurrent()) return;
1781  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1783 }

References DEBTRACE.

◆ onArrangeLocalNodes

void GenericGui::onArrangeLocalNodes ( )
privateslot

Definition at line 2160 of file GenericGui.cxx.

2161 {
2162  DEBTRACE("GenericGui::onArrangeLocalNodes");
2163  _guiEditor->arrangeNodes(false);
2164 }
void arrangeNodes(bool isRecursive)
Definition: GuiEditor.cxx:659

References DEBTRACE.

◆ onArrangeRecurseNodes

void GenericGui::onArrangeRecurseNodes ( )
privateslot

Definition at line 2166 of file GenericGui.cxx.

2167 {
2168  DEBTRACE("GenericGui::onArrangeRecurseNodes");
2169  _guiEditor->arrangeNodes(true);
2170 }

References DEBTRACE.

◆ onBlockNode

void GenericGui::onBlockNode ( )
privateslot

Definition at line 2052 of file GenericGui.cxx.

2053 {
2054  DEBTRACE("GenericGui::onBlockNode");
2056 }

References DEBTRACE.

◆ onBreakpointsMode

void GenericGui::onBreakpointsMode ( bool  checked)
privateslot

Definition at line 2267 of file GenericGui.cxx.

2268 {
2269  DEBTRACE("GenericGui::onWithoutStopMode " << checked);
2270  if (!QtGuiContext::getQtCurrent()) return;
2271  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
2273 }

References DEBTRACE.

◆ onCenterOnNode

void GenericGui::onCenterOnNode ( )
privateslot

Definition at line 2184 of file GenericGui.cxx.

2185 {
2186  DEBTRACE("GenericGui::onCenterOnNode");
2188 }
virtual void onCenterOnNode()
YACS::HMI::GraphicsView * getView()

References DEBTRACE.

◆ onChooseBatchJob

void GenericGui::onChooseBatchJob ( )
privateslot

Definition at line 1757 of file GenericGui.cxx.

1757  {
1758  DEBTRACE("GenericGui::onChooseBatchJob");
1759 
1760  // Show the Batch Jobs list
1761  if(_BJLdialog) delete _BJLdialog;
1762  _BJLdialog = new BatchJobsListDialog(tr("Select one Batch Job to watch"),this);
1763  _BJLdialog->show();
1764  _BJLdialog->move(300,200);
1765  _BJLdialog->resize(450,200);
1766 
1767 }

References DEBTRACE.

◆ onCleanOnExit

void GenericGui::onCleanOnExit ( )
slot

Definition at line 2580 of file GenericGui.cxx.

2581 {
2582  DEBTRACE("GenericGui::onCleanOnExit");
2583  map<QWidget*, YACS::HMI::QtGuiContext*> mapViewContextCopy = _mapViewContext;
2584  map<QWidget*, YACS::HMI::QtGuiContext*>::iterator it = mapViewContextCopy.begin();
2585  for (; it != mapViewContextCopy.end(); ++it)
2586  {
2587  closeContext((*it).first, true);
2588  }
2589 }
bool closeContext(QWidget *view, bool onExit=false)
Definition: GenericGui.cxx:863

References DEBTRACE.

Referenced by Yacsgui::onCleanOnExit().

◆ onCopyItem

void GenericGui::onCopyItem ( )
privateslot

Definition at line 2112 of file GenericGui.cxx.

2113 {
2114  DEBTRACE("GenericGui::onCopyItem");
2116 }

References DEBTRACE.

◆ onCORBAServiceNode

void GenericGui::onCORBAServiceNode ( )
privateslot

Definition at line 1993 of file GenericGui.cxx.

1994 {
1995  DEBTRACE("GenericGui::onCORBAServiceNode");
1996  _guiEditor->CreateNode("CORBANode");
1997 }
SubjectNode * CreateNode(std::string typeNode)
Definition: GuiEditor.cxx:98

References DEBTRACE.

◆ onCppNode

void GenericGui::onCppNode ( )
privateslot

Definition at line 2004 of file GenericGui.cxx.

2005 {
2006  DEBTRACE("GenericGui::onCppNode");
2007  _guiEditor->CreateNode("CppNode");
2008 }

References DEBTRACE.

◆ onCreateDataType

void GenericGui::onCreateDataType ( )
privateslot

Definition at line 1930 of file GenericGui.cxx.

1931 {
1932  DEBTRACE("GenericGui::onCreateDataType");
1933 }

References DEBTRACE.

◆ onCutItem

void GenericGui::onCutItem ( )
privateslot

Definition at line 2106 of file GenericGui.cxx.

2107 {
2108  DEBTRACE("GenericGui::onCutItem");
2110 }

References DEBTRACE.

◆ onDeEmphasizeAll

void GenericGui::onDeEmphasizeAll ( )
privateslot

Definition at line 2535 of file GenericGui.cxx.

2536 {
2537  DEBTRACE("GenericGui::onDeEmphasizeAll");
2538  map<Subject*, SchemaItem*>::const_iterator it = QtGuiContext::getQtCurrent()->_mapOfSchemaItem.begin();
2539  for( ; it != QtGuiContext::getQtCurrent()->_mapOfSchemaItem.end(); ++it)
2540  {
2541  Subject* sub = (*it).first;
2542  sub->update(EMPHASIZE, false, sub);
2543  }
2544 }
std::map< YACS::HMI::Subject *, YACS::HMI::SchemaItem * > _mapOfSchemaItem

References DEBTRACE, YACS::HMI::EMPHASIZE, and YACS::HMI::Subject::update().

◆ onDeleteItem

void GenericGui::onDeleteItem ( )
privateslot

Definition at line 2100 of file GenericGui.cxx.

2101 {
2102  DEBTRACE("GenericGui::onDeleteItem");
2104 }

References DEBTRACE.

◆ onEditDataTypes

void GenericGui::onEditDataTypes ( )
privateslot

Definition at line 1925 of file GenericGui.cxx.

1926 {
1927  DEBTRACE("GenericGui::onEditDataTypes");
1928 }

References DEBTRACE.

◆ onEmphasisCtrlLinks

void GenericGui::onEmphasisCtrlLinks ( )
privateslot

Definition at line 2480 of file GenericGui.cxx.

2481 {
2482  DEBTRACE("GenericGui::onEmphasisCtrlLinks");
2484  DEBTRACE("Emphasize Ctrl Links, subject : " << sub->getName());
2485  if (!sub)
2486  return;
2487  SubjectNode *snode = dynamic_cast<SubjectNode*>(sub);
2488  if (snode)
2489  {
2490  DEBTRACE("Node : " << snode->getName());
2491  list<SubjectControlLink*> linkList = snode->getSubjectControlLinks();
2492  list<SubjectControlLink*>::const_iterator it = linkList.begin();
2493  for( ; it != linkList.end(); ++it)
2494  {
2495  YACS::HMI::SubjectControlLink* sub = (*it);
2496  if (!sub) continue;
2497  sub->update(EMPHASIZE, true, sub);
2498  Subject *sin = sub->getSubjectInNode();
2499  Subject *sout = sub->getSubjectOutNode();
2500  sin->update(EMPHASIZE, true, sub);
2501  sout->update(EMPHASIZE, true, sub);
2502  }
2503  return;
2504  }
2505 }

References DEBTRACE, YACS::HMI::EMPHASIZE, YACS::HMI::Subject::getName(), YACS::HMI::SubjectNode::getName(), YACS::HMI::SubjectNode::getSubjectControlLinks(), YACS::HMI::SubjectControlLink::getSubjectInNode(), YACS::HMI::SubjectControlLink::getSubjectOutNode(), and YACS::HMI::Subject::update().

◆ onEmphasisLink

void GenericGui::onEmphasisLink ( )
privateslot

Definition at line 2526 of file GenericGui.cxx.

2527 {
2528  DEBTRACE("GenericGui::onEmphasisLink");
2530  if (!sub)
2531  return;
2532  sub->update(EMPHASIZE, true, sub);
2533 }

References DEBTRACE, YACS::HMI::EMPHASIZE, and YACS::HMI::Subject::update().

◆ onEmphasisPortLinks

void GenericGui::onEmphasisPortLinks ( )
privateslot

Definition at line 2415 of file GenericGui.cxx.

2416 {
2417  DEBTRACE("GenericGui::onEmphasisPortLinks");
2418  if (!QtGuiContext::getQtCurrent()) return;
2420  DEBTRACE("EmphasizePortLinks, subject : " << sub->getName());
2421  if (!sub)
2422  return;
2423 
2424  SubjectDataPort *sport = dynamic_cast<SubjectDataPort*>(sub);
2425  if (sport)
2426  {
2427  emphasizePortLink(sport, true);
2428  return;
2429  }
2430 
2431  // --- if a Node, explore all data ports
2432 
2433  SubjectNode *snode = dynamic_cast<SubjectNode*>(sub);
2434  if (snode)
2435  {
2436  DEBTRACE("Node : " << snode->getName());
2437  {
2438  list<SubjectInputPort*> linkList = snode->getSubjectInputPorts();
2439  list<SubjectInputPort*>::const_iterator it = linkList.begin();
2440  for( ; it != linkList.end(); ++it)
2441  {
2442  YACS::HMI::SubjectInputPort* sub = (*it);
2443  if (!sub) continue;
2444  emphasizePortLink(sub, true);
2445  }
2446  }
2447  {
2448  list<SubjectOutputPort*> linkList = snode->getSubjectOutputPorts();
2449  list<SubjectOutputPort*>::const_iterator it = linkList.begin();
2450  for( ; it != linkList.end(); ++it)
2451  {
2452  YACS::HMI::SubjectOutputPort* sub = (*it);
2453  if (!sub) continue;
2454  emphasizePortLink(sub, true);
2455  }
2456  }
2457  return;
2458  }
2459 }
void emphasizePortLink(YACS::HMI::SubjectDataPort *sub, bool emphasize)
std::list< SubjectInputPort * > getSubjectInputPorts() const
std::list< SubjectOutputPort * > getSubjectOutputPorts() const

References DEBTRACE, YACS::HMI::Subject::getName(), YACS::HMI::SubjectNode::getName(), YACS::HMI::SubjectNode::getSubjectInputPorts(), and YACS::HMI::SubjectNode::getSubjectOutputPorts().

◆ onExportSchema

void GenericGui::onExportSchema ( )
privateslot

Definition at line 1532 of file GenericGui.cxx.

1533 {
1534  DEBTRACE("GenericGui::onExportSchema");
1535  if (!QtGuiContext::getQtCurrent()) return;
1537  QString fo = QtGuiContext::getQtCurrent()->getFileName();
1538  QString foo = fo;
1539  QString fn = fo;
1540  if (fo.startsWith("newSchema_"))
1541  {
1542  fo.clear();
1543  fn = getSaveFileName(fo);
1544  }
1545  if (fn.isEmpty()) return;
1546 
1547  DEBTRACE("GenericGui::onExportSchema: " << fn.toUtf8().constData());
1548  //to be sure that all pending changes are effective
1549  _parent->setFocus();
1551  VisitorSaveGuiSchema aWriter(proc);
1552  aWriter.openFileSchema( fn.toUtf8().constData() );
1553  aWriter.visitProc();
1554  aWriter.closeFileSchema();
1556 
1557  if (fn.compare(foo) && _wrapper)
1558  _wrapper->renameSchema(foo, fn, QtGuiContext::getQtCurrent()->getWindow());
1559 }
QString getSaveFileName(const QString &fileName=QString())
bug confirmOverwrite : correction Qt 4.3.5
YACS::ENGINE::Proc * getProc()
Definition: guiContext.hxx:50
bool renameSchema(const QString &oldName, const QString &newName, QWidget *viewWindow)

References YACS::ENGINE::VisitorSaveSchema::closeFileSchema(), DEBTRACE, YACS::ENGINE::Proc::getProc(), YACS::ENGINE::VisitorSaveSchema::openFileSchema(), and YACS::HMI::VisitorSaveGuiSchema::visitProc().

◆ onExportSchemaAs

void GenericGui::onExportSchemaAs ( )
privateslot

Definition at line 1561 of file GenericGui.cxx.

1562 {
1563  DEBTRACE("GenericGui::onExportSchemaAs");
1564  _isSaved = false;
1565  if (!QtGuiContext::getQtCurrent()) return;
1567  QString fo = QtGuiContext::getQtCurrent()->getFileName();
1568  QString foo = fo;
1569  if (fo.startsWith("newSchema_")) fo.clear();
1570  QString fn = getSaveFileName(fo);
1571  if (fn.isEmpty()) return;
1572 
1573  DEBTRACE("GenericGui::onExportSchemaAs: " << fn.toUtf8().constData());
1575  VisitorSaveGuiSchema aWriter(proc);
1576  aWriter.openFileSchema(fn.toUtf8().constData());
1577  aWriter.visitProc();
1578  aWriter.closeFileSchema();
1579  _isSaved = true;
1581 
1582  if (fn.compare(foo) && _wrapper)
1583  _wrapper->renameSchema(foo, fn, QtGuiContext::getQtCurrent()->getWindow());
1584 }

References YACS::ENGINE::VisitorSaveSchema::closeFileSchema(), DEBTRACE, YACS::ENGINE::Proc::getProc(), YACS::ENGINE::VisitorSaveSchema::openFileSchema(), and YACS::HMI::VisitorSaveGuiSchema::visitProc().

◆ onFOREACHNode

void GenericGui::onFOREACHNode ( )
privateslot

Definition at line 2064 of file GenericGui.cxx.

2065 {
2066  DEBTRACE("GenericGui::onFOREACHNode");
2067  createForEachLoop("double");
2068 }
void createForEachLoop(std::string type="double")

References DEBTRACE.

◆ onFORNode

void GenericGui::onFORNode ( )
privateslot

Definition at line 2058 of file GenericGui.cxx.

2059 {
2060  DEBTRACE("GenericGui::onFORNode");
2062 }

References DEBTRACE.

◆ onGetContainerLog

void GenericGui::onGetContainerLog ( )
privateslot

Definition at line 1881 of file GenericGui.cxx.

1882 {
1883  DEBTRACE("GenericGui::onGetContainerLog");
1884  if (!QtGuiContext::getQtCurrent()) return;
1885  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1887  SubjectElementaryNode *snode = dynamic_cast<SubjectElementaryNode*>(sub);
1888  if (!snode) return;
1890 
1891  LogViewer *lv = new LogViewer("Node Container Log", _parent);
1892  if (log.empty())
1893  {
1894  string info = "\n";
1895  if (dynamic_cast<YACS::ENGINE::ServiceNode*>(snode->getNode()))
1896  {
1897  info +="The container log of this node\n";
1898  info += "is not stored in a file and \n";
1899  info += "can't be displayed here, \n";
1900  info += "but you can have a look at \n";
1901  info += "the SALOME standard output,\n";
1902  info += "on your terminal...";
1903  }
1904  else
1905  {
1906  info += "See YACS Container log \n";
1907  info += "(on main proc menu) \n";
1908  info += "for all inline nodes";
1909  }
1910  lv->setText(info);
1911  }
1912  else
1913  lv->readFile(log);
1914  lv->show();
1915 }
void setText(std::string text)
Definition: LogViewer.cxx:39
virtual void readFile(std::string fileName)
Definition: LogViewer.cxx:45
Class for calculation node associated with a component service.
Definition: ServiceNode.hxx:35
std::string getContainerLog()
virtual YACS::ENGINE::Node * getNode()
string log
Definition: logview.py:23

References DEBTRACE, YACS::HMI::SubjectNode::getNode(), gui.logview::log, LogViewer::readFile(), and LogViewer::setText().

◆ onGetErrorDetails

void GenericGui::onGetErrorDetails ( )
privateslot

Definition at line 1859 of file GenericGui.cxx.

1860 {
1861  DEBTRACE("GenericGui::onGetErrorDetails");
1862  if (!QtGuiContext::getQtCurrent()) return;
1864  SubjectNode *snode = dynamic_cast<SubjectNode*>(sub);
1865  if (!snode) return;
1866  string log;
1868  {
1870  }
1871  else
1872  {
1873  log = snode->getNode()->getErrorDetails();
1874  }
1875 
1876  LogViewer *lv = new LogViewer("Node Error Details", _parent);
1877  lv->setText(log);
1878  lv->show();
1879 }
virtual std::string getErrorDetails() const
Definition: Node.hxx:190
std::string getErrorDetails(YACS::ENGINE::Node *node)

References DEBTRACE, YACS::ENGINE::Node::getErrorDetails(), YACS::HMI::SubjectNode::getNode(), gui.logview::log, and LogViewer::setText().

◆ onGetErrorReport

void GenericGui::onGetErrorReport ( )
privateslot

Definition at line 1837 of file GenericGui.cxx.

1838 {
1839  DEBTRACE("GenericGui::onGetErrorReport");
1840  if (!QtGuiContext::getQtCurrent()) return;
1842  SubjectNode *snode = dynamic_cast<SubjectNode*>(sub);
1843  if (!snode) return;
1844  string log;
1846  {
1848  }
1849  else
1850  {
1851  log = snode->getNode()->getErrorReport();
1852  }
1853 
1854  LogViewer *lv = new LogViewer("Node error report", _parent);
1855  lv->setText(log);
1856  lv->show();
1857 }
virtual std::string getErrorReport()
returns a string that contains an error report if the node is in error
Definition: Node.cxx:755
std::string getErrorReport(YACS::ENGINE::Node *node)

References DEBTRACE, YACS::ENGINE::Node::getErrorReport(), YACS::HMI::SubjectNode::getNode(), gui.logview::log, and LogViewer::setText().

◆ onGetYacsContainerLog

void GenericGui::onGetYacsContainerLog ( )
privateslot

Definition at line 1826 of file GenericGui.cxx.

1827 {
1828  DEBTRACE("GenericGui::onGetYacsContainerLog");
1829  if (!QtGuiContext::getQtCurrent()) return;
1830  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1832  ContainerLogViewer *lv = new ContainerLogViewer("YACS Container Log", _parent);
1833  lv->readFile(log);
1834  lv->show();
1835 }
virtual void readFile(std::string fileName)
Definition: LogViewer.cxx:69

References DEBTRACE, gui.logview::log, and ContainerLogViewer::readFile().

◆ onHelpContextModule()

void GenericGui::onHelpContextModule ( const QString &  theComponentName,
const QString &  theFileName,
const QString &  theContext = QString() 
)
virtual

Definition at line 2608 of file GenericGui.cxx.

2609 {
2610  _wrapper->onHelpContextModule(theComponentName,theFileName,theContext);
2611 }
virtual void onHelpContextModule(const QString &, const QString &, const QString &=QString())

Referenced by YACS::HMI::TreeView::event().

◆ onHideAllLinks

void GenericGui::onHideAllLinks ( )
privateslot

Definition at line 2389 of file GenericGui.cxx.

2390 {
2391  DEBTRACE("GenericGui::onHideAllLinks");
2392  displayLinks(false);
2393  displayControlLinks(false);
2394 }
void displayControlLinks(bool isShown)
void displayLinks(bool isShown)

References DEBTRACE.

◆ onHideCtrlLinks

void GenericGui::onHideCtrlLinks ( )
privateslot

Definition at line 2474 of file GenericGui.cxx.

2475 {
2476  DEBTRACE("GenericGui::onHideCtrlLinks");
2477  displayPortLinks(false);
2478 }
void displayPortLinks(bool isShown)

References DEBTRACE.

◆ onHideLink

void GenericGui::onHideLink ( )
privateslot

Definition at line 2520 of file GenericGui.cxx.

2521 {
2522  DEBTRACE("GenericGui::onHideLink");
2523  displayALink(false);
2524 }
void displayALink(bool isShown)

References DEBTRACE.

◆ onHidePortLinks

void GenericGui::onHidePortLinks ( )
privateslot

Definition at line 2409 of file GenericGui.cxx.

2410 {
2411  DEBTRACE("GenericGui::onHidePortLinks");
2412  displayPortLinks(false);
2413 }

References DEBTRACE.

◆ onImportCatalog

void GenericGui::onImportCatalog ( )
privateslot

Definition at line 1586 of file GenericGui.cxx.

1587 {
1588  DEBTRACE("GenericGui::onImportCatalog");
1589  QFileDialog dialog(_parent,
1590  "Choose a YACS Schema to load as a Catalog" ,
1591  QString::null,
1592  tr( "XML-Files (*.xml);;All Files (*)" ));
1593 
1594  dialog.setHistory(_wrapper->getQuickDirList());
1595 
1596  QString fn;
1597  QStringList fileNames;
1598  if (dialog.exec())
1599  {
1600  fileNames = dialog.selectedFiles();
1601  if (!fileNames.isEmpty())
1602  fn = fileNames.first();
1603  }
1604 
1605  if ( !fn.isEmpty() )
1606  _catalogsWidget->addCatalogFromFile(fn.toStdString());
1607 }
QStringList getQuickDirList()

References DEBTRACE.

◆ onImportDataType

void GenericGui::onImportDataType ( )
privateslot

Definition at line 1935 of file GenericGui.cxx.

1936 {
1937  DEBTRACE("GenericGui::onImportDataType");
1938  if (_dwCatalogs) _dwCatalogs->raise();
1939 }

References DEBTRACE.

◆ onImportSchema

void GenericGui::onImportSchema ( )
privateslot

Definition at line 1320 of file GenericGui.cxx.

1321 {
1322  clock_t start_t;
1323  clock_t end_t;
1324  start_t = clock();
1325  DEBTRACE("GenericGui::onImportSchema");
1326  QFileDialog dialog(_parent,
1327  "Choose a filename to load" ,
1328  QString::null,
1329  tr( "XML-Files (*.xml);;All Files (*)" ));
1330 
1331  dialog.setHistory(_wrapper->getQuickDirList());
1332 
1333  QString fn;
1334  QStringList fileNames;
1335  if (dialog.exec())
1336  {
1337  fileNames = dialog.selectedFiles();
1338  if (!fileNames.isEmpty())
1339  fn = fileNames.first();
1340  }
1341 
1342  if ( !fn.isEmpty() )
1343  {
1344  // add ".xml" suffix
1345  QFileInfo fi(fn);
1346  if (!fi.exists() && fi.suffix() != "xml")
1347  fn += ".xml";
1348 
1349  DEBTRACE("file loaded : " <<fn.toUtf8().constData());
1350  YACS::ENGINE::Proc *proc = 0;
1351 
1352  try {
1353  proc = _loader->load(fn.toUtf8().constData());
1354  }
1355  catch (...) {
1356  }
1357 
1358  {
1359  end_t = clock();
1360  double passe = (end_t -start_t);
1361  passe = passe/CLOCKS_PER_SEC;
1362  DEBTRACE("load xml file : " << passe);
1363  start_t = end_t;
1364  }
1365 
1366  if (!proc)
1367  {
1368  QMessageBox msgBox(QMessageBox::Critical,
1369  "Import YACS Schema, native YACS XML format",
1370  "The file has not the native YACS XML format or is not readable.");
1371  msgBox.exec();
1372  return;
1373  }
1374  YACS::ENGINE::Logger* logger= proc->getLogger("parser");
1375  if(!logger->isEmpty())
1376  {
1377  DEBTRACE(logger->getStr());
1378  }
1379  createContext(proc, fn, "", true);
1380  }
1381 }

References DEBTRACE, YACS::ENGINE::Proc::getLogger(), YACS::ENGINE::Logger::getStr(), and YACS::ENGINE::Logger::isEmpty().

◆ onImportSupervSchema

void GenericGui::onImportSupervSchema ( )
privateslot

Definition at line 1383 of file GenericGui.cxx.

1384 {
1385  DEBTRACE("GenericGui::onImportSupervSchema");
1386  QFileDialog dialog(_parent,
1387  "Choose a SUPERV filename to load" ,
1388  QString::null,
1389  tr( "XML-Files (*.xml);;All Files (*)" ));
1390 
1391  dialog.setHistory(_wrapper->getQuickDirList());
1392 
1393  QString fn;
1394  QStringList fileNames;
1395  if (dialog.exec())
1396  {
1397  fileNames = dialog.selectedFiles();
1398  if (!fileNames.isEmpty())
1399  fn = fileNames.first();
1400  }
1401 
1402  if (fn.isEmpty()) return;
1403 
1404  // add ".xml" suffix
1405  QFileInfo fi(fn);
1406  if (!fi.exists() && fi.suffix() != "xml")
1407  fn += ".xml";
1408 
1409  DEBTRACE("file loaded : " <<fn.toStdString());
1410  QString tmpFileName;
1411  try
1412  {
1413 #ifdef WIN32
1414  QString tmpDir = getenv("TEMP");
1415  QString fileExt = "bat";
1416 #else
1417  QString tmpDir = "/tmp";
1418  QString fileExt = "sh";
1419 #endif
1420  QDir aTmpDir(tmpDir);
1421  aTmpDir.mkdir(QString("YACS_") + getenv("USER"));
1422  YASSERT(aTmpDir.cd(QString("YACS_") + getenv("USER")));
1423  QDateTime curTime = QDateTime::currentDateTime();
1424  tmpFileName = "SUPERV_import_" + curTime.toString("yyyyMMdd_hhmmss") + ".xml";
1425  QString tmpOutput = "salomeloader_output";
1426  tmpFileName = aTmpDir.absoluteFilePath(tmpFileName);
1427  DEBTRACE(tmpFileName.toStdString());
1428 
1429  QString aCall = "salomeloader."+ fileExt+ " "+ fn + " " + tmpFileName + " > " + tmpOutput;
1430  DEBTRACE(aCall.toStdString());
1431 
1432  int ret = system(aCall.toLatin1());
1433  if(ret != 0)
1434  {
1435  // --- read file with logs
1436  fstream f(tmpOutput.toLatin1());
1437  stringstream hfile;
1438  hfile << f.rdbuf();
1439  f.close();
1440 
1441  // --- Problem in execution
1442  int status=WEXITSTATUS(ret);
1443  if(status == 1)
1444  {
1445  QString mes = "Problems in conversion: some errors but an incomplete proc has nevertheless been created.\n\n";
1446  mes += QString(hfile.str().c_str());
1447  QMessageBox msgBox(QMessageBox::Warning,
1448  "Import YACS Schema, SUPERV XML format",
1449  mes);
1450  msgBox.exec();
1451  }
1452  else if(status == 2)
1453  {
1454  QString mes = "Problems in conversion: a fatal error has been encountered. The proc can't be created.\n\n";
1455  mes += QString(hfile.str().c_str());
1456  QMessageBox msgBox(QMessageBox::Critical,
1457  "Import YACS Schema, SUPERV XML format",
1458  mes);
1459  msgBox.exec();
1460  return;
1461  }
1462  else
1463  {
1464  DEBTRACE("Unknown problem: " << ret );
1465  QMessageBox msgBox(QMessageBox::Critical,
1466  "Import YACS Schema, SUPERV XML format",
1467  "Unexpected exception in salomeloader.");
1468  msgBox.exec();
1469  return;
1470  }
1471  }
1472  }
1473  catch(...)
1474  {
1475  QMessageBox msgBox(QMessageBox::Critical,
1476  "Import YACS Schema, SUPERV XML format",
1477  "Unexpected exception in convertSupervFile");
1478  msgBox.exec();
1479  return;
1480  }
1481 
1482  fn = tmpFileName;
1483  if (fn.isEmpty()) return; // must not happen
1484 
1485  DEBTRACE("file loaded : " <<fn.toStdString());
1486  YACS::ENGINE::Proc *proc = _loader->load(fn.toLatin1());
1487  if (!proc)
1488  {
1489  QMessageBox msgBox(QMessageBox::Critical,
1490  "Import YACS Schema, SUPERV file converted in native YACS XML format",
1491  "The file has not the native YACS XML format or is not readable.");
1492  msgBox.exec();
1493  return;
1494  }
1495  YACS::ENGINE::Logger* logger= proc->getLogger("parser");
1496  if(!logger->isEmpty())
1497  {
1498  DEBTRACE(logger->getStr());
1499  }
1500  createContext(proc, fn, "", true);
1501 }

References DEBTRACE, gui.CONNECTOR::f(), YACS::ENGINE::Proc::getLogger(), YACS::ENGINE::Logger::getStr(), YACS::ENGINE::Logger::isEmpty(), and YASSERT.

◆ onInDataNode

void GenericGui::onInDataNode ( )
privateslot

Definition at line 2016 of file GenericGui.cxx.

2017 {
2018  DEBTRACE("GenericGui::onInDataNode");
2019  _guiEditor->CreateNode("PresetNode");
2020 }

References DEBTRACE.

◆ onInlineFunctionNode

void GenericGui::onInlineFunctionNode ( )
privateslot

Definition at line 2046 of file GenericGui.cxx.

2047 {
2048  DEBTRACE("GenericGui::onInlineFunctionNode");
2049  _guiEditor->CreateNode("PyFunction");
2050 }

References DEBTRACE.

◆ onInlineScriptNode

void GenericGui::onInlineScriptNode ( )
privateslot

Definition at line 2040 of file GenericGui.cxx.

2041 {
2042  DEBTRACE("GenericGui::onInlineScriptNode");
2043  _guiEditor->CreateNode("PyScript");
2044 }

References DEBTRACE.

◆ onInStudyNode

void GenericGui::onInStudyNode ( )
privateslot

Definition at line 2028 of file GenericGui.cxx.

2029 {
2030  DEBTRACE("GenericGui::onInStudyNode");
2031  _guiEditor->CreateNode("StudyInNode");
2032 }

References DEBTRACE.

◆ onLoadAndRunSchema

void GenericGui::onLoadAndRunSchema ( )
privateslot

Definition at line 1716 of file GenericGui.cxx.

1717 {
1718  DEBTRACE("GenericGui::onLoadAndRunSchema");
1719  QString fn = QFileDialog::getOpenFileName( _parent,
1720  "Choose a filename to load" ,
1721  QString::null,
1722  tr( "XML-Files (*.xml);;All Files (*)" ));
1723  if ( !fn.isEmpty() )
1724  {
1725  // add ".xml" suffix
1726  QFileInfo fi(fn);
1727  if (!fi.exists() && fi.suffix() != "xml")
1728  fn += ".xml";
1729 
1730  DEBTRACE("file loaded : " <<fn.toStdString());
1731  YACS::ENGINE::Proc *proc =0;
1732 
1733  try {
1734  proc = _loader->load(fn.toLatin1());
1735  }
1736  catch (...) {
1737  }
1738 
1739  if (!proc)
1740  {
1741  QMessageBox msgBox(QMessageBox::Critical,
1742  "Import YACS Schema, native YACS XML format",
1743  "The file has not the native YACS XML format or is not readable.");
1744  msgBox.exec();
1745  return;
1746  }
1747  YACS::ENGINE::Logger* logger= proc->getLogger("parser");
1748  if(!logger->isEmpty())
1749  {
1750  DEBTRACE(logger->getStr());
1751  }
1752  createContext(proc, fn, "", true);
1754  }
1755 }

References DEBTRACE, YACS::ENGINE::Proc::getLogger(), YACS::ENGINE::Logger::getStr(), and YACS::ENGINE::Logger::isEmpty().

◆ onLoadRunStateSchema

void GenericGui::onLoadRunStateSchema ( )
privateslot

Definition at line 1710 of file GenericGui.cxx.

1711 {
1712  DEBTRACE("GenericGui::onLoadRunStateSchema");
1713  onRunLoadedSchema(true);
1714 }

References DEBTRACE.

◆ onNewContainer

void GenericGui::onNewContainer ( )
privateslot

Definition at line 1952 of file GenericGui.cxx.

1953 {
1954  DEBTRACE("GenericGui::onNewContainer");
1956 }

References DEBTRACE.

◆ onNewCorbaComponent

void GenericGui::onNewCorbaComponent ( )
privateslot

Definition at line 1975 of file GenericGui.cxx.

1976 {
1977  DEBTRACE("GenericGui::onNewCorbaComponent");
1978 }

References DEBTRACE.

◆ onNewEdition

void GenericGui::onNewEdition ( )
privateslot

Definition at line 1818 of file GenericGui.cxx.

1819 {
1820  DEBTRACE("GenericGui::onNewEdition");
1821  // if (!QtGuiContext::getQtCurrent()) return;
1822  // if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1823  // QtGuiContext::getQtCurrent()->getGuiExecutor()->resetDataflow();
1824 }

References DEBTRACE.

◆ onNewHPContainer

void GenericGui::onNewHPContainer ( )
privateslot

Definition at line 1958 of file GenericGui.cxx.

1959 {
1960  DEBTRACE("GenericGui::onNewHPContainer");
1962 }

References DEBTRACE.

◆ onNewSalomeComponent

void GenericGui::onNewSalomeComponent ( )
privateslot

Definition at line 1964 of file GenericGui.cxx.

1965 {
1966  DEBTRACE("GenericGui::onNewSalomeComponent");
1968 }
void CreateComponentInstance()
Definition: GuiEditor.cxx:301

References DEBTRACE.

◆ onNewSalomePythonComponent

void GenericGui::onNewSalomePythonComponent ( )
privateslot

Definition at line 1970 of file GenericGui.cxx.

1971 {
1972  DEBTRACE("GenericGui::onNewSalomePythonComponent");
1973 }

References DEBTRACE.

◆ onNewSchema

void GenericGui::onNewSchema ( )
privateslot

Definition at line 1283 of file GenericGui.cxx.

1284 {
1285  DEBTRACE("GenericGui::onNewSchema");
1286 
1287  std::stringstream name;
1288  name << "newSchema_" << ++_schemaCnt;
1289 
1291  YACS::ENGINE::Proc *proc = runTime->createProc(name.str());
1292 
1293  _loader->reset();
1294 
1295  QString fileName = name.str().c_str();
1296  createContext(proc, fileName, "", true);
1297 }
virtual Proc * createProc(const std::string &name)

References YACS::ENGINE::RuntimeSALOME::createProc(), DEBTRACE, and YACS::ENGINE::getSALOMERuntime().

◆ onNodeFromCatalog

void GenericGui::onNodeFromCatalog ( )
privateslot

Definition at line 2094 of file GenericGui.cxx.

2095 {
2096  DEBTRACE("GenericGui::onNodeFromCatalog");
2097  if (_dwCatalogs) _dwCatalogs->raise();
2098 }

References DEBTRACE.

◆ onNodeNodeServiceNode

void GenericGui::onNodeNodeServiceNode ( )
privateslot

Definition at line 1999 of file GenericGui.cxx.

2000 {
2001  DEBTRACE("GenericGui::onNodeNodeServiceNode");
2002 }

References DEBTRACE.

◆ onOptimizerLoop

void GenericGui::onOptimizerLoop ( )
privateslot

Definition at line 2088 of file GenericGui.cxx.

2089 {
2090  DEBTRACE("GenericGui::onOptimizerLoop");
2092 }

References DEBTRACE.

◆ onOutDataNode

void GenericGui::onOutDataNode ( )
privateslot

Definition at line 2022 of file GenericGui.cxx.

2023 {
2024  DEBTRACE("GenericGui::onOutDataNode");
2025  _guiEditor->CreateNode("OutNode");
2026 }

References DEBTRACE.

◆ onOutStudyNode

void GenericGui::onOutStudyNode ( )
privateslot

Definition at line 2034 of file GenericGui.cxx.

2035 {
2036  DEBTRACE("GenericGui::onOutStudyNode");
2037  _guiEditor->CreateNode("StudyOutNode");
2038 }

References DEBTRACE.

◆ onPasteItem

void GenericGui::onPasteItem ( )
privateslot

Definition at line 2118 of file GenericGui.cxx.

2119 {
2120  DEBTRACE("GenericGui::onPasteItem");
2122 }

References DEBTRACE.

◆ onPause

void GenericGui::onPause ( )
privateslot

Definition at line 1785 of file GenericGui.cxx.

1786 {
1787  DEBTRACE("GenericGui::onPause");
1788  if (!QtGuiContext::getQtCurrent()) return;
1789  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1791 }

References DEBTRACE.

◆ onPutGraphInBloc

void GenericGui::onPutGraphInBloc ( )
privateslot

Definition at line 2129 of file GenericGui.cxx.

2130 {
2131  DEBTRACE("GenericGui::onPutGraphInBloc");
2133  _guiEditor->arrangeNodes(false);
2134 }
std::string PutGraphInBloc()
Definition: GuiEditor.cxx:581

References DEBTRACE.

◆ onPutGraphInForLoop

void GenericGui::onPutGraphInForLoop ( )
privateslot

Definition at line 2136 of file GenericGui.cxx.

2137 {
2138  DEBTRACE("GenericGui::onPutGraphInForLoop");
2139  _guiEditor->PutGraphInNode("ForLoop");
2140 }
void PutGraphInNode(std::string typeNode)
Definition: GuiEditor.cxx:563

References DEBTRACE.

◆ onPutGraphInOptimizerLoop

void GenericGui::onPutGraphInOptimizerLoop ( )
privateslot

Definition at line 2154 of file GenericGui.cxx.

2155 {
2156  DEBTRACE("GenericGui::onPutGraphInOptimizerLoop");
2157  _guiEditor->PutGraphInNode("OptimizerLoop");
2158 }

References DEBTRACE.

◆ onPutGraphInWhileLoop

void GenericGui::onPutGraphInWhileLoop ( )
privateslot

Definition at line 2148 of file GenericGui.cxx.

2149 {
2150  DEBTRACE("GenericGui::onPutGraphInWhileLoop");
2151  _guiEditor->PutGraphInNode("WhileLoop");
2152 }

References DEBTRACE.

◆ onPutInBloc

void GenericGui::onPutInBloc ( )
privateslot

Definition at line 2124 of file GenericGui.cxx.

2125 {
2127 }

◆ onRebuildLinks

void GenericGui::onRebuildLinks ( )
privateslot

Definition at line 2172 of file GenericGui.cxx.

2173 {
2174  DEBTRACE("GenericGui::onRebuildLinks");
2176 }

References DEBTRACE.

◆ onRedo

void GenericGui::onRedo ( )
privateslot

Definition at line 2558 of file GenericGui.cxx.

2559 {
2560  DEBTRACE("GenericGui::onRedo");
2561  if (QtGuiContext::getQtCurrent()->_setOfModifiedSubjects.empty())
2562  {
2564  // Empty the clipboard in order to avoid the copy of a destroyed object.
2566  }
2567  else Message("redo not possible when there are local modifications not confirmed");
2568 }
YACS::HMI::ProcInvoc * getInvoc()
Definition: guiContext.hxx:51
void setSubjectToCopy(YACS::HMI::Subject *sub)

References DEBTRACE.

◆ onReset

void GenericGui::onReset ( )
privateslot

Definition at line 1793 of file GenericGui.cxx.

1794 {
1795  DEBTRACE("GenericGui::onReset");
1796  if (!QtGuiContext::getQtCurrent()) return;
1797  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1799 }

References DEBTRACE.

◆ onRunLoadedSchema

void GenericGui::onRunLoadedSchema ( bool  withState = false)
privateslot

Definition at line 1609 of file GenericGui.cxx.

1610 {
1611  DEBTRACE("GenericGui::onRunLoadedSchema");
1612  if (!QtGuiContext::getQtCurrent()) return;
1613 
1614  clock_t start_t;
1615  clock_t end_t;
1616  start_t = clock();
1617 
1618  // --- check proc state (cf. editionProc)
1619 
1620  if (!QtGuiContext::getQtCurrent()->_setOfModifiedSubjects.empty())
1621  {
1622  set<Subject*>::iterator it = QtGuiContext::getQtCurrent()->_setOfModifiedSubjects.begin();
1623  (*it)->select(true);
1624  return;
1625  }
1626 
1628  if (!proc->isValid())
1629  {
1631  return;
1632  }
1633 
1635  try
1636  {
1637  proc->checkConsistency(info);
1638  }
1639  catch (Exception &ex)
1640  {
1641  DEBTRACE(ex.what());
1643  return;
1644  }
1645  if (info.areWarningsOrErrors()) return;
1646 
1647  {
1648  end_t = clock();
1649  double passe = (end_t -start_t);
1650  passe = passe/CLOCKS_PER_SEC;
1651  cerr <<"run schema -1- : " << passe << endl;
1652  start_t = end_t;
1653  }
1654  // --- save proc under a run name
1655 
1656  QFileInfo fo = QtGuiContext::getQtCurrent()->getFileName();
1657  QString procName = fo.baseName();
1658  //QString tmpDir = SALOMEDS_Tool::GetTmpDir().c_str();
1659 #ifdef WIN32
1660  QString tmpDir = getenv("TEMP");
1661 #else
1662  QString tmpDir = "/tmp";
1663 #endif
1664  QDir aTmpDir(tmpDir);
1665  aTmpDir.mkdir(QString("YACS_") + getenv("USER"));
1666  YASSERT(aTmpDir.cd(QString("YACS_") + getenv("USER")));
1667  QDateTime curTime = QDateTime::currentDateTime();
1668  QString aRunName = procName + "_" + curTime.toString("yyyyMMdd_hhmmss") + ".xml";
1669  aRunName = aTmpDir.absoluteFilePath(aRunName);
1670  DEBTRACE(aRunName.toStdString());
1671 
1672  VisitorSaveGuiSchema aWriter(proc);
1673  aWriter.openFileSchema(aRunName.toStdString());
1674  aWriter.visitProc();
1675  aWriter.closeFileSchema();
1676 
1677  // --- create a run context
1678 
1679  YACS::ENGINE::Proc *procrun = _loader->load(aRunName.toLatin1());
1680  {
1681  end_t = clock();
1682  double passe = (end_t -start_t);
1683  passe = passe/CLOCKS_PER_SEC;
1684  cerr <<"run schema -2- : " << passe << endl;
1685  start_t = end_t;
1686  }
1687  createContext(procrun, QtGuiContext::getQtCurrent()->getFileName(), aRunName, false);
1688 
1689  // load state if required
1690 
1692  if (!executor) return;
1693  if (withState)
1694  {
1695  QString fn = QFileDialog::getOpenFileName( _parent,
1696  "Choose a previous run state to load" ,
1697  QString::null,
1698  tr( "XML-Files (*.xml);;All Files (*)" ));
1699  if (!fn.isEmpty())
1700  {
1701  DEBTRACE("run state to load: " <<fn.toStdString());
1702  executor->setLoadStateFile(fn.toStdString());
1703  }
1704  }
1705  executor->startResumeDataflow(true); // --- initialise gui state
1706  if(_toggleStopOnErrorAct->isChecked())
1707  executor->setStopOnError(false);
1708 }
void checkConsistency(LinkInfo &info) const
Class that deal with list of semantics links for high level analysis.
Definition: LinkInfo.hxx:83
static const unsigned char ALL_STOP_ASAP
Definition: LinkInfo.hxx:126
virtual int isValid()
indicates if the node is valid (returns 1) or not (returns 0)
Definition: Node.cxx:730
void startResumeDataflow(bool initialize=false)
Definition: GuiExecutor.cxx:85
void setLoadStateFile(std::string xmlFile)
void setStopOnError(bool aMode)
std::set< YACS::HMI::Subject * > _setOfModifiedSubjects
virtual void select(bool isSelected)

References YACS::ENGINE::LinkInfo::ALL_STOP_ASAP, YACS::ENGINE::LinkInfo::areWarningsOrErrors(), YACS::ENGINE::ComposedNode::checkConsistency(), YACS::ENGINE::VisitorSaveSchema::closeFileSchema(), DEBTRACE, testCppPluginInvokation::ex, YACS::ENGINE::Proc::getProc(), YACS::ENGINE::Node::isValid(), YACS::ENGINE::VisitorSaveSchema::openFileSchema(), YACS::HMI::GuiExecutor::setLoadStateFile(), YACS::HMI::GuiExecutor::setStopOnError(), YACS::HMI::GuiExecutor::startResumeDataflow(), YACS::HMI::VisitorSaveGuiSchema::visitProc(), and YASSERT.

◆ onSalomeServiceNode

void GenericGui::onSalomeServiceNode ( )
privateslot

Definition at line 1981 of file GenericGui.cxx.

1982 {
1983  DEBTRACE("GenericGui::onSalomeServiceNode");
1984  _guiEditor->CreateNode("SalomeNode");
1985 }

References DEBTRACE.

◆ onSaveRunState

void GenericGui::onSaveRunState ( )
privateslot

Definition at line 1801 of file GenericGui.cxx.

1802 {
1803  DEBTRACE("GenericGui::onSaveRunState");
1804  if (!QtGuiContext::getQtCurrent()) return;
1805  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1806  QDateTime curTime = QDateTime::currentDateTime();
1807  QFileInfo procName = QtGuiContext::getQtCurrent()->getFileName();
1808  QString stateName = procName.baseName();
1809  DEBTRACE(stateName.toStdString());
1810  stateName += "_state_" + curTime.toString("yyyyMMdd_hhmmss") + ".xml";
1811  DEBTRACE(stateName.toStdString());
1812  stateName = getSaveFileName(stateName);
1813  DEBTRACE(stateName.toStdString());
1814  if (!stateName.isEmpty())
1815  QtGuiContext::getQtCurrent()->getGuiExecutor()->saveState(stateName.toStdString());
1816 }
void saveState(const std::string &xmlFile)

References DEBTRACE.

◆ onSelectComponentInstance

void GenericGui::onSelectComponentInstance ( )
privateslot

Definition at line 1941 of file GenericGui.cxx.

1942 {
1943  DEBTRACE("GenericGui::onSelectComponentInstance");
1945  if (!sub) return;
1946  SubjectComponent *ref = dynamic_cast<SubjectComponent*>(sub);
1947  YASSERT(ref);
1948  YACS::ENGINE::ComponentInstance* compo=ref->getComponent();
1950 }
Base class for all component instances.
const std::string & getCompoName() const
std::map< std::string, YACS::ENGINE::ComponentInstance * > _mapOfLastComponentInstance
Definition: guiContext.hxx:78
def ref(target, callback=None)
Definition: CONNECTOR.py:120

References DEBTRACE, YACS::ENGINE::ComponentInstance::getCompoName(), gui.CONNECTOR::ref(), and YASSERT.

◆ onSelectReference

void GenericGui::onSelectReference ( )
privateslot

Definition at line 2243 of file GenericGui.cxx.

2244 {
2246  if (!sub) return;
2247  SubjectReference *ref = dynamic_cast<SubjectReference*>(sub);
2248  YASSERT(ref);
2249  SubjectServiceNode *snode = dynamic_cast<SubjectServiceNode*>(ref->getReference());
2250  snode->select(true);
2251 }

References gui.CONNECTOR::ref(), YACS::HMI::Subject::select(), and YASSERT.

◆ onServiceInlineNode

void GenericGui::onServiceInlineNode ( )
privateslot

Definition at line 1987 of file GenericGui.cxx.

1988 {
1989  DEBTRACE("GenericGui::onServiceInlineNode");
1990  _guiEditor->CreateNode("SalomePythonNode");
1991 }

References DEBTRACE.

◆ onShowAllLinks

void GenericGui::onShowAllLinks ( )
privateslot

Definition at line 2382 of file GenericGui.cxx.

2383 {
2384  DEBTRACE("GenericGui::onShowAllLinks");
2385  displayLinks(true);
2386  displayControlLinks(true);
2387 }

References DEBTRACE.

◆ onShowCtrlLinks

void GenericGui::onShowCtrlLinks ( )
privateslot

Definition at line 2468 of file GenericGui.cxx.

2469 {
2470  DEBTRACE("GenericGui::onShowCtrlLinks");
2471  displayPortLinks(true);
2472 }

References DEBTRACE.

◆ onShowLink

void GenericGui::onShowLink ( )
privateslot

Definition at line 2514 of file GenericGui.cxx.

2515 {
2516  DEBTRACE("GenericGui::onShowLink");
2517  displayALink(true);
2518 }

References DEBTRACE.

◆ onShowOnlyCtrlLinks

void GenericGui::onShowOnlyCtrlLinks ( )
privateslot

Definition at line 2461 of file GenericGui.cxx.

2462 {
2463  DEBTRACE("GenericGui::onShowOnlyCtrlLinks");
2464  onHideAllLinks();
2465  displayPortLinks(true);
2466 }

References DEBTRACE.

◆ onShowOnlyLink

void GenericGui::onShowOnlyLink ( )
privateslot

Definition at line 2507 of file GenericGui.cxx.

2508 {
2509  DEBTRACE("GenericGui::onShowOnlyLink");
2510  onHideAllLinks();
2511  displayALink(true);
2512 }

References DEBTRACE.

◆ onShowOnlyPortLinks

void GenericGui::onShowOnlyPortLinks ( )
privateslot

Definition at line 2396 of file GenericGui.cxx.

2397 {
2398  DEBTRACE("GenericGui::onShowOnlyPortLinks");
2399  onHideAllLinks();
2400  displayPortLinks(true);
2401 }

References DEBTRACE.

◆ onShowPortLinks

void GenericGui::onShowPortLinks ( )
privateslot

Definition at line 2403 of file GenericGui.cxx.

2404 {
2405  DEBTRACE("GenericGui::onShowPortLinks");
2406  displayPortLinks(true);
2407 }

References DEBTRACE.

◆ onShowRedo

void GenericGui::onShowRedo ( )
privateslot

Definition at line 2575 of file GenericGui.cxx.

2576 {
2578 }
void showRedo(QWidget *parent=0)
Definition: GuiEditor.cxx:706

◆ onShowUndo

void GenericGui::onShowUndo ( )
privateslot

Definition at line 2570 of file GenericGui.cxx.

2571 {
2573 }
void showUndo(QWidget *parent=0)
Definition: GuiEditor.cxx:699

◆ onShrinkExpand

void GenericGui::onShrinkExpand ( )
privateslot

Definition at line 2190 of file GenericGui.cxx.

2190  {
2191  DEBTRACE("GenericGui::onShrinkExpand");
2193 }
void shrinkExpand(Qt::KeyboardModifiers kbModifiers=Qt::NoModifier)
Definition: GuiEditor.cxx:392

References DEBTRACE.

◆ onShrinkExpandChildren

void GenericGui::onShrinkExpandChildren ( )
privateslot

Definition at line 2195 of file GenericGui.cxx.

2195  {
2196  DEBTRACE("GenericGui::onShrinkExpandChildren");
2197  _guiEditor->shrinkExpand(Qt::ControlModifier|Qt::ShiftModifier);
2198 }

References DEBTRACE.

◆ onShrinkExpandElementaryRecursively

void GenericGui::onShrinkExpandElementaryRecursively ( )
privateslot

Definition at line 2200 of file GenericGui.cxx.

2200  {
2201  DEBTRACE("GenericGui::onShrinkExpandElementaryRecursively");
2202  _guiEditor->shrinkExpand(Qt::ControlModifier);
2203 }

References DEBTRACE.

◆ onShutdownProc

void GenericGui::onShutdownProc ( )
privateslot

Definition at line 1917 of file GenericGui.cxx.

1918 {
1919  DEBTRACE("GenericGui::onShutdownProc");
1920  if (!QtGuiContext::getQtCurrent()) return;
1921  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1923 }

References DEBTRACE.

◆ onStartResume

void GenericGui::onStartResume ( )
privateslot

Definition at line 1769 of file GenericGui.cxx.

1770 {
1771  DEBTRACE("GenericGui::onStartResume");
1772  if (!QtGuiContext::getQtCurrent()) return;
1773  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
1775 }

References DEBTRACE.

◆ onStepByStepMode

void GenericGui::onStepByStepMode ( bool  checked)
privateslot

Definition at line 2275 of file GenericGui.cxx.

2276 {
2277  DEBTRACE("GenericGui::onWithoutStopMode " << checked);
2278  if (!QtGuiContext::getQtCurrent()) return;
2279  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
2281 }

References DEBTRACE.

◆ onSWITCHNode

void GenericGui::onSWITCHNode ( )
privateslot

Definition at line 2082 of file GenericGui.cxx.

2083 {
2084  DEBTRACE("GenericGui::onSWITCHNode");
2086 }

References DEBTRACE.

◆ onToggleAddRowCols

void GenericGui::onToggleAddRowCols ( bool  checked)
privateslot

Definition at line 2237 of file GenericGui.cxx.

2238 {
2239  Scene::_addRowCols = checked;
2240  DEBTRACE("Scene::_addRowCols=" << checked);
2241 }
static bool _addRowCols
Definition: Scene.hxx:40

References DEBTRACE.

◆ onToggleAutomaticComputeLinks

void GenericGui::onToggleAutomaticComputeLinks ( bool  checked)
privateslot

Definition at line 2219 of file GenericGui.cxx.

2220 {
2221  Scene::_autoComputeLinks = checked;
2222  DEBTRACE("Scene::_autoComputeLinks=" << checked);
2223 }
static bool _autoComputeLinks
Definition: Scene.hxx:37

References DEBTRACE.

◆ onToggleForce2NodesLinks

void GenericGui::onToggleForce2NodesLinks ( bool  checked)
privateslot

Definition at line 2231 of file GenericGui.cxx.

2232 {
2233  Scene::_force2NodesLink = checked;
2234  DEBTRACE("Scene::_force2NodesLink=" << checked);
2235 }
static bool _force2NodesLink
Definition: Scene.hxx:39

References DEBTRACE.

◆ onToggleSceneItemVisible

void GenericGui::onToggleSceneItemVisible ( bool  checked)
privateslot

Definition at line 2294 of file GenericGui.cxx.

2295 {
2296  DEBTRACE("GenericGui::onToggleSceneItemVisible " << checked);
2297  if (!QtGuiContext::getQtCurrent()) return;
2299  SubjectNode *snode = dynamic_cast<SubjectNode*>(sub);
2300  if (!snode) return;
2301  DEBTRACE("---");
2302  if (!QtGuiContext::getQtCurrent()->_mapOfSceneItem.count(sub)) return;
2303  DEBTRACE("---");
2305  item->setVisible(checked);
2306 }

References DEBTRACE.

◆ onToggleSimplifyLinks

void GenericGui::onToggleSimplifyLinks ( bool  checked)
privateslot

Definition at line 2225 of file GenericGui.cxx.

2226 {
2227  Scene::_simplifyLinks = checked;
2228  DEBTRACE("Scene::_simplifyLinks=" << checked);
2229 }
static bool _simplifyLinks
Definition: Scene.hxx:38

References DEBTRACE.

◆ onToggleStopOnError

void GenericGui::onToggleStopOnError ( bool  checked)
privateslot

Definition at line 2283 of file GenericGui.cxx.

2284 {
2285  DEBTRACE("GenericGui::onToggleStopOnError " << checked);
2286  if (!QtGuiContext::getQtCurrent()) return;
2287  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
2288  if(checked)
2290  else
2292 }

References DEBTRACE.

◆ onToggleStraightLinks

void GenericGui::onToggleStraightLinks ( bool  checked)
privateslot

Definition at line 2205 of file GenericGui.cxx.

2206 {
2207  Scene::_straightLinks = checked;
2208  DEBTRACE("Scene::_straightLinks=" << checked);
2210  return;
2211  map<Subject*, SchemaItem*>::const_iterator it = QtGuiContext::getQtCurrent()->_mapOfSchemaItem.begin();
2212  for( ; it != QtGuiContext::getQtCurrent()->_mapOfSchemaItem.end(); ++it)
2213  {
2214  Subject* sub = (*it).first;
2215  sub->update(SWITCHSHAPE, 0, 0);
2216  }
2217 }
static bool _straightLinks
Definition: Scene.hxx:36

References DEBTRACE, YACS::HMI::SWITCHSHAPE, and YACS::HMI::Subject::update().

◆ onUndo

void GenericGui::onUndo ( )
privateslot

Definition at line 2546 of file GenericGui.cxx.

2547 {
2548  DEBTRACE("GenericGui::onUndo");
2549  if (QtGuiContext::getQtCurrent()->_setOfModifiedSubjects.empty())
2550  {
2552  // Empty the clipboard in order to avoid the copy of a destroyed object.
2554  }
2555  else Message("undo not possible when there are local modifications not confirmed");
2556 }

References DEBTRACE.

◆ onWhatsThis

void GenericGui::onWhatsThis ( )
privateslot

Definition at line 2253 of file GenericGui.cxx.

2254 {
2255  DEBTRACE("GenericGui::onWhatsThis");
2256  QWhatsThis::enterWhatsThisMode();
2257 }

References DEBTRACE.

◆ onWHILENode

void GenericGui::onWHILENode ( )
privateslot

Definition at line 2076 of file GenericGui.cxx.

2077 {
2078  DEBTRACE("GenericGui::onWHILENode");
2080 }

References DEBTRACE.

◆ onWithoutStopMode

void GenericGui::onWithoutStopMode ( bool  checked)
privateslot

Definition at line 2259 of file GenericGui.cxx.

2260 {
2261  DEBTRACE("GenericGui::onWithoutStopMode " << checked);
2262  if (!QtGuiContext::getQtCurrent()) return;
2263  if (!QtGuiContext::getQtCurrent()->getGuiExecutor()) return;
2265 }

References DEBTRACE.

◆ onXMLNode

void GenericGui::onXMLNode ( )
privateslot

Definition at line 2010 of file GenericGui.cxx.

2011 {
2012  DEBTRACE("GenericGui::onXMLNode");
2013  _guiEditor->CreateNode("XmlNode");
2014 }

References DEBTRACE.

◆ onZoomToBloc

void GenericGui::onZoomToBloc ( )
privateslot

Definition at line 2178 of file GenericGui.cxx.

2179 {
2180  DEBTRACE("GenericGui::onZoomToBloc");
2182 }
virtual void onZoomToBloc()

References DEBTRACE.

◆ putGraphInForeachLoop()

void GenericGui::putGraphInForeachLoop ( std::string  type)

Definition at line 2142 of file GenericGui.cxx.

2143 {
2144  DEBTRACE("GenericGui::PutGraphInForeachLoop");
2145  _guiEditor->PutGraphInNode("ForEachLoop_"+type);
2146 }

References DEBTRACE.

Referenced by YACS::HMI::MenusBase::putGraphInForeachAction().

◆ raiseStacked()

void GenericGui::raiseStacked ( )

Definition at line 994 of file GenericGui.cxx.

995 {
996  if (_dwStacked) _dwStacked->raise();
997 }

◆ setLoadedPresentation()

void GenericGui::setLoadedPresentation ( YACS::ENGINE::Proc proc)

Definition at line 1216 of file GenericGui.cxx.

1217 {
1218  DEBTRACE("GenericGui::setLoadedPresentation");
1220  map<SceneNodeItem*, QPointF> nodesToMove;
1221  map<YACS::ENGINE::Node*, PrsData> presNodes = _loader->getPrsData(proc);
1222  if (!presNodes.empty())
1223  {
1224  map<YACS::ENGINE::Node*, PrsData>::iterator it = presNodes.begin();
1225  for (; it!= presNodes.end(); ++it)
1226  {
1227  YACS::ENGINE::Node* node = (*it).first;
1228  PrsData pres = (*it).second;
1231  YASSERT(item);
1232  SceneNodeItem *inode = dynamic_cast<SceneNodeItem*>(item);
1233  YASSERT(inode);
1234  inode->setPos(QPointF(pres._x, pres._y));
1235  inode->setWidth(pres._width);
1236  inode->setHeight(pres._height);
1237  inode->setExpanded(pres._expanded);
1238  QPointF anExpandedPos = QPointF(pres._expx, pres._expy);
1239  if (anExpandedPos.isNull())
1240  anExpandedPos = inode->pos();
1241  inode->setExpandedPos(anExpandedPos);
1242  inode->setExpandedWH(pres._expWidth, pres._expHeight);
1243  inode->setShownState(shownState(pres._shownState));
1244 
1245  // collect nodes to correct it's Y-position if this collides with parent's header
1246  if (inode->getParent() ) {
1247  qreal anX = inode->x();
1248  qreal anY = inode->y();
1249  if (inode->getShownState() == shrinkHidden) {
1250  anX = inode->getExpandedX();
1251  anY = inode->getExpandedY();
1252  }
1253  if (anY < inode->getParent()->getHeaderBottom())
1254  nodesToMove[inode] = QPointF(anX, inode->getParent()->getHeaderBottom()+1);
1255  }
1256  }
1257  }
1259 
1260  //after loading of presentation:
1261 
1262  //move nodes because of progress bar, if any was added
1263  map<SceneNodeItem*, QPointF>::iterator it = nodesToMove.begin();
1264  for (; it!= nodesToMove.end(); ++it)
1265  {
1266  (*it).first->setTopLeft((*it).second);
1267  }
1268 
1269  //update links
1272  else
1273  {
1276  SceneComposedNodeItem *proc = dynamic_cast<SceneComposedNodeItem*>(item);
1277  proc->updateLinks();
1278  }
1279 }
Base class for all nodes.
Definition: Node.hxx:70
std::map< YACS::ENGINE::Node *, YACS::HMI::SubjectNode * > _mapOfSubjectNode
Definition: guiContext.hxx:68
void setLoadingPresentation(bool isLoadpres)
virtual qreal getHeaderBottom()
virtual void setHeight(qreal height)
AbstractSceneItem cannot be resized (only ComposedNodeItem can)
virtual SceneComposedNodeItem * getParent()
virtual void setShownState(shownState ss)
void setExpandedPos(QPointF epos)
virtual void setWidth(qreal width)
AbstractSceneItem cannot be resized (only ComposedNodeItem can)
std::map< YACS::ENGINE::Node *, PrsData > getPrsData(YACS::ENGINE::Proc *proc)

References YACS::HMI::PrsData::_expanded, YACS::HMI::PrsData::_expHeight, YACS::HMI::PrsData::_expWidth, YACS::HMI::PrsData::_expx, YACS::HMI::PrsData::_expy, YACS::HMI::PrsData::_height, YACS::HMI::PrsData::_shownState, YACS::HMI::PrsData::_width, YACS::HMI::PrsData::_x, YACS::HMI::PrsData::_y, DEBTRACE, YACS::HMI::SceneNodeItem::getExpandedX(), YACS::HMI::SceneNodeItem::getExpandedY(), YACS::HMI::SceneNodeItem::getHeaderBottom(), YACS::HMI::SceneNodeItem::getParent(), YACS::HMI::SceneNodeItem::getShownState(), YACS::HMI::SceneNodeItem::setExpanded(), YACS::HMI::SceneNodeItem::setExpandedPos(), YACS::HMI::SceneNodeItem::setExpandedWH(), YACS::HMI::SceneNodeItem::setHeight(), YACS::HMI::SceneNodeItem::setShownState(), YACS::HMI::SceneNodeItem::setWidth(), YACS::HMI::shrinkHidden, YACS::HMI::SceneNodeItem::updateLinks(), and YASSERT.

◆ showBaseMenus()

void GenericGui::showBaseMenus ( bool  show)

Definition at line 743 of file GenericGui.cxx.

744 {
745  DEBTRACE("GenericGui::showBaseMenus " << show);
757 }
void setMenuShown(QAction *act, bool show)
void setToolShown(QAction *act, bool show)

References DEBTRACE.

◆ showCommonMenus()

void GenericGui::showCommonMenus ( bool  show)

Definition at line 805 of file GenericGui.cxx.

References DEBTRACE.

◆ showDockWidgets()

void GenericGui::showDockWidgets ( bool  isVisible)

Definition at line 983 of file GenericGui.cxx.

984 {
985  DEBTRACE("GenericGui::showDockWidgets " << isVisible);
986  if (_dwTree) _dwTree->setVisible(isVisible);
987  if (_dwTree) _dwTree->toggleViewAction()->setVisible(isVisible);
988  if (_dwStacked) _dwStacked->setVisible(isVisible);
989  if (_dwStacked) _dwStacked->toggleViewAction()->setVisible(isVisible);
990  if (_dwCatalogs) _dwCatalogs->setVisible(isVisible);
991  if (_dwCatalogs) _dwCatalogs->toggleViewAction()->setVisible(isVisible);
992 }

References DEBTRACE.

Referenced by Yacsgui::activateModule(), and Yacsgui::deactivateModule().

◆ showEditionMenus()

void GenericGui::showEditionMenus ( bool  show)

◆ showExecMenus()

void GenericGui::showExecMenus ( bool  show)

Definition at line 780 of file GenericGui.cxx.

781 {
782  DEBTRACE("GenericGui::showExecMenus " << show);
793  //_wrapper->setMenuShown(_newEditionAct, show);
794  //_wrapper->setToolShown(_newEditionAct, show);
803 }

References DEBTRACE.

◆ switchContext()

void GenericGui::switchContext ( QWidget view,
bool  onExit = false 
)

Definition at line 824 of file GenericGui.cxx.

825 {
826  DEBTRACE("GenericGui::switchContext " << view);
827  if (! _mapViewContext.count(view))
828  {
829  onExit ? hideAllMenus() : initialMenus();
830  _dwTree->setWidget(0);
831  _dwStacked->setWidget(0);
832  return;
833  }
834  QtGuiContext* newContext = _mapViewContext[view];
835 
836  _dwTree->setWidget(newContext->getEditTree());
837  _dwTree->widget()->show();
838  _dwTree->raise();
839  _dwStacked->setWidget(newContext->getStackedWidget());
840 
841  QtGuiContext::setQtCurrent(newContext);
842 
843  if (newContext->isEdition())
844  {
845  showExecMenus(false);
846  showBaseMenus(true);
847  showEditionMenus(true);
848  showCommonMenus(true);
849  if (_dwTree) _dwTree->setWindowTitle("Tree View: edition mode");
850  }
851  else
852  {
853  showEditionMenus(false);
854  showBaseMenus(true);
855  showExecMenus(true);
856  showCommonMenus(true);
857  _withoutStopModeAct->setChecked(true);
858  if (_dwTree) _dwTree->setWindowTitle("Tree View: execution mode");
859  }
860  _dwStacked->setMinimumWidth(10);
861 }
FormEditTree * getEditTree()
QStackedWidget * getStackedWidget()

References DEBTRACE, YACS::HMI::QtGuiContext::getEditTree(), YACS::HMI::QtGuiContext::getStackedWidget(), and YACS::HMI::QtGuiContext::isEdition().

Referenced by YACS::HMI::GraphicsView::mousePressEvent(), and Yacsgui::onWindowActivated().

Member Data Documentation

◆ _abortAct

QAction* YACS::HMI::GenericGui::_abortAct

Definition at line 102 of file GenericGui.hxx.

◆ _arrangeLocalNodesAct

QAction* YACS::HMI::GenericGui::_arrangeLocalNodesAct

◆ _arrangeRecurseNodesAct

QAction* YACS::HMI::GenericGui::_arrangeRecurseNodesAct

◆ _BJLdialog

BatchJobsListDialog* YACS::HMI::GenericGui::_BJLdialog
protected

Definition at line 217 of file GenericGui.hxx.

◆ _blockNodeAct

QAction* YACS::HMI::GenericGui::_blockNodeAct

◆ _breakpointsModeAct

QAction* YACS::HMI::GenericGui::_breakpointsModeAct

Definition at line 111 of file GenericGui.hxx.

◆ _builtinCatalog

YACS::ENGINE::Catalog* YACS::HMI::GenericGui::_builtinCatalog
protected

Definition at line 218 of file GenericGui.hxx.

◆ _catalogsWidget

CatalogWidget* YACS::HMI::GenericGui::_catalogsWidget
protected

Definition at line 220 of file GenericGui.hxx.

◆ _centerOnNodeAct

◆ _chooseBatchJobAct

QAction* YACS::HMI::GenericGui::_chooseBatchJobAct

Definition at line 91 of file GenericGui.hxx.

◆ _computeLinkAct

QAction* YACS::HMI::GenericGui::_computeLinkAct

◆ _copyItemAct

QAction* YACS::HMI::GenericGui::_copyItemAct

◆ _CORBAServiceNodeAct

QAction* YACS::HMI::GenericGui::_CORBAServiceNodeAct

Definition at line 133 of file GenericGui.hxx.

◆ _cppNodeAct

QAction* YACS::HMI::GenericGui::_cppNodeAct

Definition at line 135 of file GenericGui.hxx.

◆ _createDataTypeAct

QAction* YACS::HMI::GenericGui::_createDataTypeAct

Definition at line 123 of file GenericGui.hxx.

◆ _cutItemAct

QAction* YACS::HMI::GenericGui::_cutItemAct

◆ _deEmphasizeAllAct

◆ _deleteItemAct

◆ _dwCatalogs

QDockWidget* YACS::HMI::GenericGui::_dwCatalogs
protected

Definition at line 216 of file GenericGui.hxx.

◆ _dwStacked

QDockWidget* YACS::HMI::GenericGui::_dwStacked
protected

Definition at line 215 of file GenericGui.hxx.

◆ _dwTree

QDockWidget* YACS::HMI::GenericGui::_dwTree
protected

Definition at line 214 of file GenericGui.hxx.

◆ _editDataTypesAct

QAction* YACS::HMI::GenericGui::_editDataTypesAct

Definition at line 122 of file GenericGui.hxx.

◆ _emphasisCtrlLinksAct

QAction* YACS::HMI::GenericGui::_emphasisCtrlLinksAct

◆ _emphasisLinkAct

QAction* YACS::HMI::GenericGui::_emphasisLinkAct

Definition at line 193 of file GenericGui.hxx.

Referenced by YACS::HMI::LinkMenu::popupMenu().

◆ _emphasisPortLinksAct

◆ _execModeGroup

QActionGroup* YACS::HMI::GenericGui::_execModeGroup

Definition at line 109 of file GenericGui.hxx.

◆ _exportSchemaAct

QAction* YACS::HMI::GenericGui::_exportSchemaAct

Definition at line 93 of file GenericGui.hxx.

◆ _exportSchemaAsAct

QAction* YACS::HMI::GenericGui::_exportSchemaAsAct

Definition at line 94 of file GenericGui.hxx.

◆ _FOREACHNodeAct

QAction* YACS::HMI::GenericGui::_FOREACHNodeAct

Definition at line 145 of file GenericGui.hxx.

◆ _FORNodeAct

QAction* YACS::HMI::GenericGui::_FORNodeAct

◆ _getContainerLogAct

QAction* YACS::HMI::GenericGui::_getContainerLogAct

Definition at line 119 of file GenericGui.hxx.

Referenced by YACS::HMI::ElementaryNodeMenu::popupMenu().

◆ _getErrorDetailsAct

QAction* YACS::HMI::GenericGui::_getErrorDetailsAct

◆ _getErrorReportAct

QAction* YACS::HMI::GenericGui::_getErrorReportAct

◆ _getYacsContainerLogAct

QAction* YACS::HMI::GenericGui::_getYacsContainerLogAct

Definition at line 116 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _guiEditor

◆ _hideAllLinksAct

QAction* YACS::HMI::GenericGui::_hideAllLinksAct

Definition at line 178 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _hideCtrlLinksAct

◆ _hideLinkAct

QAction* YACS::HMI::GenericGui::_hideLinkAct

Definition at line 192 of file GenericGui.hxx.

Referenced by YACS::HMI::LinkMenu::popupMenu().

◆ _hidePortLinksAct

QAction* YACS::HMI::GenericGui::_hidePortLinksAct

◆ _importCatalogAct

QAction* YACS::HMI::GenericGui::_importCatalogAct

Definition at line 95 of file GenericGui.hxx.

◆ _importDataTypeAct

QAction* YACS::HMI::GenericGui::_importDataTypeAct

Definition at line 124 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _importSchemaAct

QAction* YACS::HMI::GenericGui::_importSchemaAct

Definition at line 90 of file GenericGui.hxx.

◆ _importSupervSchemaAct

QAction* YACS::HMI::GenericGui::_importSupervSchemaAct

Definition at line 92 of file GenericGui.hxx.

◆ _inDataNodeAct

QAction* YACS::HMI::GenericGui::_inDataNodeAct

◆ _inlineFunctionNodeAct

QAction* YACS::HMI::GenericGui::_inlineFunctionNodeAct

◆ _inlineScriptNodeAct

QAction* YACS::HMI::GenericGui::_inlineScriptNodeAct

◆ _inStudyNodeAct

QAction* YACS::HMI::GenericGui::_inStudyNodeAct

◆ _isSaved

bool YACS::HMI::GenericGui::_isSaved
protected

Definition at line 225 of file GenericGui.hxx.

◆ _loadAndRunSchemaAct

QAction* YACS::HMI::GenericGui::_loadAndRunSchemaAct

Definition at line 99 of file GenericGui.hxx.

◆ _loader

YACSGuiLoader* YACS::HMI::GenericGui::_loader
protected

Definition at line 211 of file GenericGui.hxx.

◆ _loadRunStateSchemaAct

QAction* YACS::HMI::GenericGui::_loadRunStateSchemaAct

Definition at line 98 of file GenericGui.hxx.

◆ _machineList

std::list<std::string> YACS::HMI::GenericGui::_machineList
protected

Definition at line 226 of file GenericGui.hxx.

◆ _mapViewContext

std::map<QWidget*, YACS::HMI::QtGuiContext*> YACS::HMI::GenericGui::_mapViewContext
protected

Definition at line 221 of file GenericGui.hxx.

◆ _menuId

int YACS::HMI::GenericGui::_menuId
protected

Definition at line 222 of file GenericGui.hxx.

◆ _newContainerAct

QAction* YACS::HMI::GenericGui::_newContainerAct

◆ _newCorbaComponentAct

QAction* YACS::HMI::GenericGui::_newCorbaComponentAct

Definition at line 130 of file GenericGui.hxx.

◆ _newEditionAct

QAction* YACS::HMI::GenericGui::_newEditionAct

Definition at line 107 of file GenericGui.hxx.

◆ _newHPContainerAct

QAction* YACS::HMI::GenericGui::_newHPContainerAct

◆ _newSalomeComponentAct

QAction* YACS::HMI::GenericGui::_newSalomeComponentAct

Definition at line 128 of file GenericGui.hxx.

Referenced by YACS::HMI::ComponentInstanceMenu::popupMenu().

◆ _newSalomePythonComponentAct

QAction* YACS::HMI::GenericGui::_newSalomePythonComponentAct

Definition at line 129 of file GenericGui.hxx.

◆ _newSchemaAct

QAction* YACS::HMI::GenericGui::_newSchemaAct

Definition at line 89 of file GenericGui.hxx.

◆ _nodeFromCatalogAct

QAction* YACS::HMI::GenericGui::_nodeFromCatalogAct

◆ _nodeNodeServiceNodeAct

QAction* YACS::HMI::GenericGui::_nodeNodeServiceNodeAct

Definition at line 134 of file GenericGui.hxx.

◆ _OptimizerLoopAct

QAction* YACS::HMI::GenericGui::_OptimizerLoopAct

◆ _outDataNodeAct

QAction* YACS::HMI::GenericGui::_outDataNodeAct

◆ _outStudyNodeAct

QAction* YACS::HMI::GenericGui::_outStudyNodeAct

◆ _parent

QMainWindow* YACS::HMI::GenericGui::_parent
protected

Definition at line 213 of file GenericGui.hxx.

◆ _pasteItemAct

◆ _pauseAct

QAction* YACS::HMI::GenericGui::_pauseAct

Definition at line 103 of file GenericGui.hxx.

◆ _putGraphInBlocAct

QAction* YACS::HMI::GenericGui::_putGraphInBlocAct

Definition at line 155 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _putGraphInForLoopAct

QAction* YACS::HMI::GenericGui::_putGraphInForLoopAct

Definition at line 156 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _putGraphInOptimizerLoopAct

QAction* YACS::HMI::GenericGui::_putGraphInOptimizerLoopAct

Definition at line 158 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _putGraphInWhileLoopAct

QAction* YACS::HMI::GenericGui::_putGraphInWhileLoopAct

Definition at line 157 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _putInBlocAct

QAction* YACS::HMI::GenericGui::_putInBlocAct

◆ _redoAct

QAction* YACS::HMI::GenericGui::_redoAct

Definition at line 197 of file GenericGui.hxx.

◆ _resetAct

QAction* YACS::HMI::GenericGui::_resetAct

Definition at line 104 of file GenericGui.hxx.

◆ _runLoadedSchemaAct

QAction* YACS::HMI::GenericGui::_runLoadedSchemaAct

Definition at line 97 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _salomeServiceNodeAct

QAction* YACS::HMI::GenericGui::_salomeServiceNodeAct

Definition at line 131 of file GenericGui.hxx.

◆ _saveRunStateAct

QAction* YACS::HMI::GenericGui::_saveRunStateAct

Definition at line 106 of file GenericGui.hxx.

◆ _schemaCnt

int YACS::HMI::GenericGui::_schemaCnt
protected

Definition at line 224 of file GenericGui.hxx.

◆ _selectComponentInstanceAct

QAction* YACS::HMI::GenericGui::_selectComponentInstanceAct

Definition at line 127 of file GenericGui.hxx.

Referenced by YACS::HMI::ComponentInstanceMenu::popupMenu().

◆ _selectReferenceAct

QAction* YACS::HMI::GenericGui::_selectReferenceAct

Definition at line 174 of file GenericGui.hxx.

Referenced by YACS::HMI::ReferenceMenu::popupMenu().

◆ _serviceInlineNodeAct

QAction* YACS::HMI::GenericGui::_serviceInlineNodeAct

Definition at line 132 of file GenericGui.hxx.

◆ _sessionCatalog

YACS::ENGINE::Catalog* YACS::HMI::GenericGui::_sessionCatalog
protected

Definition at line 219 of file GenericGui.hxx.

◆ _showAllLinksAct

QAction* YACS::HMI::GenericGui::_showAllLinksAct

Definition at line 177 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _showCtrlLinksAct

◆ _showLinkAct

QAction* YACS::HMI::GenericGui::_showLinkAct

Definition at line 191 of file GenericGui.hxx.

Referenced by YACS::HMI::LinkMenu::popupMenu().

◆ _showOnlyCtrlLinksAct

◆ _showOnlyLinkAct

QAction* YACS::HMI::GenericGui::_showOnlyLinkAct

Definition at line 190 of file GenericGui.hxx.

Referenced by YACS::HMI::LinkMenu::popupMenu().

◆ _showOnlyPortLinksAct

QAction* YACS::HMI::GenericGui::_showOnlyPortLinksAct

◆ _showPortLinksAct

QAction* YACS::HMI::GenericGui::_showPortLinksAct

◆ _showRedoAct

QAction* YACS::HMI::GenericGui::_showRedoAct

Definition at line 199 of file GenericGui.hxx.

◆ _showUndoAct

QAction* YACS::HMI::GenericGui::_showUndoAct

Definition at line 198 of file GenericGui.hxx.

◆ _shrinkExpand

QAction* YACS::HMI::GenericGui::_shrinkExpand

◆ _shrinkExpandChildren

QAction* YACS::HMI::GenericGui::_shrinkExpandChildren

◆ _shrinkExpandElementaryRecursively

QAction* YACS::HMI::GenericGui::_shrinkExpandElementaryRecursively

◆ _shutdownProcAct

QAction* YACS::HMI::GenericGui::_shutdownProcAct

Definition at line 120 of file GenericGui.hxx.

Referenced by YACS::HMI::ProcMenu::popupMenu().

◆ _startResumeAct

QAction* YACS::HMI::GenericGui::_startResumeAct

Definition at line 101 of file GenericGui.hxx.

◆ _stepByStepModeAct

QAction* YACS::HMI::GenericGui::_stepByStepModeAct

Definition at line 112 of file GenericGui.hxx.

◆ _SWITCHNodeAct

QAction* YACS::HMI::GenericGui::_SWITCHNodeAct

◆ _toggleAddRowColsAct

QAction* YACS::HMI::GenericGui::_toggleAddRowColsAct

Definition at line 172 of file GenericGui.hxx.

◆ _toggleAutomaticComputeLinkAct

QAction* YACS::HMI::GenericGui::_toggleAutomaticComputeLinkAct

Definition at line 169 of file GenericGui.hxx.

◆ _toggleForce2NodesLinkAct

QAction* YACS::HMI::GenericGui::_toggleForce2NodesLinkAct

Definition at line 171 of file GenericGui.hxx.

◆ _toggleSceneItemVisibleAct

QAction* YACS::HMI::GenericGui::_toggleSceneItemVisibleAct

Definition at line 173 of file GenericGui.hxx.

◆ _toggleSimplifyLinkAct

QAction* YACS::HMI::GenericGui::_toggleSimplifyLinkAct

Definition at line 170 of file GenericGui.hxx.

◆ _toggleStopOnErrorAct

QAction* YACS::HMI::GenericGui::_toggleStopOnErrorAct

Definition at line 114 of file GenericGui.hxx.

◆ _toggleStraightLinksAct

QAction* YACS::HMI::GenericGui::_toggleStraightLinksAct

Definition at line 168 of file GenericGui.hxx.

◆ _toolId

int YACS::HMI::GenericGui::_toolId
protected

Definition at line 223 of file GenericGui.hxx.

◆ _undoAct

QAction* YACS::HMI::GenericGui::_undoAct

Definition at line 196 of file GenericGui.hxx.

◆ _whatsThisAct

QAction* YACS::HMI::GenericGui::_whatsThisAct

Definition at line 175 of file GenericGui.hxx.

◆ _WHILENodeAct

QAction* YACS::HMI::GenericGui::_WHILENodeAct

◆ _withoutStopModeAct

QAction* YACS::HMI::GenericGui::_withoutStopModeAct

Definition at line 110 of file GenericGui.hxx.

◆ _wrapper

SuitWrapper* YACS::HMI::GenericGui::_wrapper
protected

Definition at line 212 of file GenericGui.hxx.

◆ _XMLNodeAct

QAction* YACS::HMI::GenericGui::_XMLNodeAct

Definition at line 136 of file GenericGui.hxx.

◆ _zoomToBlocAct


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