1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #include "SHAPERGUI.h"
22 #include "SHAPERGUI_DataModel.h"
23 #include "SHAPERGUI_OCCSelector.h"
24 #include <SHAPERGUI_NestedButton.h>
26 #include <XGUI_Workshop.h>
27 #include <XGUI_PropertyPanel.h>
28 #include <XGUI_ContextMenuMgr.h>
29 #include <XGUI_ObjectsBrowser.h>
30 #include <XGUI_OperationMgr.h>
31 #include <XGUI_Displayer.h>
32 #include <XGUI_MenuMgr.h>
33 #include <XGUI_FacesPanel.h>
34 #include <XGUI_SelectionActivate.h>
36 #include <ModuleBase_Operation.h>
37 #include <ModuleBase_Preferences.h>
38 #include <ModuleBase_ActionInfo.h>
39 #include <ModuleBase_IModule.h>
41 #include <LightApp_Application.h>
42 #include <LightApp_SelectionMgr.h>
43 #include <LightApp_OCCSelector.h>
44 #include <LightApp_Study.h>
45 #include <OCCViewer_ViewModel.h>
47 #include <SUIT_Selector.h>
48 #include <SUIT_Desktop.h>
49 #include <SUIT_ViewManager.h>
50 #include <SUIT_ResourceMgr.h>
51 #include <SUIT_DataBrowser.h>
53 #include <QtxPopupMgr.h>
54 #include <QtxActionMenuMgr.h>
55 #include <QtxActionToolMgr.h>
56 #include <QtxResourceMgr.h>
58 #include <Config_PropManager.h>
59 #include <Config_ModuleReader.h>
61 #include <AIS_ListOfInteractive.hxx>
62 #include <AIS_ListIteratorOfListOfInteractive.hxx>
64 #include <QDockWidget>
69 #define SALOME_PATCH_FOR_CTRL_WHEEL
72 SHAPERGUI_EXPORT CAM_Module* createModule()
74 return new SHAPERGUI();
77 SHAPERGUI_EXPORT char* getModuleVersion()
84 * Class for preferences management
86 class SHAPERGUI_PrefMgr: public ModuleBase_IPrefMgr
90 /// \param theMgr preferences manager of SALOME
91 /// \param theModName name of the module
92 SHAPERGUI_PrefMgr(LightApp_Preferences* theMgr, const QString& theModName):
93 myMgr(theMgr), myModName(theModName) {}
95 virtual int addPreference(const QString& theLbl, int pId,
96 SUIT_PreferenceMgr::PrefItemType theType,
97 const QString& theSection, const QString& theName )
99 return myMgr->addPreference(myModName, theLbl, pId, theType, theSection, theName);
102 virtual void setItemProperty(const QString& thePropName,
103 const QVariant& theValue,
104 const int theId = -1)
106 myMgr->setItemProperty(thePropName, theValue, theId);
110 virtual SUIT_PreferenceMgr* prefMgr() const { return myMgr; }
113 LightApp_Preferences* myMgr;
120 //******************************************************
121 SHAPERGUI::SHAPERGUI()
122 : LightApp_Module("SHAPER"),
123 mySelector(0), myIsOpened(0), myPopupMgr(0)
125 myWorkshop = new XGUI_Workshop(this);
126 connect(myWorkshop, SIGNAL(commandStatusUpdated()),
127 this, SLOT(onUpdateCommandStatus()));
129 myProxyViewer = new SHAPERGUI_SalomeViewer(this);
131 ModuleBase_Preferences::setResourceMgr(application()->resourceMgr());
132 ModuleBase_Preferences::loadCustomProps();
135 //******************************************************
136 SHAPERGUI::~SHAPERGUI()
140 //******************************************************
141 void SHAPERGUI::initialize(CAM_Application* theApp)
143 LightApp_Module::initialize(theApp);
145 myWorkshop->startApplication();
146 LightApp_Application* anApp = dynamic_cast<LightApp_Application*>(theApp);
149 connect(anApp, SIGNAL(preferenceResetToDefaults()), this, SLOT(onDefaultPreferences()));
153 //******************************************************
154 void SHAPERGUI::windows(QMap<int, int>& theWndMap) const
156 theWndMap.insert(LightApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea);
159 //******************************************************
160 void SHAPERGUI::viewManagers(QStringList& theList) const
162 theList.append(OCCViewer_Viewer::Type());
165 //******************************************************
166 // We can not create selector in this method because it can be called when
167 // SHAPER module is not active. Take into account that creation of our selector
168 // leads to switching OFF all other selectors
169 //void SHAPERGUI::connectToStudy(CAM_Study* theStudy)
171 // // if there are created viewer managers, we should try to create viewer
172 // // selector and initialize viewer with it. It sets interactive contect to the
173 // // proxy viewer. If study is opened, CAM application calls this method before the open()
175 // // the SHAPER data model is specific and during open(load) redisplay signals are flushed, so
176 // // we need to connect to the viewer before it. Here,
177 // // it seems the most appropriate place for this
178 // // according to SALOME architecture.
179 // if (!mySelector) {
180 // ViewManagerList OCCViewManagers;
181 // application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers);
182 // if (OCCViewManagers.size() > 0) {
183 // mySelector = createSelector(OCCViewManagers.first());
186 // LightApp_Module::connectToStudy(theStudy);
189 //******************************************************
190 bool SHAPERGUI::activateModule(SUIT_Study* theStudy)
192 bool isDone = LightApp_Module::activateModule(theStudy);
193 SHAPERGUI_DataModel* aDataModel = dynamic_cast<SHAPERGUI_DataModel*>(dataModel());
194 aDataModel->initRootObject();
200 QObject* aObj = myWorkshop->objectBrowser()->parent();
201 QDockWidget* aObjDoc = dynamic_cast<QDockWidget*>(aObj);
203 QAction* aViewAct = aObjDoc->toggleViewAction();
204 aViewAct->setEnabled(true);
205 myWorkshop->objectBrowser()->setVisible(true);
206 aObjDoc->setVisible(true);
207 desktop()->tabifyDockWidget(aObjDoc, myWorkshop->propertyPanel());
211 ViewManagerList OCCViewManagers;
212 application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers);
213 if (OCCViewManagers.size() > 0) {
214 mySelector = createSelector(OCCViewManagers.first());
217 // it should be pefromed after the selector creation in order to have AISContext
218 myWorkshop->activateModule();
219 //action(myEraseAll)->setEnabled(false);
222 myWorkshop->objectBrowser()->rebuildDataTree();
223 myWorkshop->updateCommandStatus();
227 myWorkshop->updateCommandStatus();
229 SUIT_ResourceMgr* aResMgr = application()->resourceMgr();
230 myIsStorePositions = aResMgr->booleanValue("Study", "store_positions", true);
231 myIsEditEnabled = getApp()->isEditEnabled();
232 getApp()->setEditEnabled(false);
234 // this following row is caused by #187 bug.
235 // SALOME saves the dock widget positions before deactivateModule() and
236 // load it after the module activation. So, if the panel is visible before
237 // deactivate, it becomes visible after activate.
238 // In order to avoid the visible property panel, the widget position save is
239 // switch off in this module
240 aResMgr->setValue("Study", "store_positions", false);
242 // Synchronize displayed objects
243 Handle(AIS_InteractiveContext) aContext;
244 if (mySelector && mySelector->viewer())
245 aContext = mySelector->viewer()->getAISContext();
247 if (!aContext.IsNull()) {
248 XGUI_Displayer* aDisp = myWorkshop->displayer();
249 QObjectPtrList aObjList = aDisp->displayedObjects();
251 AIS_ListOfInteractive aList;
252 aContext->DisplayedObjects(aList);
253 AIS_ListIteratorOfListOfInteractive aLIt;
254 Handle(AIS_InteractiveObject) anAISIO;
255 foreach (ObjectPtr aObj, aObjList) {
256 AISObjectPtr aPrs = aDisp->getAISObject(aObj);
257 Handle(AIS_InteractiveObject) aAIS = aPrs->impl<Handle(AIS_InteractiveObject)>();
259 for (aLIt.Initialize(aList); aLIt.More(); aLIt.Next()) {
260 anAISIO = aLIt.Value();
261 if (anAISIO.get() == aAIS.get()) {
267 aObj->setDisplayed(false);
268 //aDisp->erase(aObj, false);
271 Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
273 myProxyViewer->activateViewer(true);
275 // Postrrocessing for LoadScriptId to remove created(if it was created) SALOME Object Browser
276 connect(getApp()->action(LightApp_Application::UserID+1), SIGNAL(triggered(bool)),
277 this, SLOT(onScriptLoaded()));
279 disconnect(getApp()->action(LightApp_Application::FileSaveId), SIGNAL(triggered(bool)),
280 getApp(), SLOT(onSaveDoc()));
281 disconnect(getApp()->action(LightApp_Application::FileSaveAsId), SIGNAL(triggered(bool)),
282 getApp(), SLOT(onSaveAsDoc()));
284 connect(getApp()->action(LightApp_Application::FileSaveId), SIGNAL(triggered(bool)),
285 this, SLOT(onSaveDocByShaper()));
286 connect(getApp()->action(LightApp_Application::FileSaveAsId), SIGNAL(triggered(bool)),
287 this, SLOT(onSaveAsDocByShaper()));
292 //******************************************************
293 bool SHAPERGUI::deactivateModule(SUIT_Study* theStudy)
295 myProxyViewer->activateViewer(false);
299 myWorkshop->deactivateModule();
301 QObject* aObj = myWorkshop->objectBrowser()->parent();
302 QDockWidget* aObjDoc = dynamic_cast<QDockWidget*>(aObj);
304 aObjDoc->setVisible(false);
305 myWorkshop->objectBrowser()->setVisible(false);
306 QAction* aViewAct = aObjDoc->toggleViewAction();
307 aViewAct->setEnabled(false);
310 // the active operation should be stopped for the next activation.
311 // There should not be active operation and visualized preview.
312 // Abort operation should be performed before the selection's remove
313 // because the displayed objects should be removed from the viewer, but
314 // the AIS context is obtained from the selector.
315 ModuleBase_Operation* anOperation = myWorkshop->operationMgr()->currentOperation();
316 while (anOperation) {
317 anOperation->abort();
318 anOperation = myWorkshop->operationMgr()->currentOperation();
320 // Delete selector because it has to be redefined on next activation
322 myProxyViewer->setSelector(0);
327 myWorkshop->hidePanel(myWorkshop->facesPanel());
328 //myWorkshop->contextMenuMgr()->disconnectViewer();
330 SUIT_ResourceMgr* aResMgr = application()->resourceMgr();
331 aResMgr->setValue("Study", "store_positions", myIsStorePositions);
332 getApp()->setEditEnabled(myIsEditEnabled);
334 // Postrrocessing for LoadScriptId to remove created(if it was created) SALOME Object Browser
335 disconnect(getApp()->action(LightApp_Application::UserID+1), SIGNAL(triggered(bool)),
336 this, SLOT(onScriptLoaded()));
338 disconnect(getApp()->action(LightApp_Application::FileSaveId), SIGNAL(triggered(bool)),
339 this, SLOT(onSaveDocByShaper()));
340 disconnect(getApp()->action(LightApp_Application::FileSaveAsId), SIGNAL(triggered(bool)),
341 this, SLOT(onSaveAsDocByShaper()));
343 connect(getApp()->action(LightApp_Application::FileSaveId), SIGNAL(triggered(bool)),
344 getApp(), SLOT(onSaveDoc()));
345 connect(getApp()->action(LightApp_Application::FileSaveAsId), SIGNAL(triggered(bool)),
346 getApp(), SLOT(onSaveAsDoc()));
349 return LightApp_Module::deactivateModule(theStudy);
352 //******************************************************
353 void SHAPERGUI::onViewManagerAdded(SUIT_ViewManager* theMgr)
356 mySelector = createSelector(theMgr);
357 myWorkshop->selectionActivate()->updateSelectionFilters();
358 myWorkshop->selectionActivate()->updateSelectionModes();
359 myWorkshop->synchronizeViewer();
363 //******************************************************
364 void SHAPERGUI::onViewManagerRemoved(SUIT_ViewManager* theMgr)
367 if (theMgr->getType() == OCCViewer_Viewer::Type()) {
368 OCCViewer_Viewer* aViewer = static_cast<OCCViewer_Viewer*>(theMgr->getViewModel());
369 if (mySelector->viewer() == aViewer) {
370 XGUI_Displayer* aDisp = myWorkshop->displayer();
371 QObjectPtrList aObjects = aDisp->displayedObjects();
372 foreach(ObjectPtr aObj, aObjects)
373 aObj->setDisplayed(false);
374 Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
375 myProxyViewer->setSelector(0);
379 myWorkshop->module()->clearViewer();
385 //******************************************************
386 QtxPopupMgr* SHAPERGUI::popupMgr()
389 myPopupMgr = new QtxPopupMgr( 0, this );
393 //******************************************************
394 void SHAPERGUI::onDefaultPreferences()
396 // reset main resources
397 ModuleBase_Preferences::resetResourcePreferences(preferences());
398 // reset plugin's resources
399 ModuleBase_Preferences::resetConfigPropPreferences(preferences());
401 myWorkshop->displayer()->redisplayObjects();
404 //******************************************************
405 void SHAPERGUI::onScriptLoaded()
407 // this slot is called after processing of the LoadScriptId action of SalomeApp Application
408 // Each dumped script contains updateObjBrowser() that creates a new instance of Object
409 // Browser. When SHAPER module is active, this browser should not be used. It might be removed
410 // as hidden by means of updateWindows() of SalomeApp_Application or to remove
411 // it manually (because this method of application is protected)
412 SUIT_DataBrowser* aBrowser = getApp()->objectBrowser();
417 //******************************************************
418 void SHAPERGUI::onSaveDocByShaper()
420 if(!workshop()->operationMgr()->abortAllOperations(XGUI_OperationMgr::XGUI_InformationMessage))
423 getApp()->onSaveDoc();
426 //******************************************************
427 void SHAPERGUI::onSaveAsDocByShaper()
429 if(!workshop()->operationMgr()->abortAllOperations(XGUI_OperationMgr::XGUI_InformationMessage))
432 getApp()->onSaveAsDoc();
435 //******************************************************
436 void SHAPERGUI::onUpdateCommandStatus()
438 getApp()->updateActions();
441 //******************************************************
442 SHAPERGUI_OCCSelector* SHAPERGUI::createSelector(SUIT_ViewManager* theMgr)
444 if (theMgr->getType() == OCCViewer_Viewer::Type()) {
445 OCCViewer_Viewer* aViewer = static_cast<OCCViewer_Viewer*>(theMgr->getViewModel());
446 SHAPERGUI_OCCSelector* aSelector = new SHAPERGUI_OCCSelector(aViewer,
447 getApp()->selectionMgr());
448 #ifdef SALOME_PATCH_FOR_CTRL_WHEEL
449 aViewer->setUseLocalSelection(true);
451 LightApp_SelectionMgr* aMgr = getApp()->selectionMgr();
452 QList<SUIT_Selector*> aList;
453 aMgr->selectors(aList);
454 foreach(SUIT_Selector* aSel, aList)
456 aSel->setEnabled(aSel == aSelector);
458 myProxyViewer->setSelector(aSelector);
464 //******************************************************
465 CAM_DataModel* SHAPERGUI::createDataModel()
467 return new SHAPERGUI_DataModel(this);
470 QAction* SHAPERGUI::addFeature(const QString& theWBName, const ActionInfo& theInfo,
471 const bool isAddSeparator)
473 return addFeature(theWBName,
477 //Issue #650: in the SALOME mode the tooltip should be same as text
486 //******************************************************
487 QAction* SHAPERGUI::addFeature(const QString& theWBName, const QString& theTBName,
488 const QString& theId, const QString& theTitle, const QString& theTip,
489 const QIcon& theIcon, const QKeySequence& theKeys,
490 bool isCheckable, const bool isAddSeparator,
491 const QString& theStatusTip)
493 static QString aLastTool = "";
495 if (aLastTool.isEmpty())
496 aLastTool = theWBName;
497 else if (theWBName != aLastTool) {
498 aLastTool = theWBName;
500 desktop()->addToolBarBreak();
506 int aId = myActionsList.size();
507 myActionsList.append(theId);
508 SUIT_Desktop* aDesk = application()->desktop();
510 for (int i = 0; i < theKeys.count(); i++)
512 QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
514 aAction->setStatusTip(theStatusTip);
516 aAction->setData(theId);
518 int aWBMenu = createMenu(theWBName, -1, -1, 30/*10-Window, 1000 - Help*/);
519 int aItemId = createMenu(aId, aWBMenu);
521 createMenu(separator(), aWBMenu);
523 int aWBTool = createTool(theTBName, theTBName);
524 int aToolId = createTool(aId, aWBTool);
526 createTool(separator(), aWBTool);
531 bool SHAPERGUI::isFeatureOfNested(const QAction* theAction)
533 return dynamic_cast<const SHAPERGUI_NestedButton*>(theAction);
536 QAction* SHAPERGUI::addFeatureOfNested(const QString& theWBName,
537 const ActionInfo& theInfo,
538 const QList<QAction*>& theNestedActions)
540 myActionsList.append(theInfo.id);
541 SUIT_Desktop* aDesk = application()->desktop();
542 SHAPERGUI_NestedButton* anAction = new SHAPERGUI_NestedButton(aDesk, theNestedActions);
543 anAction->setData(theInfo.id);
544 anAction->setCheckable(theInfo.checkable);
545 anAction->setChecked(theInfo.checked);
546 anAction->setEnabled(theInfo.enabled);
547 anAction->setVisible(theInfo.visible);
548 anAction->setIcon(theInfo.icon);
549 anAction->setText(theInfo.text);
550 anAction->setToolTip(theInfo.toolTip);
551 anAction->setShortcut(theInfo.shortcut);
552 anAction->setFont(theInfo.font);
554 int aWBMenu = createMenu(theWBName, -1, -1, 30);
555 int aItemId = createMenu(anAction, aWBMenu);
556 createMenu(separator(), aWBMenu); /// nested action is always separated of others
558 int aWBTool = createTool(theWBName, theWBName);
559 int aToolId = createTool(anAction, aWBTool);
560 createTool(separator(), aWBTool); /// nested action is always separated of others
566 //******************************************************
567 QAction* SHAPERGUI::addDesktopCommand(const QString& theId, const QString& theTitle,
568 const QString& theTip, const QIcon& theIcon,
569 const QKeySequence& theKeys, bool isCheckable,
570 const char* theMenuSourceText, const int theMenuPosition)
572 int aMenu = createMenu(tr(theMenuSourceText), -1, -1);
574 int aId = myActionsList.size();
575 myActionsList.append(theId);
576 SUIT_Desktop* aDesk = application()->desktop();
578 for (int i = 0; i < theKeys.count(); i++)
580 QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
582 aAction->setStatusTip(theTip);
583 aAction->setData(theId);
584 createMenu(aId, aMenu, theMenuPosition);
588 //******************************************************
589 void SHAPERGUI::addDesktopMenuSeparator(const char* theMenuSourceText, const int theMenuPosition)
591 int aMenu = createMenu(tr(theMenuSourceText), -1, -1);
592 createMenu(separator(), aMenu, -1, theMenuPosition);
595 bool SHAPERGUI::addActionInToolbar( QAction* theAction, const QString& theToolBarTitle )
600 SUIT_Desktop* aDesktop = application()->desktop();
604 QtxActionToolMgr* aToolMgr = aDesktop->toolMgr();
608 aToolMgr->append( theAction, theToolBarTitle );
612 //******************************************************
613 QList<QAction*> SHAPERGUI::commandList() const
615 QList<QAction*> aActions;
616 for (int i = 0; i < myActionsList.size(); i++) {
617 QAction* aCmd = action(i);
618 if (aCmd && myActionsList.contains(aCmd->data().toString()))
619 aActions.append(aCmd);
625 //******************************************************
626 QMainWindow* SHAPERGUI::desktop() const
628 return application()->desktop();
631 void SHAPERGUI::setFeatureInfo(const QString& theFeatureId,
632 const std::shared_ptr<Config_FeatureMessage>& theMessage)
634 myFeaturesInfo.insert(theFeatureId, theMessage);
637 std::shared_ptr<Config_FeatureMessage> SHAPERGUI::featureInfo(const QString& theFeatureId)
639 std::shared_ptr<Config_FeatureMessage> aMessage;
640 if (myFeaturesInfo.contains(theFeatureId))
641 aMessage = myFeaturesInfo[theFeatureId];
645 //******************************************************
646 void SHAPERGUI::selectionChanged()
648 LightApp_Module::selectionChanged();
649 myWorkshop->salomeViewerSelectionChanged();
652 //******************************************************
653 void SHAPERGUI::contextMenuPopup(const QString& theClient, QMenu* theMenu, QString& theTitle)
655 myWorkshop->contextMenuMgr()->updateViewerMenu();
656 myWorkshop->contextMenuMgr()->addViewerMenu(theMenu);
657 LightApp_Module::contextMenuPopup(theClient, theMenu, theTitle);
661 //******************************************************
662 void SHAPERGUI::createPreferences()
664 LightApp_Preferences* pref = preferences();
667 ModuleBase_Preferences::updateConfigByResources();
668 QString aModName = moduleName();
670 QtxPreferenceItem* item = pref->findItem(aModName, true );
671 if ( item && (!item->isEmpty() )) {
672 item->parentItem()->removeItem(item);
676 int catId = pref->addPreference(aModName, -1 );
679 SHAPERGUI_PrefMgr aMgr(pref, aModName);
680 ModuleBase_Preferences::createEditContent(&aMgr, catId);
682 int viewTab = pref->addItem(tr("Viewer"), catId);
683 // Create other parameters group in viewer tab
684 int otherGroup = pref->addItem(tr("Default selection"), viewTab);
685 pref->setItemProperty("columns", 3, otherGroup);
686 pref->addItem(tr("Faces"), otherGroup,
687 SUIT_PreferenceMgr::Bool,
688 ModuleBase_Preferences::VIEWER_SECTION, "face-selection");
689 pref->addItem(tr("Edges"), otherGroup,
690 SUIT_PreferenceMgr::Bool,
691 ModuleBase_Preferences::VIEWER_SECTION, "edge-selection");
692 pref->addItem(tr("Vertices"), otherGroup,
693 SUIT_PreferenceMgr::Bool,
694 ModuleBase_Preferences::VIEWER_SECTION, "vertex-selection");
696 int sensitivityGroup = pref->addItem(tr("Selection sensitivity"), viewTab);
697 pref->setItemProperty("columns", 2, sensitivityGroup);
698 pref->addItem(tr("Vertex"), sensitivityGroup, SUIT_PreferenceMgr::DblSpin,
699 ModuleBase_Preferences::VIEWER_SECTION, "point-selection-sensitivity");
700 pref->addItem(tr("Edge"), sensitivityGroup, SUIT_PreferenceMgr::DblSpin,
701 ModuleBase_Preferences::VIEWER_SECTION, "edge-selection-sensitivity");
705 //******************************************************
706 void SHAPERGUI::preferencesChanged(const QString& theSection, const QString& theParam)
708 SUIT_ResourceMgr* aResMgr = application()->resourceMgr();
709 QString aVal = aResMgr->stringValue(theSection, theParam);
710 Config_Prop* aProp = Config_PropManager::findProp(theSection.toStdString(),
711 theParam.toStdString());
712 std::string aValue = aVal.toStdString();
713 if (aValue.empty()) {
714 aValue = aProp->defaultValue();
715 aResMgr->setValue(theSection, theParam, QString(aValue.c_str()));
717 LightApp_Preferences* pref = preferences();
721 aProp->setValue(aValue);
723 myWorkshop->displayer()->redisplayObjects();
726 void SHAPERGUI::putInfo(const QString& theInfo, const int theMSecs)
728 application()->putInfo(theInfo, theMSecs);
731 bool SHAPERGUI::abortAllOperations()
733 return workshop()->operationMgr()->abortAllOperations();
736 void SHAPERGUI::createFeatureActions()
738 myWorkshop->menuMgr()->createFeatureActions();