+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
#include "NewGeom_Module.h"
#include "NewGeom_DataModel.h"
#include <XGUI_Workshop.h>
#include <XGUI_PropertyPanel.h>
#include <XGUI_ContextMenuMgr.h>
-#include <XGUI_Preferences.h>
#include <XGUI_ObjectsBrowser.h>
#include <XGUI_OperationMgr.h>
#include <ModuleBase_Operation.h>
+#include <ModuleBase_Preferences.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
}
}
-class NewGeom_PrefMgr: public XGUI_IPrefMgr
+class NewGeom_PrefMgr: public ModuleBase_IPrefMgr
{
public:
NewGeom_PrefMgr(LightApp_Preferences* theMgr, const QString& theModName):myMgr(theMgr), myModName(theModName) {}
return myMgr->addPreference(myModName, theLbl, pId, theType, theSection, theName);
}
+ virtual void setItemProperty(const QString& thePropName,
+ const QVariant& theValue,
+ const int theId = -1)
+ {
+ myMgr->setItemProperty(thePropName, theValue, theId);
+ }
+
+
virtual SUIT_PreferenceMgr* prefMgr() const { return myMgr; }
private:
myWorkshop = new XGUI_Workshop(this);
myProxyViewer = new NewGeom_SalomeViewer(this);
- XGUI_Preferences::setResourceMgr(application()->resourceMgr());
- XGUI_Preferences::loadCustomProps();
+ ModuleBase_Preferences::setResourceMgr(application()->resourceMgr());
+ ModuleBase_Preferences::loadCustomProps();
}
//******************************************************
myIsOpened = false;
QTimer::singleShot(1000, myWorkshop, SLOT(displayAllResults()));
}
+ else
+ myWorkshop->updateCommandStatus();
}
SUIT_ResourceMgr* aResMgr = application()->resourceMgr();
myIsStorePositions = aResMgr->booleanValue("Study", "store_positions", true);
+ myIsEditEnabled = getApp()->isEditEnabled();
+ getApp()->setEditEnabled(false);
// this following row is caused by #187 bug.
// SALOME saves the dock widget positions before deactivateModule() and
SUIT_ResourceMgr* aResMgr = application()->resourceMgr();
aResMgr->setValue("Study", "store_positions", myIsStorePositions);
+ getApp()->setEditEnabled(myIsEditEnabled);
return LightApp_Module::deactivateModule(theStudy);
}
//******************************************************
void NewGeom_Module::onDefaultPreferences()
{
- XGUI_Preferences::resetConfig();
- XGUI_Preferences::updateResourcesByConfig();
+ ModuleBase_Preferences::resetConfig();
+ ModuleBase_Preferences::updateResourcesByConfig();
LightApp_Preferences* pref = preferences();
if (pref)
LightApp_Preferences* pref = preferences();
if (!pref)
return;
- XGUI_Preferences::updateConfigByResources();
+ ModuleBase_Preferences::updateConfigByResources();
QString aModName = moduleName();
QtxPreferenceItem* item = pref->findItem(aModName, true );
if ( catId == -1 )
return;
NewGeom_PrefMgr aMgr(pref, aModName);
- XGUI_Preferences::createEditContent(&aMgr, catId);
+ ModuleBase_Preferences::createEditContent(&aMgr, catId);
pref->retrieve();
}