Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[modules/shaper.git] / src / XGUI / XGUI_MainMenu.cpp
index 96106a9111357da303ce4d14993cd204893aa057..4c8e7dc3c6ce612b6530213ce6c974f56ae5cdda 100644 (file)
@@ -91,48 +91,3 @@ QList<XGUI_Command*> XGUI_MainMenu::features() const
   return aList;
 }
 
-void XGUI_MainMenu::onFeatureChecked(bool isChecked)
-{
-  if (!isChecked) {
-    restoreCommandState();
-    return;
-  }
-
-  saveCommandsState();
-  QStringList aSkippedIds;
-  XGUI_Command* aToggledFeature = dynamic_cast<XGUI_Command*>(sender());
-  aSkippedIds.append(aToggledFeature->unblockableCommands());
-//  aSkippedIds.append(aToggledFeature->id());
-  XGUI_Workbench* aGeneralWB = findWorkbench(tr("General"));
-  foreach(XGUI_Command* eachFeature, aGeneralWB->features()) {
-    aSkippedIds.append(eachFeature->id());
-  }
-  QList<XGUI_Command*> allFeatures = features();
-  foreach(XGUI_Command* eachFeature, allFeatures) {
-    QString aFeatureId = eachFeature->id();
-    if (aSkippedIds.removeAll(aFeatureId) > 0) {
-      continue;
-    }
-    eachFeature->setEnabled(false);
-  }
-}
-
-void XGUI_MainMenu::saveCommandsState()
-{
-  myCommandState.clear();
-  QList<XGUI_Command*> allFeatures = features();
-  XGUI_Command* eachFeature = NULL;
-  foreach(eachFeature, allFeatures) {
-    myCommandState.insert(eachFeature, eachFeature->enabled());
-  }
-}
-
-void XGUI_MainMenu::restoreCommandState()
-{
-  QList<XGUI_Command*> allFeatures = features();
-  XGUI_Command* eachFeature = NULL;
-  foreach(eachFeature, allFeatures) {
-    eachFeature->setChecked(false);
-    eachFeature->setEnabled(myCommandState[eachFeature]);
-  }
-}