virtual const QList<ModuleBase_ModelWidget*>& modelWidgets() const = 0;
/// Editing mode depends on mode of current operation. This value is defined by it.
- void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
+ virtual void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
bool isEditingMode() const { return myIsEditing; }
/// Set Enable/Disable state of Ok button
myFeature = theFeature;
}
+ /// Editing mode depends on mode of current operation. This value is defined by it.
+ void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
+ bool isEditingMode() const { return myIsEditing; }
+
signals:
/// The signal about widget values changed
void valuesChanged();
bool myIsComputedDefault; /// Value should be computed on execute,
/// like radius for circle's constraint (can not be zero)
+
+ bool myIsEditing;
};
#endif
}
}
-//********************************************************************
-//bool ModuleBase_WidgetShapeSelector::setSelection(ModuleBase_ViewerPrs theValue)
-//{
-// if (theValue.object()) {
-// ObjectPtr aObject = theValue.object();
-// if (acceptObjectShape(aObject)) {
-// setObject(aObject);
-// return true;
-// }
-// }
-// return false;
-//}
-
//********************************************************************
void ModuleBase_WidgetShapeSelector::activate()
{
void PartSet_WidgetPoint2D::onMouseMove(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
{
+ if (isEditingMode())
+ return;
myWorkshop->operationMgr()->setLockValidating(true);
myWorkshop->propertyPanel()->setOkEnabled(false);
return anCancelBtn->isEnabled();
}
-
+void XGUI_PropertyPanel::setEditingMode(bool isEditing)
+{
+ ModuleBase_IPropertyPanel::setEditingMode(isEditing);
+ foreach(ModuleBase_ModelWidget* aWgt, myWidgets) {
+ aWgt->setEditingMode(isEditing);
+ }
+}
/// Returns state of Ok button
virtual bool isCancelEnabled() const;
+ /// Editing mode depends on mode of current operation. This value is defined by it.
+ virtual void setEditingMode(bool isEditing);
+
public slots:
void updateContentWidget(FeaturePtr theFeature);
// Enables / disables "ok" ("accept") button
// emits widgetActivated(theWidget) signal
virtual void activateWidget(ModuleBase_ModelWidget* theWidget);
- signals:
- /// Signal about the point 2d set to the feature
- /// \param the feature
- /// \param the attribute of the feature
- //void storedPoint2D(ObjectPtr theFeature, const std::string& theAttribute);
-
-
private:
QWidget* myCustomWidget;
QList<ModuleBase_ModelWidget*> myWidgets;