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_Common.h>
35 #include <Config_FeatureMessage.h>
36 #include <Config_PointerMessage.h>
38 #include <QApplication>
39 #include <QFileDialog>
40 #include <QMessageBox>
41 #include <QMdiSubWindow>
42 #include <QPushButton>
43 #include <QDockWidget>
57 QMap<QString, QString> XGUI_Workshop::myIcons;
59 QString XGUI_Workshop::featureIcon(const std::string& theId)
61 QString aId(theId.c_str());
62 if (myIcons.contains(aId))
67 XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
69 myCurrentFile(QString()),
70 myPartSetModule(NULL),
71 mySalomeConnector(theConnector),
76 myMainWindow = mySalomeConnector? 0 : new XGUI_MainWindow();
78 myDisplayer = new XGUI_Displayer(this);
80 mySelector = new XGUI_SelectionMgr(this);
81 connect(mySelector, SIGNAL(selectionChanged()), this, SLOT(changeCurrentDocument()));
83 myOperationMgr = new XGUI_OperationMgr(this);
84 myActionsMgr = new XGUI_ActionsMgr(this);
85 myErrorDlg = new XGUI_ErrorDialog(myMainWindow);
87 myViewerProxy = new XGUI_ViewerProxy(this);
89 connect(myOperationMgr, SIGNAL(operationStarted()), this, SLOT(onOperationStarted()));
90 connect(myOperationMgr, SIGNAL(operationStopped(ModuleBase_Operation*)),
91 this, SLOT(onOperationStopped(ModuleBase_Operation*)));
92 connect(this, SIGNAL(errorOccurred(const QString&)), myErrorDlg, SLOT(addError(const QString&)));
95 //******************************************************
96 XGUI_Workshop::~XGUI_Workshop(void)
100 //******************************************************
101 void XGUI_Workshop::startApplication()
104 //Initialize event listening
105 Events_Loop* aLoop = Events_Loop::loop();
106 aLoop->registerListener(this, Events_Error::errorID()); //!< Listening application errors.
107 //TODO(sbh): Implement static method to extract event id [SEID]
108 Events_ID aFeatureId = aLoop->eventByName(EVENT_FEATURE_LOADED);
109 aLoop->registerListener(this, aFeatureId);
110 Events_ID aPartSetId = aLoop->eventByName("PartSetModuleEvent");
111 aLoop->registerListener(this, aPartSetId);
112 Events_ID aFeatureUpdatedId = aLoop->eventByName(EVENT_FEATURE_UPDATED);
113 aLoop->registerListener(this, aFeatureUpdatedId);
116 myMainWindow->show();
117 updateCommandStatus();
122 //******************************************************
123 void XGUI_Workshop::initMenu()
125 if (isSalomeMode()) {
126 // Create only Undo, Redo commands
127 salomeConnector()->addEditCommand("UNDO_CMD",
128 tr("Undo"), tr("Undo last command"),
129 QIcon(":pictures/undo.png"),
130 false, this, SLOT(onUndo()),
132 salomeConnector()->addEditCommand("REDO_CMD",
133 tr("Redo"), tr("Redo last command"),
134 QIcon(":pictures/redo.png"),
135 false, this, SLOT(onRedo()),
137 salomeConnector()->addEditMenuSeparator();
140 XGUI_Workbench* aPage = myMainWindow->menuObject()->generalPage();
142 // File commands group
143 XGUI_MenuGroupPanel* aGroup = aPage->addGroup("Default");
145 XGUI_Command* aCommand;
147 aCommand = aGroup->addFeature("SAVE_CMD", tr("Save..."), tr("Save the document"),
148 QIcon(":pictures/save.png"), QKeySequence::Save);
149 aCommand->connectTo(this, SLOT(onSave()));
150 //aCommand->disable();
152 aCommand = aGroup->addFeature("UNDO_CMD", tr("Undo"), tr("Undo last command"),
153 QIcon(":pictures/undo.png"), QKeySequence::Undo);
154 aCommand->connectTo(this, SLOT(onUndo()));
156 aCommand = aGroup->addFeature("REDO_CMD", tr("Redo"), tr("Redo last command"),
157 QIcon(":pictures/redo.png"), QKeySequence::Redo);
158 aCommand->connectTo(this, SLOT(onRedo()));
160 aCommand = aGroup->addFeature("REBUILD_CMD", tr("Rebuild"), tr("Rebuild data objects"),
161 QIcon(":pictures/rebuild.png"));
163 aCommand = aGroup->addFeature("SAVEAS_CMD", tr("Save as..."), tr("Save the document into a file"),
164 QIcon(":pictures/save.png"));
165 aCommand->connectTo(this, SLOT(onSaveAs()));
166 //aCommand->disable();
168 aCommand = aGroup->addFeature("OPEN_CMD", tr("Open..."), tr("Open a new document"),
169 QIcon(":pictures/open.png"), QKeySequence::Open);
170 aCommand->connectTo(this, SLOT(onOpen()));
172 //aCommand = aGroup->addFeature("NEW_CMD", tr("New"), tr("Create a new document"),
173 // QIcon(":pictures/new.png"), QKeySequence::New);
174 //aCommand->connectTo(this, SLOT(onNew()));
176 aCommand = aGroup->addFeature("EXIT_CMD", tr("Exit"), tr("Exit application"),
177 QIcon(":pictures/close.png"), QKeySequence::Close);
178 aCommand->connectTo(this, SLOT(onExit()));
182 //******************************************************
183 XGUI_Workbench* XGUI_Workshop::addWorkbench(const QString& theName)
185 XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
186 return aMenuBar->addWorkbench(theName);
189 //******************************************************
190 void XGUI_Workshop::processEvent(const Events_Message* theMessage)
192 //A message to start feature creation received.
193 static Events_ID aFeatureLoadedId = Events_Loop::loop()->eventByName(EVENT_FEATURE_LOADED);
194 if (theMessage->eventID() == aFeatureLoadedId) {
195 const Config_FeatureMessage* aFeatureMsg = dynamic_cast<const Config_FeatureMessage*>(theMessage);
196 addFeature(aFeatureMsg);
199 //Update property panel on corresponding message. If there is no current operation (no
200 //property panel), or received message has different feature to the current - do nothing.
201 static Events_ID aFeatureUpdatedId = Events_Loop::loop()->eventByName(EVENT_FEATURE_UPDATED);
202 if (theMessage->eventID() == aFeatureUpdatedId && myOperationMgr->hasOperation())
204 const Model_FeatureUpdatedMessage* anUpdateMsg =
205 dynamic_cast<const Model_FeatureUpdatedMessage*>(theMessage);
206 boost::shared_ptr<ModelAPI_Feature> aNewFeature = anUpdateMsg->feature();
207 boost::shared_ptr<ModelAPI_Feature> aCurrentFeature = myOperationMgr->currentOperation()->feature();
208 if(aNewFeature == aCurrentFeature) {
209 myPropertyPanel->updateContentWidget(aCurrentFeature);
212 //An operation passed by message. Start it, process and commit.
213 const Config_PointerMessage* aPartSetMsg = dynamic_cast<const Config_PointerMessage*>(theMessage);
215 ModuleBase_Operation* anOperation =
216 (ModuleBase_Operation*)(aPartSetMsg->pointer());
218 if (myOperationMgr->startOperation(anOperation)) {
219 myPropertyPanel->updateContentWidget(anOperation->feature());
220 if (anOperation->getDescription()->xmlRepresentation().isEmpty()) {
221 anOperation->commit();
222 updateCommandStatus();
227 //Show error dialog if error message received.
228 const Events_Error* anAppError = dynamic_cast<const Events_Error*>(theMessage);
230 emit errorOccurred(QString::fromLatin1(anAppError->description()));
233 myErrorDlg->activateWindow();
238 //******************************************************
239 void XGUI_Workshop::onOperationStarted()
241 ModuleBase_Operation* aOperation = myOperationMgr->currentOperation();
243 if(!aOperation->getDescription()->xmlRepresentation().isEmpty()) { //!< No need for property panel
244 connectWithOperation(aOperation);
248 ModuleBase_WidgetFactory aFactory = ModuleBase_WidgetFactory(aOperation);
249 QWidget* aContent = myPropertyPanel->contentWidget();
250 qDeleteAll(aContent->children());
251 aFactory.createWidget(aContent);
252 myPropertyPanel->setModelWidgets(aFactory.getModelWidgets());
253 myPropertyPanel->setWindowTitle(aOperation->getDescription()->description());
257 //******************************************************
258 void XGUI_Workshop::onOperationStopped(ModuleBase_Operation* theOperation)
260 ModuleBase_Operation* aOperation = myOperationMgr->currentOperation();
262 //!< No need for property panel
263 updateCommandStatus();
265 if(myOperationMgr->operationsCount() > 1) {
266 myActionsMgr->updateAction(theOperation->getDescription()->operationId());
269 if(!aOperation->getDescription()->xmlRepresentation().isEmpty()) {
270 myActionsMgr->restoreCommandState();
277 void XGUI_Workshop::addFeature(const Config_FeatureMessage* theMessage)
281 qDebug() << "XGUI_Workshop::addFeature: NULL message.";
285 // Remember features icons
286 myIcons[QString(theMessage->id().c_str())] = QString(theMessage->icon().c_str());
288 //Find or create Workbench
289 QString aWchName = QString::fromStdString(theMessage->workbenchId());
290 QString aNestedFeatures = QString::fromStdString(theMessage->nestedFeatures());
291 bool isUsePropPanel = theMessage->isUseInput();
292 if (isSalomeMode()) {
293 QString aId = QString::fromStdString(theMessage->id());
294 salomeConnector()->addFeature(aWchName,
295 QString::fromStdString(theMessage->id()),
297 QString::fromStdString(theMessage->tooltip()),
298 QIcon(theMessage->icon().c_str()),
299 isUsePropPanel, this,
300 SLOT(onFeatureTriggered()), QKeySequence());
301 myActionsMgr->addCommand(aId, salomeConnector()->command(aId));
302 salomeConnector()->setNestedActions(aId, aNestedFeatures.split(" "));
306 XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
307 XGUI_Workbench* aPage = aMenuBar->findWorkbench(aWchName);
309 aPage = addWorkbench(aWchName);
311 //Find or create Group
312 QString aGroupName = QString::fromStdString(theMessage->groupId());
313 XGUI_MenuGroupPanel* aGroup = aPage->findGroup(aGroupName);
315 aGroup = aPage->addGroup(aGroupName);
318 XGUI_Command* aCommand = aGroup->addFeature(QString::fromStdString(theMessage->id()),
319 QString::fromStdString(theMessage->text()),
320 QString::fromStdString(theMessage->tooltip()),
321 QIcon(theMessage->icon().c_str()),
322 QKeySequence(), isUsePropPanel);
323 aCommand->setUnblockableCommands(aNestedFeatures.split(" "));
324 myActionsMgr->addCommand(aCommand);
325 myPartSetModule->featureCreated(aCommand);
330 * Makes a signal/slot connections between Property Panel
331 * and given operation. The given operation becomes a
332 * current operation and previous operation if exists
334 void XGUI_Workshop::connectWithOperation(ModuleBase_Operation* theOperation)
336 QPushButton* aOkBtn = myPropertyPanel->findChild<QPushButton*>(XGUI::PROP_PANEL_OK);
337 connect(aOkBtn, SIGNAL(clicked()), theOperation, SLOT(commit()));
338 QPushButton* aCancelBtn = myPropertyPanel->findChild<QPushButton*>(XGUI::PROP_PANEL_CANCEL);
339 connect(aCancelBtn, SIGNAL(clicked()), theOperation, SLOT(abort()));
341 QAction* aCommand = 0;
342 if (isSalomeMode()) {
343 aCommand = salomeConnector()->command(theOperation->getDescription()->operationId());
345 XGUI_MainMenu* aMenu = myMainWindow->menuObject();
346 aCommand = aMenu->feature(theOperation->getDescription()->operationId());
348 //Abort operation on uncheck the command
349 connect(aCommand, SIGNAL(triggered(bool)), theOperation, SLOT(setRunning(bool)));
353 * Saves document with given name.
355 void XGUI_Workshop::saveDocument(QString theName)
357 QApplication::restoreOverrideCursor();
358 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
359 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
360 aDoc->save(theName.toLatin1().constData());
361 QApplication::restoreOverrideCursor();
364 //******************************************************
365 void XGUI_Workshop::onExit()
367 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
368 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
369 if(aDoc->isModified()) {
370 int anAnswer = QMessageBox::question(
371 myMainWindow, tr("Save current file"),
372 tr("The document is modified, save before exit?"),
373 QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Cancel);
374 if(anAnswer == QMessageBox::Save) {
376 } else if (anAnswer == QMessageBox::Cancel) {
383 //******************************************************
384 void XGUI_Workshop::onNew()
386 QApplication::setOverrideCursor(Qt::WaitCursor);
387 if (objectBrowser() == 0) {
389 mySelector->connectViewers();
391 myViewerProxy->connectToViewer();
393 if (!isSalomeMode()) {
394 myMainWindow->showPythonConsole();
395 QMdiSubWindow* aWnd = myMainWindow->viewer()->createView();
396 aWnd->showMaximized();
397 updateCommandStatus();
399 QApplication::restoreOverrideCursor();
402 //******************************************************
403 void XGUI_Workshop::onOpen()
405 //save current file before close if modified
406 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
407 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
408 if(aDoc->isModified()) {
409 //TODO(sbh): re-launch the app?
410 int anAnswer = QMessageBox::question(
411 myMainWindow, tr("Save current file"),
412 tr("The document is modified, save before opening another?"),
413 QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Cancel);
414 if(anAnswer == QMessageBox::Save) {
416 } else if (anAnswer == QMessageBox::Cancel) {
423 //show file dialog, check if readable and open
424 myCurrentFile = QFileDialog::getOpenFileName(mainWindow());
425 if(myCurrentFile.isEmpty())
427 QFileInfo aFileInfo(myCurrentFile);
428 if(!aFileInfo.exists() || !aFileInfo.isReadable()) {
429 QMessageBox::critical(myMainWindow, tr("Warning"), tr("Unable to open the file."));
433 QApplication::setOverrideCursor(Qt::WaitCursor);
434 aDoc->load(myCurrentFile.toLatin1().constData());
435 QApplication::restoreOverrideCursor();
436 updateCommandStatus();
439 //******************************************************
440 void XGUI_Workshop::onSave()
442 if(myCurrentFile.isEmpty()) {
446 saveDocument(myCurrentFile);
447 updateCommandStatus();
450 //******************************************************
451 void XGUI_Workshop::onSaveAs()
453 QString aTemp = myCurrentFile;
454 myCurrentFile = QFileDialog::getSaveFileName(mainWindow());
455 if(myCurrentFile.isEmpty()) {
456 myCurrentFile = aTemp;
459 QFileInfo aFileInfo(myCurrentFile);
460 if(aFileInfo.exists() && !aFileInfo.isWritable()) {
461 QMessageBox::critical(myMainWindow, tr("Warning"), tr("Unable to save the file."));
467 //******************************************************
468 void XGUI_Workshop::onUndo()
470 objectBrowser()->setCurrentIndex(QModelIndex());
471 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
472 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
474 updateCommandStatus();
477 //******************************************************
478 void XGUI_Workshop::onRedo()
480 objectBrowser()->setCurrentIndex(QModelIndex());
481 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
482 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
484 updateCommandStatus();
487 //******************************************************
488 XGUI_Module* XGUI_Workshop::loadModule(const QString& theModule)
491 QString::fromStdString(library(theModule.toStdString()));
492 if (libName.isEmpty()) {
494 qPrintable( tr( "Information about module \"%1\" doesn't exist." ).arg( theModule ) ));
499 CREATE_FUNC crtInst = 0;
503 HINSTANCE modLib = ::LoadLibrary((LPTSTR) qPrintable(libName));
507 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
508 0, ::GetLastError(), 0, (LPTSTR) & lpMsgBuf, 0, 0);
509 QString aMsg((char*) &lpMsgBuf);
510 err = QString("Failed to load %1. %2").arg(libName).arg(aMsg);
511 ::LocalFree(lpMsgBuf);
513 crtInst = (CREATE_FUNC) ::GetProcAddress(modLib, CREATE_MODULE);
517 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM
518 | FORMAT_MESSAGE_IGNORE_INSERTS,
519 0, ::GetLastError(), 0, (LPTSTR) & lpMsgBuf, 0, 0);
520 QString aMsg((char*) &lpMsgBuf);
521 err = QString("Failed to find %1 function. %2").arg( CREATE_MODULE).arg(aMsg);
522 ::LocalFree(lpMsgBuf);
526 void* modLib = dlopen( libName.toLatin1(), RTLD_LAZY );
528 err = QString( "Can not load library %1. %2" ).arg( libName ).arg( dlerror() );
531 crtInst = (CREATE_FUNC)dlsym( modLib, CREATE_MODULE );
533 err = QString( "Failed to find function %1. %2" ).arg( CREATE_MODULE ).arg( dlerror() );
537 XGUI_Module* aModule = crtInst ? crtInst(this) : 0;
539 if (!err.isEmpty()) {
540 if (mainWindow() && mainWindow()->isVisible())
541 QMessageBox::warning(mainWindow(), tr("Error"), err);
543 qWarning( qPrintable( err ));
548 //******************************************************
549 bool XGUI_Workshop::activateModule()
551 myPartSetModule = loadModule("PartSet");
552 if (!myPartSetModule)
554 myPartSetModule->createFeatures();
558 //******************************************************
559 void XGUI_Workshop::updateCommandStatus()
561 if (isSalomeMode()) // TODO: update commands in SALOME
563 XGUI_MainMenu* aMenuBar = myMainWindow->menuObject();
565 QList<XGUI_Command*> aCommands = aMenuBar->features();
566 QList<XGUI_Command*>::const_iterator aIt;
568 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
569 if (aMgr->hasRootDocument()) {
570 XGUI_Command* aUndoCmd;
571 XGUI_Command* aRedoCmd;
572 for (aIt = aCommands.constBegin(); aIt != aCommands.constEnd(); ++aIt) {
573 if ((*aIt)->id() == "UNDO_CMD")
575 else if ((*aIt)->id() == "REDO_CMD")
577 else // Enable all commands
580 boost::shared_ptr<ModelAPI_Document> aDoc = aMgr->rootDocument();
581 aUndoCmd->setEnabled(aDoc->canUndo());
582 aRedoCmd->setEnabled(aDoc->canRedo());
584 for (aIt = aCommands.constBegin(); aIt != aCommands.constEnd(); ++aIt) {
585 if ((*aIt)->id() == "NEW_CMD")
587 else if ((*aIt)->id() == "EXIT_CMD")
595 //******************************************************
596 QDockWidget* XGUI_Workshop::createObjectBrowser(QWidget* theParent)
598 QDockWidget* aObjDock = new QDockWidget(theParent);
599 aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
600 aObjDock->setWindowTitle(tr("Object browser"));
601 myObjectBrowser = new XGUI_ObjectsBrowser(aObjDock);
602 aObjDock->setWidget(myObjectBrowser);
606 //******************************************************
608 * Creates dock widgets, places them in corresponding area
609 * and tabifies if necessary.
611 void XGUI_Workshop::createDockWidgets()
613 QMainWindow* aDesktop = isSalomeMode()? salomeConnector()->desktop() :
615 QDockWidget* aObjDock = createObjectBrowser(aDesktop);
616 aDesktop->addDockWidget(Qt::LeftDockWidgetArea, aObjDock);
617 myPropertyPanel = new XGUI_PropertyPanel(aDesktop);
618 aDesktop->addDockWidget(Qt::LeftDockWidgetArea, myPropertyPanel);
619 hidePropertyPanel(); //<! Invisible by default
621 aDesktop->tabifyDockWidget(aObjDock, myPropertyPanel);
624 //******************************************************
625 void XGUI_Workshop::showPropertyPanel()
627 QAction* aViewAct = myPropertyPanel->toggleViewAction();
628 //<! Restore ability to close panel from the window's menu
629 aViewAct->setEnabled(true);
630 myPropertyPanel->show();
631 myPropertyPanel->raise();
634 //******************************************************
635 void XGUI_Workshop::hidePropertyPanel()
637 QAction* aViewAct = myPropertyPanel->toggleViewAction();
638 //<! Do not allow to show empty property panel
639 aViewAct->setEnabled(false);
640 myPropertyPanel->hide();
643 //******************************************************
644 void XGUI_Workshop::showObjectBrowser()
646 myObjectBrowser->parentWidget()->show();
649 //******************************************************
650 void XGUI_Workshop::hideObjectBrowser()
652 myObjectBrowser->parentWidget()->hide();
655 //******************************************************
656 void XGUI_Workshop::onFeatureTriggered()
658 QAction* aCmd = dynamic_cast<QAction*>(sender());
660 QString aId = salomeConnector()->commandId(aCmd);
662 myPartSetModule->launchOperation(aId);
666 //******************************************************
667 void XGUI_Workshop::changeCurrentDocument()
669 QFeatureList aFeatures = objectBrowser()->selectedFeatures();
671 // Set current document
672 if (aFeatures.size() > 0) {
673 FeaturePtr aFeature = aFeatures.first();
675 boost::shared_ptr<ModelAPI_PluginManager> aMgr = ModelAPI_PluginManager::get();
676 boost::shared_ptr<ModelAPI_AttributeDocRef> aDocRef = aFeature->data()->docRef("PartDocument");
678 aMgr->setCurrentDocument(aDocRef->value());
682 //******************************************************
683 void XGUI_Workshop::salomeViewerSelectionChanged()
685 emit salomeViewerSelection();
689 //**************************************************************
690 XGUI_SalomeViewer* XGUI_Workshop::salomeViewer() const
692 return mySalomeConnector->viewer();