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,
476 //Issue #650: in the SALOME mode the tooltip should be same as text
485 //******************************************************
486 QAction* SHAPERGUI::addFeature(const QString& theWBName, const QString& theId,
487 const QString& theTitle, const QString& theTip,
488 const QIcon& theIcon, const QKeySequence& theKeys,
489 bool isCheckable, const bool isAddSeparator,
490 const QString& theStatusTip)
492 static QString aLastTool = "";
494 if (aLastTool.isEmpty())
495 aLastTool = theWBName;
496 else if (theWBName != aLastTool) {
497 aLastTool = theWBName;
499 desktop()->addToolBarBreak();
505 int aId = myActionsList.size();
506 myActionsList.append(theId);
507 SUIT_Desktop* aDesk = application()->desktop();
509 for (int i = 0; i < theKeys.count(); i++)
511 QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
513 aAction->setStatusTip(theStatusTip);
515 aAction->setData(theId);
517 int aWBMenu = createMenu(theWBName, -1, -1, 30/*10-Window, 1000 - Help*/);
518 int aItemId = createMenu(aId, aWBMenu);
520 createMenu(separator(), aWBMenu);
522 int aWBTool = createTool(theWBName, theWBName);
523 int aToolId = createTool(aId, aWBTool);
525 createTool(separator(), aWBTool);
530 bool SHAPERGUI::isFeatureOfNested(const QAction* theAction)
532 return dynamic_cast<const SHAPERGUI_NestedButton*>(theAction);
535 QAction* SHAPERGUI::addFeatureOfNested(const QString& theWBName,
536 const ActionInfo& theInfo,
537 const QList<QAction*>& theNestedActions)
539 myActionsList.append(theInfo.id);
540 SUIT_Desktop* aDesk = application()->desktop();
541 SHAPERGUI_NestedButton* anAction = new SHAPERGUI_NestedButton(aDesk, theNestedActions);
542 anAction->setData(theInfo.id);
543 anAction->setCheckable(theInfo.checkable);
544 anAction->setChecked(theInfo.checked);
545 anAction->setEnabled(theInfo.enabled);
546 anAction->setVisible(theInfo.visible);
547 anAction->setIcon(theInfo.icon);
548 anAction->setText(theInfo.text);
549 anAction->setToolTip(theInfo.toolTip);
550 anAction->setShortcut(theInfo.shortcut);
551 anAction->setFont(theInfo.font);
553 int aWBMenu = createMenu(theWBName, -1, -1, 30);
554 int aItemId = createMenu(anAction, aWBMenu);
555 createMenu(separator(), aWBMenu); /// nested action is always separated of others
557 int aWBTool = createTool(theWBName, theWBName);
558 int aToolId = createTool(anAction, aWBTool);
559 createTool(separator(), aWBTool); /// nested action is always separated of others
565 //******************************************************
566 QAction* SHAPERGUI::addDesktopCommand(const QString& theId, const QString& theTitle,
567 const QString& theTip, const QIcon& theIcon,
568 const QKeySequence& theKeys, bool isCheckable,
569 const char* theMenuSourceText, const int theMenuPosition)
571 int aMenu = createMenu(tr(theMenuSourceText), -1, -1);
573 int aId = myActionsList.size();
574 myActionsList.append(theId);
575 SUIT_Desktop* aDesk = application()->desktop();
577 for (int i = 0; i < theKeys.count(); i++)
579 QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
581 aAction->setStatusTip(theTip);
582 aAction->setData(theId);
583 createMenu(aId, aMenu, theMenuPosition);
587 //******************************************************
588 void SHAPERGUI::addDesktopMenuSeparator(const char* theMenuSourceText, const int theMenuPosition)
590 int aMenu = createMenu(tr(theMenuSourceText), -1, -1);
591 createMenu(separator(), aMenu, -1, theMenuPosition);
594 bool SHAPERGUI::addActionInToolbar( QAction* theAction, const QString& theToolBarTitle )
599 SUIT_Desktop* aDesktop = application()->desktop();
603 QtxActionToolMgr* aToolMgr = aDesktop->toolMgr();
607 aToolMgr->append( theAction, theToolBarTitle );
611 //******************************************************
612 QList<QAction*> SHAPERGUI::commandList() const
614 QList<QAction*> aActions;
615 for (int i = 0; i < myActionsList.size(); i++) {
616 QAction* aCmd = action(i);
617 if (aCmd && myActionsList.contains(aCmd->data().toString()))
618 aActions.append(aCmd);
624 //******************************************************
625 QMainWindow* SHAPERGUI::desktop() const
627 return application()->desktop();
630 void SHAPERGUI::setFeatureInfo(const QString& theFeatureId,
631 const std::shared_ptr<Config_FeatureMessage>& theMessage)
633 myFeaturesInfo.insert(theFeatureId, theMessage);
636 std::shared_ptr<Config_FeatureMessage> SHAPERGUI::featureInfo(const QString& theFeatureId)
638 std::shared_ptr<Config_FeatureMessage> aMessage;
639 if (myFeaturesInfo.contains(theFeatureId))
640 aMessage = myFeaturesInfo[theFeatureId];
644 //******************************************************
645 void SHAPERGUI::selectionChanged()
647 LightApp_Module::selectionChanged();
648 myWorkshop->salomeViewerSelectionChanged();
651 //******************************************************
652 void SHAPERGUI::contextMenuPopup(const QString& theClient, QMenu* theMenu, QString& theTitle)
654 myWorkshop->contextMenuMgr()->updateViewerMenu();
655 myWorkshop->contextMenuMgr()->addViewerMenu(theMenu);
656 LightApp_Module::contextMenuPopup(theClient, theMenu, theTitle);
660 //******************************************************
661 void SHAPERGUI::createPreferences()
663 LightApp_Preferences* pref = preferences();
666 ModuleBase_Preferences::updateConfigByResources();
667 QString aModName = moduleName();
669 QtxPreferenceItem* item = pref->findItem(aModName, true );
670 if ( item && (!item->isEmpty() )) {
671 item->parentItem()->removeItem(item);
675 int catId = pref->addPreference(aModName, -1 );
678 SHAPERGUI_PrefMgr aMgr(pref, aModName);
679 ModuleBase_Preferences::createEditContent(&aMgr, catId);
681 int viewTab = pref->addItem(tr("Viewer"), catId);
682 // Create other parameters group in viewer tab
683 int otherGroup = pref->addItem(tr("Default selection"), viewTab);
684 pref->setItemProperty("columns", 3, otherGroup);
685 pref->addItem(tr("Faces"), otherGroup,
686 SUIT_PreferenceMgr::Bool,
687 ModuleBase_Preferences::VIEWER_SECTION, "face-selection");
688 pref->addItem(tr("Edges"), otherGroup,
689 SUIT_PreferenceMgr::Bool,
690 ModuleBase_Preferences::VIEWER_SECTION, "edge-selection");
691 pref->addItem(tr("Vertices"), otherGroup,
692 SUIT_PreferenceMgr::Bool,
693 ModuleBase_Preferences::VIEWER_SECTION, "vertex-selection");
695 int sensitivityGroup = pref->addItem(tr("Selection sensitivity"), viewTab);
696 pref->setItemProperty("columns", 2, sensitivityGroup);
697 pref->addItem(tr("Vertex"), sensitivityGroup, SUIT_PreferenceMgr::DblSpin,
698 ModuleBase_Preferences::VIEWER_SECTION, "point-selection-sensitivity");
699 pref->addItem(tr("Edge"), sensitivityGroup, SUIT_PreferenceMgr::DblSpin,
700 ModuleBase_Preferences::VIEWER_SECTION, "edge-selection-sensitivity");
704 //******************************************************
705 void SHAPERGUI::preferencesChanged(const QString& theSection, const QString& theParam)
707 SUIT_ResourceMgr* aResMgr = application()->resourceMgr();
708 QString aVal = aResMgr->stringValue(theSection, theParam);
709 Config_Prop* aProp = Config_PropManager::findProp(theSection.toStdString(),
710 theParam.toStdString());
711 std::string aValue = aVal.toStdString();
712 if (aValue.empty()) {
713 aValue = aProp->defaultValue();
714 aResMgr->setValue(theSection, theParam, QString(aValue.c_str()));
716 LightApp_Preferences* pref = preferences();
720 aProp->setValue(aValue);
722 myWorkshop->displayer()->redisplayObjects();
725 void SHAPERGUI::putInfo(const QString& theInfo, const int theMSecs)
727 application()->putInfo(theInfo, theMSecs);
730 bool SHAPERGUI::abortAllOperations()
732 return workshop()->operationMgr()->abortAllOperations();
735 void SHAPERGUI::createFeatureActions()
737 myWorkshop->menuMgr()->createFeatureActions();