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:
//******************************************************
NewGeom_Module::NewGeom_Module()
: LightApp_Module("NewGeom"),
- mySelector(0), myIsOpened(0)
+ mySelector(0), myIsOpened(0), myPopupMgr(0)
{
myWorkshop = new XGUI_Workshop(this);
myProxyViewer = new NewGeom_SalomeViewer(this);
mySelector = createSelector(OCCViewManagers.first());
}
}
- QtxPopupMgr* aMgr = popupMgr(); // Create popup manager
- action(myEraseAll)->setEnabled(false);
+ //action(myEraseAll)->setEnabled(false);
if (myIsOpened) {
myWorkshop->objectBrowser()->rebuildDataTree();
}
}
+//******************************************************
+QtxPopupMgr* NewGeom_Module::popupMgr()
+{
+ if (!myPopupMgr)
+ myPopupMgr = new QtxPopupMgr( 0, this );
+ return myPopupMgr;
+}
+
//******************************************************
void NewGeom_Module::onDefaultPreferences()
{
}
//******************************************************
-QAction* NewGeom_Module::addEditCommand(const QString& theId, const QString& theTitle,
- const QString& theTip, const QIcon& theIcon,
- const QKeySequence& theKeys, bool isCheckable)
+QAction* NewGeom_Module::addDesktopCommand(const QString& theId, const QString& theTitle,
+ const QString& theTip, const QIcon& theIcon,
+ const QKeySequence& theKeys, bool isCheckable,
+ const char* theMenuSourceText, const int theMenuPosition)
{
- int aMenu = createMenu(tr("MEN_DESK_EDIT"), -1, -1);
+ int aMenu = createMenu(tr(theMenuSourceText), -1, -1);
int aId = myActionsList.size();
myActionsList.append(theId);
QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
isCheckable);
aAction->setData(theId);
- createMenu(aId, aMenu, 10);
+ createMenu(aId, aMenu, theMenuPosition);
return aAction;
}
//******************************************************
-void NewGeom_Module::addEditMenuSeparator()
+void NewGeom_Module::addDesktopMenuSeparator(const char* theMenuSourceText, const int theMenuPosition)
{
- int aMenu = createMenu(tr("MEN_DESK_EDIT"), -1, -1);
- createMenu(separator(), aMenu, -1, 10);
+ int aMenu = createMenu(tr(theMenuSourceText), -1, -1);
+ createMenu(separator(), aMenu, -1, theMenuPosition);
}
//******************************************************