1 #include "XGUI_Module.h"
2 #include "XGUI_Constants.h"
3 #include "XGUI_Command.h"
4 #include "XGUI_MainMenu.h"
5 #include "XGUI_MainWindow.h"
6 #include "XGUI_MenuGroupPanel.h"
7 #include "XGUI_Tools.h"
8 #include "XGUI_Workbench.h"
9 #include "XGUI_Workshop.h"
10 #include "XGUI_Viewer.h"
11 #include "ModuleBase_WidgetFactory.h"
12 #include "XGUI_SelectionMgr.h"
13 #include "XGUI_ObjectsBrowser.h"
14 #include "XGUI_Displayer.h"
15 #include "XGUI_OperationMgr.h"
16 #include "XGUI_SalomeConnector.h"
17 #include "XGUI_SalomeViewer.h"
18 #include "XGUI_ActionsMgr.h"
19 #include "XGUI_ErrorDialog.h"
20 #include "XGUI_ViewerProxy.h"
21 #include "XGUI_PropertyPanel.h"
23 #include <Model_Events.h>
24 #include <ModelAPI_PluginManager.h>
25 #include <ModelAPI_Feature.h>
26 #include <ModelAPI_Data.h>
27 #include <ModelAPI_AttributeDocRef.h>
29 #include <Events_Loop.h>
30 #include <Events_Error.h>
31 #include <ModuleBase_Operation.h>
32 #include <ModuleBase_Operation.h>
33 #include <ModuleBase_OperationDescription.h>
34 #include <Config_FeatureMessage.h>
35 #include <Config_PointerMessage.h>
37 #include <QApplication>
38 #include <QFileDialog>
39 #include <QMessageBox>
40 #include <QMdiSubWindow>
41 #include <QPushButton>
42 #include <QDockWidget>
56 QMap<QString, QString> XGUI_Workshop::myIcons;
58 QString XGUI_Workshop::featureIcon(const std::string& theId)
60 QString aId(theId.c_str());
61 if (myIcons.contains(aId))
66 XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
68 myCurrentFile(QString()),
69 myPartSetModule(NULL),
70 mySalomeConnector(theConnector),
75 myMainWindow = mySalomeConnector? 0 : new XGUI_MainWindow();
77 myDisplayer = new XGUI_Displayer(this);
79 mySelector = new XGUI_SelectionMgr(this);
80 connect(mySelector, SIGNAL(selectionChanged()), this, SLOT(changeCurrentDocument()));
82 myOperationMgr = new XGUI_OperationMgr(this);
83 myActionsMgr = new XGUI_ActionsMgr(this);
84 myErrorDlg = new XGUI_ErrorDialog(myMainWindow);
86 myViewerProxy = new XGUI_ViewerProxy(this);
88 connect(myOperationMgr, SIGNAL(operationStarted()), this, SLOT(onOperationStarted()));
89 connect(myOperationMgr, SIGNAL(operationStopped(ModuleBase_Operation*)),
90 this, SLOT(onOperationStopped(ModuleBase_Operation*)));
91 connect(this, SIGNAL(errorOccurred(const QString&)), myErrorDlg, SLOT(addError(const QString&)));
94 //******************************************************
95 XGUI_Workshop::~XGUI_Workshop(void)
99 //******************************************************
100 void XGUI_Workshop::startApplication()
103 //Initialize event listening
104 Events_Loop* aLoop = Events_Loop::loop();
105 aLoop->registerListener(this, Events_Error::errorID()); //!< Listening application errors.
106 //TODO(sbh): Implement static method to extract event id [SEID]
107 Events_ID aFeatureId = aLoop->eventByName(EVENT_FEATURE_LOADED);
108 aLoop->registerListener(this, aFeatureId);
109 Events_ID aPartSetId = aLoop->eventByName("PartSetModuleEvent");
110 aLoop->registerListener(this, aPartSetId);
111 Events_ID aFeatureUpdatedId = aLoop->eventByName(EVENT_FEATURE_UPDATED);
112 aLoop->registerListener(this, aFeatureUpdatedId);
115 myMainWindow->show();
116 updateCommandStatus();
121 //******************************************************
122 void XGUI_Workshop::initMenu()
124 if (isSalomeMode()) {
125 // Create only Undo, Redo commands
126 salomeConnector()->addEditCommand("UNDO_CMD",
127 tr("Undo"), tr("Undo last command"),
128 QIcon(":pictures/undo.png"),
129 false, this, SLOT(onUndo()),
131 salomeConnector()->addEditCommand("REDO_CMD",
132 tr("Redo"), tr("Redo last command"),
133 QIcon(":pictures/redo.png"),
134 false, this, SLOT(onRedo()),
136 salomeConnector()->addEditMenuSeparator();
139 XGUI_Workbench* aPage = myMainWindow->menuObject()->generalPage();
141 // File commands group
142 XGUI_MenuGroupPanel* aGroup = aPage->addGroup("Default");
144 XGUI_Command* aCommand;
146 aCommand = aGroup->addFeature("SAVE_CMD", tr("Save..."), tr("Save the document"),
147 QIcon(":pictures/save.png"), QKeySequence::Save);
148 aCommand->connectTo(this, SLOT(onSave()));
149 //aCommand->disable();
151 aCommand = aGroup->addFeature("UNDO_CMD", tr("Undo"), tr("Undo last command"),
152 QIcon(":pictures/undo.png"), QKeySequence::Undo);
153 aCommand->connectTo(this, SLOT(onUndo()));
155 aCommand = aGroup->addFeature("REDO_CMD", tr("Redo"), tr("Redo last command"),
156 QIcon(":pictures/redo.png"), QKeySequence::Redo);
157 aCommand->connectTo(this, SLOT(onRedo()));
159 aCommand = aGroup->addFeature("REBUILD_CMD", tr("Rebuild"), tr("Rebuild data objects"),
160 QIcon(":pictures/rebuild.png"));
162 aCommand = aGroup->addFeature("SAVEAS_CMD", tr("Save as..."), tr("Save the document into a file"),
163 QIcon(":pictures/save.png"));
164 aCommand->connectTo(this, SLOT(onSaveAs()));
165 //aCommand->disable();
167 aCommand = aGroup->addFeature("OPEN_CMD", tr("Open..."), tr("Open a new document"),
168 QIcon(":pictures/open.png"), QKeySequence::Open);
169 aCommand->connectTo(this, SLOT(onOpen()));
171 //aCommand = aGroup->addFeature("NEW_CMD", tr("New"), tr("Create a new document"),
172 // QIcon(":pictures/new.png"), QKeySequence::New);
173 //aCommand->connectTo(this, SLOT(onNew()));
175 aCommand = aGroup->addFeature("EXIT_CMD", tr("Exit"), tr("Exit application"),
176 QIcon(":pictures/close.png"), QKeySequence::Close);
177 aCommand->connectTo(this, SLOT(onExit()));
181 //******************************************************
182 XGUI_Workbench* XGUI_Workshop::addWorkbench(const QString& theName)
184 XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
185 return aMenuBar->addWorkbench(theName);
188 //******************************************************
189 void XGUI_Workshop::processEvent(const Events_Message* theMessage)
191 //A message to start feature creation received.
192 static Events_ID aFeatureLoadedId = Events_Loop::loop()->eventByName(EVENT_FEATURE_LOADED);
193 if (theMessage->eventID() == aFeatureLoadedId) {
194 const Config_FeatureMessage* aFeatureMsg = dynamic_cast<const Config_FeatureMessage*>(theMessage);
195 addFeature(aFeatureMsg);
198 //Update property panel on corresponding message. If there is no current operation (no
199 //property panel), or received message has different feature to the current - do nothing.
200 static Events_ID aFeatureUpdatedId = Events_Loop::loop()->eventByName(EVENT_FEATURE_UPDATED);
201 if (theMessage->eventID() == aFeatureUpdatedId && myOperationMgr->hasOperation())
203 const Model_FeatureUpdatedMessage* anUpdateMsg =
204 dynamic_cast<const Model_FeatureUpdatedMessage*>(theMessage);
205 boost::shared_ptr<ModelAPI_Feature> aNewFeature = anUpdateMsg->feature();
206 boost::shared_ptr<ModelAPI_Feature> aCurrentFeature = myOperationMgr->currentOperation()->feature();
207 if(aNewFeature == aCurrentFeature) {
208 myPropertyPanel->updateContentWidget(aCurrentFeature);
211 //An operation passed by message. Start it, process and commit.
212 const Config_PointerMessage* aPartSetMsg = dynamic_cast<const Config_PointerMessage*>(theMessage);
214 ModuleBase_Operation* anOperation =
215 (ModuleBase_Operation*)(aPartSetMsg->pointer());
217 if (myOperationMgr->startOperation(anOperation)) {
218 myPropertyPanel->updateContentWidget(anOperation->feature());
219 if (anOperation->getDescription()->xmlRepresentation().isEmpty()) {
220 anOperation->commit();
221 updateCommandStatus();
226 //Show error dialog if error message received.
227 const Events_Error* anAppError = dynamic_cast<const Events_Error*>(theMessage);
229 emit errorOccurred(QString::fromLatin1(anAppError->description()));
232 myErrorDlg->activateWindow();
237 //******************************************************
238 void XGUI_Workshop::onOperationStarted()
240 ModuleBase_Operation* aOperation = myOperationMgr->currentOperation();
242 if(!aOperation->getDescription()->xmlRepresentation().isEmpty()) { //!< No need for property panel
243 connectWithOperation(aOperation);
247 ModuleBase_WidgetFactory aFactory = ModuleBase_WidgetFactory(aOperation);
248 QWidget* aContent = myPropertyPanel->contentWidget();
249 qDeleteAll(aContent->children());
250 aFactory.createWidget(aContent);
251 myPropertyPanel->setModelWidgets(aFactory.getModelWidgets());
252 myPropertyPanel->setWindowTitle(aOperation->getDescription()->description());
256 //******************************************************
257 void XGUI_Workshop::onOperationStopped(ModuleBase_Operation* theOperation)
259 ModuleBase_Operation* aOperation = myOperationMgr->currentOperation();
261 //!< No need for property panel
262 updateCommandStatus();
264 if(myOperationMgr->operationsCount() > 1) {
265 myActionsMgr->updateAction(theOperation->getDescription()->operationId());
268 if(!aOperation->getDescription()->xmlRepresentation().isEmpty()) {
269 myActionsMgr->restoreCommandState();
276 void XGUI_Workshop::addFeature(const Config_FeatureMessage* theMessage)
280 qDebug() << "XGUI_Workshop::addFeature: NULL message.";
284 // Remember features icons
285 myIcons[QString(theMessage->id().c_str())] = QString(theMessage->icon().c_str());
287 //Find or create Workbench
288 QString aWchName = QString::fromStdString(theMessage->workbenchId());
289 QString aNestedFeatures = QString::fromStdString(theMessage->nestedFeatures());
290 bool isUsePropPanel = theMessage->isUseInput();
291 if (isSalomeMode()) {
292 QString aId = QString::fromStdString(theMessage->id());
293 salomeConnector()->addFeature(aWchName,
294 QString::fromStdString(theMessage->id()),
296 QString::fromStdString(theMessage->tooltip()),
297 QIcon(theMessage->icon().c_str()),
298 isUsePropPanel, this,
299 SLOT(onFeatureTriggered()), QKeySequence());
300 myActionsMgr->addCommand(aId, salomeConnector()->command(aId));
301 salomeConnector()->setNestedActions(aId, aNestedFeatures.split(" "));
305 XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
306 XGUI_Workbench* aPage = aMenuBar->findWorkbench(aWchName);
308 aPage = addWorkbench(aWchName);
310 //Find or create Group
311 QString aGroupName = QString::fromStdString(theMessage->groupId());
312 XGUI_MenuGroupPanel* aGroup = aPage->findGroup(aGroupName);
314 aGroup = aPage->addGroup(aGroupName);
317 XGUI_Command* aCommand = aGroup->addFeature(QString::fromStdString(theMessage->id()),
318 QString::fromStdString(theMessage->text()),
319 QString::fromStdString(theMessage->tooltip()),
320 QIcon(theMessage->icon().c_str()),
321 QKeySequence(), isUsePropPanel);
322 aCommand->setUnblockableCommands(aNestedFeatures.split(" "));
323 myActionsMgr->addCommand(aCommand);
324 myPartSetModule->featureCreated(aCommand);
329 * Makes a signal/slot connections between Property Panel
330 * and given operation. The given operation becomes a
331 * current operation and previous operation if exists
333 void XGUI_Workshop::connectWithOperation(ModuleBase_Operation* theOperation)
335 QPushButton* aOkBtn = myPropertyPanel->findChild<QPushButton*>(XGUI::PROP_PANEL_OK);
336 connect(aOkBtn, SIGNAL(clicked()), theOperation, SLOT(commit()));
337 QPushButton* aCancelBtn = myPropertyPanel->findChild<QPushButton*>(XGUI::PROP_PANEL_CANCEL);
338 connect(aCancelBtn, SIGNAL(clicked()), theOperation, SLOT(abort()));
340 QAction* aCommand = 0;
341 if (isSalomeMode()) {
342 aCommand = salomeConnector()->command(theOperation->getDescription()->operationId());
344 XGUI_MainMenu* aMenu = myMainWindow->menuObject();
345 aCommand = aMenu->feature(theOperation->getDescription()->operationId());
347 //Abort operation on uncheck the command
348 connect(aCommand, SIGNAL(triggered(bool)), theOperation, SLOT(setRunning(bool)));
352 * Saves document with given name.
354 void XGUI_Workshop::saveDocument(QString theName)
356 QApplication::restoreOverrideCursor();
357 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
358 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
359 aDoc->save(theName.toLatin1().constData());
360 QApplication::restoreOverrideCursor();
363 //******************************************************
364 void XGUI_Workshop::onExit()
366 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
367 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
368 if(aDoc->isModified()) {
369 int anAnswer = QMessageBox::question(
370 myMainWindow, tr("Save current file"),
371 tr("The document is modified, save before exit?"),
372 QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Cancel);
373 if(anAnswer == QMessageBox::Save) {
375 } else if (anAnswer == QMessageBox::Cancel) {
382 //******************************************************
383 void XGUI_Workshop::onNew()
385 QApplication::setOverrideCursor(Qt::WaitCursor);
386 if (objectBrowser() == 0) {
388 mySelector->connectViewers();
390 myViewerProxy->connectToViewer();
392 if (!isSalomeMode()) {
393 myMainWindow->showPythonConsole();
394 QMdiSubWindow* aWnd = myMainWindow->viewer()->createView();
395 aWnd->showMaximized();
396 updateCommandStatus();
398 QApplication::restoreOverrideCursor();
401 //******************************************************
402 void XGUI_Workshop::onOpen()
404 //save current file before close if modified
405 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
406 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
407 if(aDoc->isModified()) {
408 //TODO(sbh): re-launch the app?
409 int anAnswer = QMessageBox::question(
410 myMainWindow, tr("Save current file"),
411 tr("The document is modified, save before opening another?"),
412 QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Cancel);
413 if(anAnswer == QMessageBox::Save) {
415 } else if (anAnswer == QMessageBox::Cancel) {
422 //show file dialog, check if readable and open
423 myCurrentFile = QFileDialog::getOpenFileName(mainWindow());
424 if(myCurrentFile.isEmpty())
426 QFileInfo aFileInfo(myCurrentFile);
427 if(!aFileInfo.exists() || !aFileInfo.isReadable()) {
428 QMessageBox::critical(myMainWindow, tr("Warning"), tr("Unable to open the file."));
432 QApplication::setOverrideCursor(Qt::WaitCursor);
433 aDoc->load(myCurrentFile.toLatin1().constData());
434 QApplication::restoreOverrideCursor();
435 updateCommandStatus();
438 //******************************************************
439 void XGUI_Workshop::onSave()
441 if(myCurrentFile.isEmpty()) {
445 saveDocument(myCurrentFile);
446 updateCommandStatus();
449 //******************************************************
450 void XGUI_Workshop::onSaveAs()
452 QString aTemp = myCurrentFile;
453 myCurrentFile = QFileDialog::getSaveFileName(mainWindow());
454 if(myCurrentFile.isEmpty()) {
455 myCurrentFile = aTemp;
458 QFileInfo aFileInfo(myCurrentFile);
459 if(aFileInfo.exists() && !aFileInfo.isWritable()) {
460 QMessageBox::critical(myMainWindow, tr("Warning"), tr("Unable to save the file."));
466 //******************************************************
467 void XGUI_Workshop::onUndo()
469 objectBrowser()->setCurrentIndex(QModelIndex());
470 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
471 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
473 updateCommandStatus();
476 //******************************************************
477 void XGUI_Workshop::onRedo()
479 objectBrowser()->setCurrentIndex(QModelIndex());
480 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
481 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
483 updateCommandStatus();
486 //******************************************************
487 XGUI_Module* XGUI_Workshop::loadModule(const QString& theModule)
489 QString libName = library(theModule);
490 if (libName.isEmpty()) {
492 qPrintable( tr( "Information about module \"%1\" doesn't exist." ).arg( theModule ) ));
497 CREATE_FUNC crtInst = 0;
501 HINSTANCE modLib = ::LoadLibrary((LPTSTR) qPrintable(libName));
505 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
506 0, ::GetLastError(), 0, (LPTSTR) & lpMsgBuf, 0, 0);
507 QString aMsg((char*) &lpMsgBuf);
508 err = QString("Failed to load %1. %2").arg(libName).arg(aMsg);
509 ::LocalFree(lpMsgBuf);
511 crtInst = (CREATE_FUNC) ::GetProcAddress(modLib, CREATE_MODULE);
515 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM
516 | FORMAT_MESSAGE_IGNORE_INSERTS,
517 0, ::GetLastError(), 0, (LPTSTR) & lpMsgBuf, 0, 0);
518 QString aMsg((char*) &lpMsgBuf);
519 err = QString("Failed to find %1 function. %2").arg( CREATE_MODULE).arg(aMsg);
520 ::LocalFree(lpMsgBuf);
524 void* modLib = dlopen( libName.toLatin1(), RTLD_LAZY );
526 err = QString( "Can not load library %1. %2" ).arg( libName ).arg( dlerror() );
529 crtInst = (CREATE_FUNC)dlsym( modLib, CREATE_MODULE );
531 err = QString( "Failed to find function %1. %2" ).arg( CREATE_MODULE ).arg( dlerror() );
535 XGUI_Module* aModule = crtInst ? crtInst(this) : 0;
537 if (!err.isEmpty()) {
538 if (mainWindow() && mainWindow()->isVisible())
539 QMessageBox::warning(mainWindow(), tr("Error"), err);
541 qWarning( qPrintable( err ));
546 //******************************************************
547 bool XGUI_Workshop::activateModule()
549 myPartSetModule = loadModule("PartSet");
550 if (!myPartSetModule)
552 myPartSetModule->createFeatures();
556 //******************************************************
557 void XGUI_Workshop::updateCommandStatus()
559 if (isSalomeMode()) // TODO: update commands in SALOME
561 XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
563 QList<XGUI_Command*> aCommands = aMenuBar->features();
564 QList<XGUI_Command*>::const_iterator aIt;
566 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
567 if (aMgr->hasRootDocument()) {
568 XGUI_Command* aUndoCmd;
569 XGUI_Command* aRedoCmd;
570 for (aIt = aCommands.constBegin(); aIt != aCommands.constEnd(); ++aIt) {
571 if ((*aIt)->id() == "UNDO_CMD")
573 else if ((*aIt)->id() == "REDO_CMD")
575 else // Enable all commands
578 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
579 aUndoCmd->setEnabled(aDoc->canUndo());
580 aRedoCmd->setEnabled(aDoc->canRedo());
582 for (aIt = aCommands.constBegin(); aIt != aCommands.constEnd(); ++aIt) {
583 if ((*aIt)->id() == "NEW_CMD")
585 else if ((*aIt)->id() == "EXIT_CMD")
593 //******************************************************
594 QDockWidget* XGUI_Workshop::createObjectBrowser(QWidget* theParent)
596 QDockWidget* aObjDock = new QDockWidget(theParent);
597 aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
598 aObjDock->setWindowTitle(tr("Object browser"));
599 myObjectBrowser = new XGUI_ObjectsBrowser(aObjDock);
600 aObjDock->setWidget(myObjectBrowser);
604 //******************************************************
606 * Creates dock widgets, places them in corresponding area
607 * and tabifies if necessary.
609 void XGUI_Workshop::createDockWidgets()
611 QMainWindow* aDesktop = isSalomeMode()? salomeConnector()->desktop() :
613 QDockWidget* aObjDock = createObjectBrowser(aDesktop);
614 aDesktop->addDockWidget(Qt::LeftDockWidgetArea, aObjDock);
615 myPropertyPanel = new XGUI_PropertyPanel(aDesktop);
616 aDesktop->addDockWidget(Qt::LeftDockWidgetArea, myPropertyPanel);
617 hidePropertyPanel(); //<! Invisible by default
619 aDesktop->tabifyDockWidget(aObjDock, myPropertyPanel);
622 //******************************************************
623 void XGUI_Workshop::showPropertyPanel()
625 QAction* aViewAct = myPropertyPanel->toggleViewAction();
626 //<! Restore ability to close panel from the window's menu
627 aViewAct->setEnabled(true);
628 myPropertyPanel->show();
629 myPropertyPanel->raise();
632 //******************************************************
633 void XGUI_Workshop::hidePropertyPanel()
635 QAction* aViewAct = myPropertyPanel->toggleViewAction();
636 //<! Do not allow to show empty property panel
637 aViewAct->setEnabled(false);
638 myPropertyPanel->hide();
641 //******************************************************
642 void XGUI_Workshop::showObjectBrowser()
644 myObjectBrowser->parentWidget()->show();
647 //******************************************************
648 void XGUI_Workshop::hideObjectBrowser()
650 myObjectBrowser->parentWidget()->hide();
653 //******************************************************
654 void XGUI_Workshop::onFeatureTriggered()
656 QAction* aCmd = dynamic_cast<QAction*>(sender());
658 QString aId = salomeConnector()->commandId(aCmd);
660 myPartSetModule->launchOperation(aId);
664 //******************************************************
665 void XGUI_Workshop::changeCurrentDocument()
667 QFeatureList aFeatures = objectBrowser()->selectedFeatures();
669 // Set current document
670 if (aFeatures.size() > 0) {
671 FeaturePtr aFeature = aFeatures.first();
673 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
674 boost::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = aFeature->data()->docRef("PartDocument");
676 aMgr->setCurrentDocument(aDocRef->value());
680 //******************************************************
681 void XGUI_Workshop::salomeViewerSelectionChanged()
683 emit salomeViewerSelection();
687 //**************************************************************
688 XGUI_SalomeViewer* XGUI_Workshop::salomeViewer() const
690 return mySalomeConnector->viewer();