<source>
<doublevalue id="x" label="X:" max="50" step="1.0" default="0" icon=":pictures/x_point.png" tooltip="Set X">
- <validator id="between" parameters="a,b"/>
+ <!-- validator id="between" parameters="a,b"/ -->
</doublevalue>
<doublevalue id="y" label="Y:" min="x" default="1" icon=":pictures/y_point.png" tooltip="Set Y"/>
<doublevalue id="z" label="Z:" min="-20" step="0.1" default="2" icon=":pictures/z_point.png" tooltip="Set Z"/>
return ""; // not defined
}
-void Model_Data::setName(string theName)
+void Model_Data::setName(const string& theName)
{
bool isModified = false;
Handle(TDataStd_Name) aName;
if (isModified)
aName->Set(theName.c_str());
}
- if (isModified) {
+ // to do not cause the update of the result on name change
+ /*if (isModified) {
static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent, false);
- }
+ }*/
}
-void Model_Data::addAttribute(string theID, string theAttrType)
+void Model_Data::addAttribute(const string& theID, const string theAttrType)
{
TDF_Label anAttrLab = myLab.FindChild(myAttrs.size() + 1);
ModelAPI_Attribute* anAttr = 0;
}
}
-boost::shared_ptr<ModelAPI_AttributeDocRef> Model_Data::docRef(const string theID)
+boost::shared_ptr<ModelAPI_AttributeDocRef> Model_Data::docRef(const string& theID)
{
map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
if (aFound == myAttrs.end()) {
return aRes;
}
-boost::shared_ptr<ModelAPI_AttributeDouble> Model_Data::real(const string theID)
+boost::shared_ptr<ModelAPI_AttributeDouble> Model_Data::real(const string& theID)
{
map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
if (aFound == myAttrs.end()) {
return aRes;
}
-boost::shared_ptr<ModelAPI_AttributeBoolean> Model_Data::boolean(const std::string theID)
+boost::shared_ptr<ModelAPI_AttributeBoolean> Model_Data::boolean(const std::string& theID)
{
map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
if (aFound == myAttrs.end()) {
return aRes;
}
-boost::shared_ptr<ModelAPI_AttributeReference> Model_Data::reference(const string theID)
+boost::shared_ptr<ModelAPI_AttributeReference> Model_Data::reference(const string& theID)
{
map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
if (aFound == myAttrs.end()) {
return aRes;
}
-boost::shared_ptr<ModelAPI_AttributeRefAttr> Model_Data::refattr(const string theID)
+boost::shared_ptr<ModelAPI_AttributeRefAttr> Model_Data::refattr(const string& theID)
{
map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
if (aFound == myAttrs.end()) {
return aRes;
}
-boost::shared_ptr<ModelAPI_AttributeRefList> Model_Data::reflist(const string theID)
+boost::shared_ptr<ModelAPI_AttributeRefList> Model_Data::reflist(const string& theID)
{
map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator aFound = myAttrs.find(theID);
if (aFound == myAttrs.end()) {
return aRes;
}
-boost::shared_ptr<ModelAPI_Attribute> Model_Data::attribute(const std::string theID)
+boost::shared_ptr<ModelAPI_Attribute> Model_Data::attribute(const std::string& theID)
{
boost::shared_ptr<ModelAPI_Attribute> aResult;
if (myAttrs.find(theID) == myAttrs.end()) // no such attribute
return myAttrs[theID];
}
-const string& Model_Data::id(const boost::shared_ptr<ModelAPI_Attribute> theAttr)
+const string& Model_Data::id(const boost::shared_ptr<ModelAPI_Attribute>& theAttr)
{
map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = myAttrs.begin();
for(; anAttr != myAttrs.end(); anAttr++) {
return anEmpty;
}
-bool Model_Data::isEqual(const boost::shared_ptr<ModelAPI_Data> theData)
+bool Model_Data::isEqual(const boost::shared_ptr<ModelAPI_Data>& theData)
{
boost::shared_ptr<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(theData);
if (aData)
return !myLab.IsNull() && myLab.HasAttribute();
}
-list<boost::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const string theType)
+list<boost::shared_ptr<ModelAPI_Attribute> > Model_Data::attributes(const string& theType)
{
list<boost::shared_ptr<ModelAPI_Attribute> > aResult;
map<string, boost::shared_ptr<ModelAPI_Attribute> >::iterator anAttrsIter = myAttrs.begin();
void Model_Data::sendAttributeUpdated(ModelAPI_Attribute* theAttr)
{
theAttr->setInitialized();
- static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
- ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent);
+ if (theAttr->isArgument()) {
+ static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
+ ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent);
+ }
}
/// Returns the name of the feature visible by the user in the object browser
MODEL_EXPORT virtual std::string name();
/// Defines the name of the feature visible by the user in the object browser
- MODEL_EXPORT virtual void setName(std::string theName);
+ MODEL_EXPORT virtual void setName(const std::string& theName);
/// Returns the attribute that references to another document
- MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDocRef> docRef(const std::string theID);
+ MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDocRef> docRef(const std::string& theID);
/// Returns the attribute that contains real value with double precision
- MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string theID);
+ MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID);
/// Returns the attribute that contains reference to a feature
MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeReference>
- reference(const std::string theID);
+ reference(const std::string& theID);
/// Returns the attribute that contains reference to an attribute of a feature
MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeRefAttr>
- refattr(const std::string theID);
+ refattr(const std::string& theID);
/// Returns the attribute that contains list of references to features
MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeRefList>
- reflist(const std::string theID);
+ reflist(const std::string& theID);
/// Returns the attribute that contains boolean value
MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_AttributeBoolean>
- boolean(const std::string theID);
+ boolean(const std::string& theID);
/// Returns the generic attribute by identifier
/// \param theID identifier of the attribute
- MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Attribute> attribute(const std::string theID);
+ MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID);
/// Returns all attributes ofthe feature of the given type
/// or all attributes if "theType" is empty
MODEL_EXPORT virtual std::list<boost::shared_ptr<ModelAPI_Attribute> >
- attributes(const std::string theType);
+ attributes(const std::string& theType);
/// Identifier by the id (not fast, iteration by map)
/// \param theAttr attribute already created in this data
- MODEL_EXPORT virtual const std::string& id(const boost::shared_ptr<ModelAPI_Attribute> theAttr);
+ MODEL_EXPORT virtual const std::string& id(const boost::shared_ptr<ModelAPI_Attribute>& theAttr);
/// Returns true if data belongs to same features
- MODEL_EXPORT virtual bool isEqual(const boost::shared_ptr<ModelAPI_Data> theData);
+ MODEL_EXPORT virtual bool isEqual(const boost::shared_ptr<ModelAPI_Data>& theData);
/// Returns true if it is correctly connected t othe data model
MODEL_EXPORT virtual bool isValid();
/// for each attribute of the object
/// \param theID identifier of the attribute that can be referenced by this ID later
/// \param theAttrType type of the created attribute (received from the type method)
- MODEL_EXPORT virtual void addAttribute(std::string theID, std::string theAttrType);
+ MODEL_EXPORT virtual void addAttribute(const std::string& theID, const std::string theAttrType);
/// Useful method for "set" methods of the attributes: sends an UPDATE event and
/// makes attribute initialized
return NULL; // not found
}
+const ModelAPI_Validator* Model_ValidatorsFactory::validator(
+ const std::string& theFeatureID, const std::string& theAttrID) const
+{
+ map<string, map<string, pair<ModelAPI_Validator*, list<string> > > >::const_iterator
+ aFeature = myAttrs.find(theFeatureID);
+ if (aFeature == myAttrs.cend()) return NULL; // feature is not found
+ map<string, pair<ModelAPI_Validator*, list<string> > >::const_iterator
+ anAttr = aFeature->second.find(theAttrID);
+ if (anAttr == aFeature->second.cend()) return NULL; // attribute is not found
+ return anAttr->second.first;
+}
+
/*bool Model_ValidatorsFactory::validate(
const boost::shared_ptr<ModelAPI_Feature>& theFeature, const string& theAttrID ) const
{
/// Provides a validator for the feature, returns NULL if no validator
MODEL_EXPORT virtual const ModelAPI_Validator* validator(const std::string& theFeatureID) const;
+ /// Provides a validator for the attribute, returns NULL if no validator
+ MODEL_EXPORT virtual const ModelAPI_Validator* validator(
+ const std::string& theFeatureID, const std::string& theAttrID) const;
/// Returns the result of "validate" method for attribute of validator.
/// If validator is not exists, returns true: everything is valid by default.
boost::shared_ptr<ModelAPI_Object> myObject;
protected: // accessible from the attributes
bool myIsInitialized;
+ bool myIsArgument;
public:
/// Returns the type of this class of attributes, not static method
/// Makes attribute initialized
MODELAPI_EXPORT void setInitialized() {myIsInitialized = true;}
+ /// Set this attribute is argument for result (change of this attribute requires update of result).
+ /// By default it is true.
+ MODELAPI_EXPORT void setIsArgument(const bool theFlag) {myIsArgument = theFlag;}
+
+ /// Returns true if attribute causes the result change
+ MODELAPI_EXPORT bool isArgument() {return myIsArgument;}
+
protected:
/// Objects are created for features automatically
- ModelAPI_Attribute() {myIsInitialized = false;}
+ ModelAPI_Attribute() {myIsInitialized = false; myIsArgument = true;}
};
virtual std::string name() = 0;
/// Defines the name of the feature visible by the user in the object browser
- virtual void setName(std::string theName) = 0;
+ virtual void setName(const std::string& theName) = 0;
/// Returns the attribute that references to another document
- virtual boost::shared_ptr<ModelAPI_AttributeDocRef> docRef(const std::string theID) = 0;
+ virtual boost::shared_ptr<ModelAPI_AttributeDocRef> docRef(const std::string& theID) = 0;
/// Returns the attribute that contains real value with double precision
- virtual boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string theID) = 0;
+ virtual boost::shared_ptr<ModelAPI_AttributeDouble> real(const std::string& theID) = 0;
/// Returns the attribute that contains reference to a feature
- virtual boost::shared_ptr<ModelAPI_AttributeReference> reference(const std::string theID) = 0;
+ virtual boost::shared_ptr<ModelAPI_AttributeReference> reference(const std::string& theID) = 0;
/// Returns the attribute that contains reference to an attribute of a feature
- virtual boost::shared_ptr<ModelAPI_AttributeRefAttr> refattr(const std::string theID) = 0;
+ virtual boost::shared_ptr<ModelAPI_AttributeRefAttr> refattr(const std::string& theID) = 0;
/// Returns the attribute that contains list of references to features
- virtual boost::shared_ptr<ModelAPI_AttributeRefList> reflist(const std::string theID) = 0;
+ virtual boost::shared_ptr<ModelAPI_AttributeRefList> reflist(const std::string& theID) = 0;
/// Returns the attribute that contains boolean value
- virtual boost::shared_ptr<ModelAPI_AttributeBoolean> boolean(const std::string theID) = 0;
+ virtual boost::shared_ptr<ModelAPI_AttributeBoolean> boolean(const std::string& theID) = 0;
/// Returns the generic attribute by identifier
/// \param theID identifier of the attribute
- virtual boost::shared_ptr<ModelAPI_Attribute> attribute(const std::string theID) = 0;
+ virtual boost::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID) = 0;
/// Returns all attributes ofthe feature of the given type
/// or all attributes if "theType" is empty
virtual std::list<boost::shared_ptr<ModelAPI_Attribute> >
- attributes(const std::string theType) = 0;
+ attributes(const std::string& theType) = 0;
/// Identifier by the id (not fast, iteration by map)
/// \param theAttr attribute already created in this data
- virtual const std::string& id(const boost::shared_ptr<ModelAPI_Attribute> theAttr) = 0;
+ virtual const std::string& id(const boost::shared_ptr<ModelAPI_Attribute>& theAttr) = 0;
/// Returns true if data belongs to same features
- virtual bool isEqual(const boost::shared_ptr<ModelAPI_Data> theData) = 0;
+ virtual bool isEqual(const boost::shared_ptr<ModelAPI_Data>& theData) = 0;
/// Returns true if it is correctly connected t othe data model
virtual bool isValid() = 0;
/// for each attribute of the object
/// \param theID identifier of the attribute that can be referenced by this ID later
/// \param theAttrType type of the created attribute (received from the type method)
- virtual void addAttribute(std::string theID, std::string theAttrType) = 0;
+ virtual void addAttribute(const std::string& theID, const std::string theAttrType) = 0;
/// Useful method for "set" methods of the attributes: sends an UPDATE event and
/// makes attribute initialized
/// Provides a validator for the feature, returns NULL if no validator
virtual const ModelAPI_Validator* validator(const std::string& theFeatureID) const = 0;
+ /// Provides a validator for the attribute, returns NULL if no validator
+ virtual const ModelAPI_Validator* validator(
+ const std::string& theFeatureID, const std::string& theAttrID) const = 0;
+
/// Returns the result of "validate" method for attribute of validator.
/// If validator is not exists, returns true: everything is valid by default.
//virtual bool validate(
ModuleBase_ISelection.h
ModuleBase_ViewerPrs.h
ModuleBase_Tools.h
+ ModuleBase_ResultValidators.h
)
SET(PROJECT_SOURCES
ModuleBase_WidgetValue.cpp
ModuleBase_WidgetValueFeature.cpp
ModuleBase_Tools.cpp
+ ModuleBase_ResultValidators.cpp
)
SET(PROJECT_LIBRARIES
#include <QWidget>
-ModuleBase_ModelWidget::ModuleBase_ModelWidget(QObject* theParent, const Config_WidgetAPI* theData)
- : QObject(theParent), myHasDefaultValue(false)
+ModuleBase_ModelWidget::ModuleBase_ModelWidget(QObject* theParent,
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+ : QObject(theParent), myHasDefaultValue(false), myParentId(theParentId)
{
myAttributeID = theData ? theData->widgetId() : "";
}
}
return true;
}
-
-std::string ModuleBase_ModelWidget::attributeID() const
-{
- return myAttributeID;
-}
/// Constructor
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_ModelWidget(QObject* theParent, const Config_WidgetAPI* theData);
+ ModuleBase_ModelWidget(QObject* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
/// Destructor
virtual ~ModuleBase_ModelWidget() {};
/// Returns the attribute name
/// \returns the string value
- std::string attributeID() const;
+ std::string attributeID() const { return myAttributeID; }
+
+ /// Returns the parent of the attribute
+ /// \returns the string value
+ std::string parentID() const { return myParentId; }
signals:
/// The signal about widget values changed
private:
std::string myAttributeID; /// the attribute name of the model feature
+ std::string myParentId; /// name of parent
};
#endif
--- /dev/null
+// File: ModuleBase_ResultValidators.cpp
+// Created: 23 July 2014
+// Author: Vitaly SMETANNIKOV
+
+#include "ModuleBase_ResultValidators.h"
+#include "ModuleBase_Tools.h"
+
+#include <ModelAPI_Result.h>
+#include <GeomAPI_Shape.h>
+
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS.hxx>
+#include <BRep_Tool.hxx>
+#include <GeomAdaptor_Curve.hxx>
+
+
+ResultPtr result(const ObjectPtr theObject)
+{
+ return boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+}
+
+TopoDS_Shape shape(ResultPtr theResult)
+{
+ boost::shared_ptr<GeomAPI_Shape> aShape = ModuleBase_Tools::shape(theResult);
+ if (aShape)
+ return aShape->impl<TopoDS_Shape>();
+ return TopoDS_Shape();
+}
+
+
+bool ModuleBase_ResulPointValidator::isValid(const ObjectPtr theObject) const
+{
+ ResultPtr aResult = result(theObject);
+ if (!aResult)
+ return false;
+ TopoDS_Shape aShape = shape(aResult);
+ if (aShape.IsNull())
+ return false;
+
+ return aShape.ShapeType() == TopAbs_VERTEX;
+}
+
+
+bool ModuleBase_ResulLineValidator::isValid(const ObjectPtr theObject) const
+{
+ ResultPtr aResult = result(theObject);
+ if (!aResult)
+ return false;
+ TopoDS_Shape aShape = shape(aResult);
+ if (aShape.IsNull())
+ return false;
+
+ if (aShape.ShapeType() == TopAbs_EDGE) {
+ TopoDS_Edge aEdge = TopoDS::Edge(aShape);
+ Standard_Real aStart, aEnd;
+ Handle(Geom_Curve) aCurve = BRep_Tool::Curve(aEdge, aStart, aEnd);
+ GeomAdaptor_Curve aAdaptor(aCurve);
+ return aAdaptor.GetType() == GeomAbs_Line;
+ }
+ return false;
+}
+
+
+bool ModuleBase_ResulArcValidator::isValid(const ObjectPtr theObject) const
+{
+ ResultPtr aResult = result(theObject);
+ if (!aResult)
+ return false;
+ TopoDS_Shape aShape = shape(aResult);
+ if (aShape.IsNull())
+ return false;
+
+ if (aShape.ShapeType() == TopAbs_EDGE) {
+ TopoDS_Edge aEdge = TopoDS::Edge(aShape);
+ Standard_Real aStart, aEnd;
+ Handle(Geom_Curve) aCurve = BRep_Tool::Curve(aEdge, aStart, aEnd);
+ GeomAdaptor_Curve aAdaptor(aCurve);
+ return aAdaptor.GetType() == GeomAbs_Circle;
+ }
+ return false;
+}
+
--- /dev/null
+// File: ModuleBase_ResultValidators.h
+// Created: 23 July 2014
+// Author: Vitaly SMETANNIKOV
+
+#ifndef ModuleBase_ResultValidators_H
+#define ModuleBase_ResultValidators_H
+
+#include "ModuleBase.h"
+#include <ModelAPI_Validator.h>
+#include <ModelAPI_Object.h>
+
+class ModuleBase_ResultValidator: public ModelAPI_Validator
+{
+public:
+ virtual bool isValid(const ObjectPtr theObject) const = 0;
+};
+
+class ModuleBase_ResulPointValidator: public ModuleBase_ResultValidator
+{
+public:
+ MODULEBASE_EXPORT virtual bool isValid(const ObjectPtr theObject) const;
+};
+
+class ModuleBase_ResulLineValidator: public ModuleBase_ResultValidator
+{
+public:
+ MODULEBASE_EXPORT virtual bool isValid(const ObjectPtr theObject) const;
+};
+
+class ModuleBase_ResulArcValidator: public ModuleBase_ResultValidator
+{
+public:
+ MODULEBASE_EXPORT virtual bool isValid(const ObjectPtr theObject) const;
+};
+
+#endif
\ No newline at end of file
#include <QLayout>
#include <QCheckBox>
-ModuleBase_WidgetBoolValue::ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData)
- : ModuleBase_ModelWidget(theParent, theData)
+ModuleBase_WidgetBoolValue::ModuleBase_WidgetBoolValue(QWidget* theParent,
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+ : ModuleBase_ModelWidget(theParent, theData, theParentId)
{
QString aText = QString::fromStdString(theData->widgetLabel());
QString aToolTip = QString::fromStdString(theData->widgetTooltip());
/// Constructor
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData);
+ ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
virtual ~ModuleBase_WidgetBoolValue();
#endif
-ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData)
- : ModuleBase_ModelWidget(theParent, theData)
+ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+ : ModuleBase_ModelWidget(theParent, theData, theParentId)
{
myContainer = new QWidget(theParent);
QHBoxLayout* aControlLay = new QHBoxLayout(myContainer);
/// Constructor
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData);
+ ModuleBase_WidgetDoubleValue(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
virtual ~ModuleBase_WidgetDoubleValue();
#include <QDoubleSpinBox>
ModuleBase_WidgetEditor::ModuleBase_WidgetEditor(QWidget* theParent,
- const Config_WidgetAPI* theData)
-: ModuleBase_WidgetDoubleValue(theParent, theData)
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+: ModuleBase_WidgetDoubleValue(theParent, theData, theParentId)
{
}
ModuleBase_WidgetEditor::ModuleBase_WidgetEditor(QWidget* theParent, const std::string& theAttribute)
-: ModuleBase_WidgetDoubleValue(theParent, 0)
+: ModuleBase_WidgetDoubleValue(theParent, 0, "")
{
setAttributeID(theAttribute);
}
/// \theParent the parent object
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetEditor(QWidget* theParent, const Config_WidgetAPI* theData);
+ ModuleBase_WidgetEditor(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
/// Constructor
/// \theParent the parent object
/// \theParent the parent object
void ModuleBase_WidgetFactory::createWidget(QWidget* theParent)
{
+ myParentId = myWidgetApi->widgetId();
if (!myWidgetApi->toChildWidget())
return;
QWidget* ModuleBase_WidgetFactory::doubleSpinBoxControl(QWidget* theParent)
{
- ModuleBase_WidgetDoubleValue* aDblWgt = new ModuleBase_WidgetDoubleValue(theParent, myWidgetApi);
+ ModuleBase_WidgetDoubleValue* aDblWgt =
+ new ModuleBase_WidgetDoubleValue(theParent, myWidgetApi, myParentId);
myModelWidgets.append(aDblWgt);
return aDblWgt->getControl();
QWidget* ModuleBase_WidgetFactory::pointSelectorControl(QWidget* theParent)
{
- ModuleBase_WidgetPoint2D* aWidget = new ModuleBase_WidgetPoint2D(theParent, myWidgetApi);
+ ModuleBase_WidgetPoint2D* aWidget =
+ new ModuleBase_WidgetPoint2D(theParent, myWidgetApi, myParentId);
myModelWidgets.append(aWidget);
return aWidget->getControl();
}
QWidget* ModuleBase_WidgetFactory::featureSelectorControl(QWidget* theParent)
{
- ModuleBase_WidgetFeature* aWidget = new ModuleBase_WidgetFeature(theParent, myWidgetApi);
+ ModuleBase_WidgetFeature* aWidget =
+ new ModuleBase_WidgetFeature(theParent, myWidgetApi, myParentId);
myModelWidgets.append(aWidget);
return aWidget->getControl();
}
QWidget* ModuleBase_WidgetFactory::featureOrAttributeSelectorControl(QWidget* theParent)
{
- ModuleBase_WidgetFeatureOrAttribute* aWidget = new ModuleBase_WidgetFeatureOrAttribute(theParent,
- myWidgetApi);
+ ModuleBase_WidgetFeatureOrAttribute* aWidget =
+ new ModuleBase_WidgetFeatureOrAttribute(theParent, myWidgetApi, myParentId);
myModelWidgets.append(aWidget);
return aWidget->getControl();
}
QWidget* ModuleBase_WidgetFactory::doubleValueEditor(QWidget* theParent)
{
- ModuleBase_WidgetEditor* aWidget = new ModuleBase_WidgetEditor(theParent, myWidgetApi);
+ ModuleBase_WidgetEditor* aWidget =
+ new ModuleBase_WidgetEditor(theParent, myWidgetApi, myParentId);
myModelWidgets.append(aWidget);
return aWidget->getControl();
}
QWidget* ModuleBase_WidgetFactory::selectorControl(QWidget* theParent)
{
- ModuleBase_WidgetSelector* aSelector = new ModuleBase_WidgetSelector(theParent, myWorkshop, myWidgetApi);
+ ModuleBase_WidgetSelector* aSelector =
+ new ModuleBase_WidgetSelector(theParent, myWorkshop, myWidgetApi, myParentId);
myModelWidgets.append(aSelector);
return aSelector->getControl();
}
QWidget* ModuleBase_WidgetFactory::booleanControl(QWidget* theParent)
{
- ModuleBase_WidgetBoolValue* aBoolWgt = new ModuleBase_WidgetBoolValue(theParent, myWidgetApi);
+ ModuleBase_WidgetBoolValue* aBoolWgt =
+ new ModuleBase_WidgetBoolValue(theParent, myWidgetApi, myParentId);
myModelWidgets.append(aBoolWgt);
return aBoolWgt->getControl();
QWidget* ModuleBase_WidgetFactory::point2dDistanceControl(QWidget* theParent)
{
- ModuleBase_WidgetPoint2dDistance* aDistWgt = new ModuleBase_WidgetPoint2dDistance(theParent, myWidgetApi);
+ ModuleBase_WidgetPoint2dDistance* aDistWgt =
+ new ModuleBase_WidgetPoint2dDistance(theParent, myWidgetApi, myParentId);
myModelWidgets.append(aDistWgt);
return aDistWgt->getControl();
ModuleBase_IWorkshop* myWorkshop;
QList<ModuleBase_ModelWidget*> myModelWidgets;
+ std::string myParentId;
};
#endif /* ModuleBase_WidgetFactory_H_ */
#include <ModuleBase_WidgetValueFeature.h>
#include <ModuleBase_WidgetValue.h>
+#include <ModuleBase_ResultValidators.h>
#include <Config_Keywords.h>
#include <Config_WidgetAPI.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Object.h>
#include <ModelAPI_AttributeRefAttr.h>
+#include <ModelAPI_Validator.h>
#include <QWidget>
#include <QLineEdit>
#include <QLabel>
ModuleBase_WidgetFeature::ModuleBase_WidgetFeature(QWidget* theParent,
- const Config_WidgetAPI* theData)
-: ModuleBase_ModelWidget(theParent, theData)
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+: ModuleBase_ModelWidget(theParent, theData, theParentId)
{
- QString aKinds = QString::fromStdString(theData->getProperty(FEATURE_KEYSEQUENCE));
- myObjectKinds = aKinds.split(" ");
+ //QString aKinds = QString::fromStdString(theData->getProperty(FEATURE_KEYSEQUENCE));
+ //myObjectKinds = aKinds.split(" ");
+ //theData->
myContainer = new QWidget(theParent);
QHBoxLayout* aControlLay = new QHBoxLayout(myContainer);
bool ModuleBase_WidgetFeature::setObject(const ObjectPtr& theObject)
{
+ PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+ const ModelAPI_Validator* aValidator = aFactory->validator(parentID(), attributeID());
+ if (aValidator) {
+ const ModuleBase_ResultValidator* aResValidator =
+ dynamic_cast<const ModuleBase_ResultValidator*>(aValidator);
+ if (aResValidator) {
+ if (!aResValidator->isValid(theObject))
+ return false;
+ }
+ }
// TODO
//if (!myObjectKinds.contains(theObject->getKind().c_str()))
// return false;
/// \theParent the parent object
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetFeature(QWidget* theParent, const Config_WidgetAPI* theData);
+ ModuleBase_WidgetFeature(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
/// Destructor
virtual ~ModuleBase_WidgetFeature();
#include <QLabel>
ModuleBase_WidgetFeatureOrAttribute::ModuleBase_WidgetFeatureOrAttribute(QWidget* theParent,
- const Config_WidgetAPI* theData)
-: ModuleBase_WidgetFeature(theParent, theData)
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+: ModuleBase_WidgetFeature(theParent, theData, theParentId)
{
}
/// \theParent the parent object
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetFeatureOrAttribute(QWidget* theParent, const Config_WidgetAPI* theData);
+ ModuleBase_WidgetFeatureOrAttribute(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
/// Destructor
virtual ~ModuleBase_WidgetFeatureOrAttribute();
#include <climits>
ModuleBase_WidgetPoint2D::ModuleBase_WidgetPoint2D(QWidget* theParent,
- const Config_WidgetAPI* theData)
-: ModuleBase_ModelWidget(theParent, theData)
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+: ModuleBase_ModelWidget(theParent, theData, theParentId)
{
myOptionParam = theData->getProperty(PREVIOUS_FEATURE_PARAM);
myGroupBox = new QGroupBox(QString::fromStdString(theData->getProperty(CONTAINER_PAGE_NAME)),
/// \theParent the parent object
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetPoint2D(QWidget* theParent, const Config_WidgetAPI* theData);
+ ModuleBase_WidgetPoint2D(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
/// Destructor
virtual ~ModuleBase_WidgetPoint2D();
#include <QDoubleSpinBox>
-ModuleBase_WidgetPoint2dDistance::ModuleBase_WidgetPoint2dDistance(QWidget* theParent, const Config_WidgetAPI* theData)
- : ModuleBase_WidgetDoubleValue(theParent, theData)
+ModuleBase_WidgetPoint2dDistance::ModuleBase_WidgetPoint2dDistance(QWidget* theParent,
+ const Config_WidgetAPI* theData, const std::string& theParentId)
+ : ModuleBase_WidgetDoubleValue(theParent, theData, theParentId)
{
myFirstPntName = theData->getProperty("first_point");
}
/// Constructor
/// \theParent the parent object
/// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetPoint2dDistance(QWidget* theParent, const Config_WidgetAPI* theData);
+ ModuleBase_WidgetPoint2dDistance(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
virtual ~ModuleBase_WidgetPoint2dDistance();
ModuleBase_WidgetSelector::ModuleBase_WidgetSelector(QWidget* theParent,
ModuleBase_IWorkshop* theWorkshop,
- const Config_WidgetAPI* theData)
-: ModuleBase_ModelWidget(theParent, theData), myWorkshop(theWorkshop), myActivateOnStart(false)
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+: ModuleBase_ModelWidget(theParent, theData, theParentId), myWorkshop(theWorkshop), myActivateOnStart(false)
{
myContainer = new QWidget(theParent);
QHBoxLayout* aLayout = new QHBoxLayout(myContainer);
public:
ModuleBase_WidgetSelector(QWidget* theParent,
ModuleBase_IWorkshop* theWorkshop,
- const Config_WidgetAPI* theData);
+ const Config_WidgetAPI* theData, const std::string& theParentId);
virtual ~ModuleBase_WidgetSelector();
void PartSet_Module::createFeatures()
{
- Config_ModuleReader aXMLReader = Config_ModuleReader();
- aXMLReader.readAll();
- myFeaturesInFiles = aXMLReader.featuresInFiles();
-
//!! Test registering of validators
PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
aFactory->registerValidator("PartSet_PerpendicularValidator", new PartSet_PerpendicularValidator);
aFactory->registerValidator("PartSet_ParallelValidator", new PartSet_ParallelValidator);
aFactory->registerValidator("PartSet_RadiusValidator", new PartSet_RadiusValidator);
+
+ Config_ModuleReader aXMLReader = Config_ModuleReader();
+ aXMLReader.readAll();
+ myFeaturesInFiles = aXMLReader.featuresInFiles();
}
void PartSet_Module::featureCreated(QAction* theFeature)
myWorkshop->operationMgr()->currentOperation());
if (aPreviewOp) {
XGUI_PropertyPanel* aPropPanel = myWorkshop->propertyPanel();
- connect(aPropPanel, SIGNAL(storedPoint2D(FeaturePtr, const std::string&)),
- this, SLOT(onStorePoint2D(FeaturePtr, const std::string&)), Qt::UniqueConnection);
+ connect(aPropPanel, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)),
+ this, SLOT(onStorePoint2D(ObjectPtr, const std::string&)), Qt::UniqueConnection);
}
}
PartSet_OperationSketchBase* aPreviewOp = dynamic_cast<PartSet_OperationSketchBase*>(theOperation);
if (aPreviewOp) {
XGUI_PropertyPanel* aPropPanel = myWorkshop->propertyPanel();
- //disconnect(aPropPanel, SIGNAL(storedPoint2D(FeaturePtr, const std::string&)),
- // this, SLOT(onStorePoint2D(FeaturePtr, const std::string&)));
+ //disconnect(aPropPanel, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)),
+ // this, SLOT(onStorePoint2D(ObjectPtr, const std::string&)));
}
}
myWorkshop->viewer()->fitAll();
}
-void PartSet_Module::onLaunchOperation(std::string theName, ObjectPtr theFeature)
+void PartSet_Module::onLaunchOperation(std::string theName, ObjectPtr theObject)
{
- FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
+ FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theObject);
if (!aFeature) {
- qDebug("Warning! Restart operation without feature!");
- return;
+ ResultPtr aResult = boost::dynamic_pointer_cast<ModelAPI_Result>(theObject);
+ if (aResult) {
+ PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
+ DocumentPtr aDoc = aMgr->rootDocument();
+ aFeature = aDoc->feature(aResult);
+ } else {
+ qDebug("Warning! Restart operation without feature!");
+ return;
+ }
}
ModuleBase_Operation* anOperation = createOperation(theName.c_str(),
- theFeature ? aFeature->getKind() : "");
+ aFeature ? aFeature->getKind() : "");
PartSet_OperationSketchBase* aPreviewOp = dynamic_cast<PartSet_OperationSketchBase*>(anOperation);
if (aPreviewOp)
{
}
}
}
-/* FeaturePtr aFeature = aPrevOp->feature();
- if (aFeature) {
- std::list<ResultPtr> aResList = aFeature->results();
- std::list<ResultPtr>::iterator aIt;
- for (aIt = aResList.begin(); aIt != aResList.end(); ++aIt) {
- aDisplayer->deactivate((*aIt), false);
- }
- }
- }*/
ModelAPI_EventCreator::get()->sendUpdated(theFeature,
Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY));
// }
// }
}
-void PartSet_Module::onStorePoint2D(FeaturePtr theFeature, const std::string& theAttribute)
+void PartSet_Module::onStorePoint2D(ObjectPtr theFeature, const std::string& theAttribute)
{
+ FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(theFeature);
+
PartSet_OperationSketchBase* aPreviewOp = dynamic_cast<PartSet_OperationSketchBase*>(
myWorkshop->operationMgr()->currentOperation());
if (!aPreviewOp)
return;
boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
- boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(theFeature->data()->attribute(theAttribute));
+ boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aFeature->data()->attribute(theAttribute));
- PartSet_Tools::setConstraints(aPreviewOp->sketch(), theFeature, theAttribute,
+ PartSet_Tools::setConstraints(aPreviewOp->sketch(), aFeature, theAttribute,
aPoint->x(), aPoint->y());
}
Config_WidgetAPI* theWidgetApi, QList<ModuleBase_ModelWidget*>& theModelWidgets)
{
if (theType == "sketch-start-label") {
- PartSet_WidgetSketchLabel* aWgt = new PartSet_WidgetSketchLabel(theParent, theWidgetApi);
+ PartSet_WidgetSketchLabel* aWgt = new PartSet_WidgetSketchLabel(theParent, theWidgetApi, "");
aWgt->setOperationsMgr(myWorkshop->operationMgr());
theModelWidgets.append(aWgt);
return aWgt->getControl();
/// Slot which reacts to the point 2d set to the feature. Creates a constraint
/// \param the feature
/// \param the attribute of the feature
- void onStorePoint2D(FeaturePtr theFeature, const std::string& theAttribute);
+ void onStorePoint2D(ObjectPtr theFeature, const std::string& theAttribute);
protected:
/// Creates a new operation
}
}
ObjectPtr aFeature;
-/* TODO if (!theSelected.empty()) {
+ if (!theSelected.empty()) {
ModuleBase_ViewerPrs aPrs = theSelected.front();
aFeature = aPrs.object();
- } else*/
- aFeature = feature(); // for the widget distance only
+ } else
+ aFeature = feature(); // for the widget distance only
bool isApplyed = setWidgetValue(aFeature, aX, anY);
if (isApplyed) {
#include <QLabel>
PartSet_WidgetSketchLabel::PartSet_WidgetSketchLabel(QWidget* theParent,
- const Config_WidgetAPI* theData)
-: ModuleBase_ModelWidget(theParent, theData)
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
+: ModuleBase_ModelWidget(theParent, theData, theParentId)
{
myText = QString::fromStdString(theData->getProperty("title"));
myLabel = new QLabel(myText, theParent);
{
Q_OBJECT
public:
- PartSet_WidgetSketchLabel(QWidget* theParent, const Config_WidgetAPI* theData);
+ PartSet_WidgetSketchLabel(QWidget* theParent,
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId);
virtual ~PartSet_WidgetSketchLabel() {};
<group id="Constraints">
<feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points" internal="1"/>
+
<feature id="SketchConstraintDistance" title="Distance" tooltip="Create constraint for the distance from a point to an object">
<label title="Select point and another feature (point or point on line) between which to calculate distance" tooltip="Select point and another feature (point or point on line) between which to calculate distance"/>
- <feature_or_attribute_selector id="ConstraintEntityA" label="First point" tooltip="Select an point in the viewer" keysequence="SketchPoint Point2D"/>
- <feature_or_attribute_selector id="ConstraintEntityB" label="Last point" tooltip="Select an point in the viewer" keysequence="SketchPoint Point2D"/>
+ <feature_or_attribute_selector id="ConstraintEntityA" label="First point" tooltip="Select an point in the viewer">
+ <validator id="ModuleBase_ResulPointValidator"/>
+ </feature_or_attribute_selector>
+ <feature_or_attribute_selector id="ConstraintEntityB" label="Last point" tooltip="Select an point in the viewer">
+ <validator id="ModuleBase_ResulPointValidator"/>
+ </feature_or_attribute_selector>
<point_selector id="ConstraintFlyoutValuePnt" internal="1"/>
<doublevalue_editor label="Value" tooltip="Constraint value" id="ConstraintValue"/>
<validator id="PartSet_DistanceValidator"/>
</feature>
+
<feature id="SketchConstraintLength" title="Length" tooltip="Create constraint for the given length of a line segment">
<label title="Select a line on which to calculate lenght" tooltip="Select a line on which to calculate lenght"/>
- <feature_selector id="ConstraintEntityA" label="Line" tooltip="Select an line in the viewer" keysequence="SketchLine"/>
+ <feature_selector id="ConstraintEntityA" label="Line" tooltip="Select an line in the viewer">
+ <validator id="ModuleBase_ResulLineValidator"/>
+ </feature_selector>
<point_selector id="ConstraintFlyoutValuePnt" internal="1"/>
<doublevalue_editor label="Value" tooltip="Constraint value" id="ConstraintValue"/>
<validator id="PartSet_LengthValidator"/>
</feature>
+
<feature id="SketchConstraintRadius" title="Radius" tooltip="Create constraint for the given radius of a circle or an arc">
<label title="Select a circle or an arc on which to calculate radius" tooltip="Select a circle or an arc on which to calculate radius"/>
- <feature_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc in the viewer" keysequence="SketchCircle SketchArc"/>
+ <feature_selector id="ConstraintEntityA" label="Circle or Arc" tooltip="Select a circle or an arc in the viewer">
+ <validator id="ModuleBase_ResulArcValidator"/>
+ </feature_selector>
<point_selector id="ConstraintFlyoutValuePnt" internal="1"/>
<doublevalue_editor label="Value" tooltip="Constraint value" id="ConstraintValue"/>
<validator id="PartSet_RadiusValidator"/>
</feature>
+
<feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines">
- <feature_selector id="ConstraintEntityA" label="First line" tooltip="Select an line in the viewer" keysequence="SketchLine"/>
- <feature_selector id="ConstraintEntityB" label="Last line" tooltip="Select an line in the viewer" keysequence="SketchLine"/>
+ <feature_selector id="ConstraintEntityA" label="First line" tooltip="Select an line in the viewer">
+ <validator id="ModuleBase_ResulLineValidator"/>
+ </feature_selector>
+ <feature_selector id="ConstraintEntityB" label="Last line" tooltip="Select an line in the viewer">
+ <validator id="ModuleBase_ResulLineValidator"/>
+ </feature_selector>
<point_selector id="ConstraintFlyoutValuePnt" internal="1"/>
<validator id="PartSet_ParallelValidator"/>
</feature>
+
<feature id="SketchConstraintPerpendicular" title="Perpendicular" tooltip="Create constraint defining two perpendicular lines">
- <feature_selector id="ConstraintEntityA" label="First line" tooltip="Select an line in the viewer" keysequence="SketchLine"/>
- <feature_selector id="ConstraintEntityB" label="Last line" tooltip="Select an line in the viewer" keysequence="SketchLine"/>
+ <feature_selector id="ConstraintEntityA" label="First line" tooltip="Select an line in the viewer">
+ <validator id="ModuleBase_ResulLineValidator"/>
+ </feature_selector>
+ <feature_selector id="ConstraintEntityB" label="Last line" tooltip="Select an line in the viewer">
+ <validator id="ModuleBase_ResulLineValidator"/>
+ </feature_selector>
<point_selector id="ConstraintFlyoutValuePnt" internal="1"/>
<validator id="PartSet_PerpendicularValidator"/>
</feature>
ModuleBase_WidgetPoint2D* aPointWidget = dynamic_cast<ModuleBase_WidgetPoint2D*>(*anIt);
if (aPointWidget)
- connect(aPointWidget, SIGNAL(storedPoint2D(FeaturePtr, const std::string&)),
- this, SIGNAL(storedPoint2D(FeaturePtr, const std::string&)));
+ connect(aPointWidget, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)),
+ this, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)));
}
ModuleBase_ModelWidget* aLastWidget = theWidgets.last();
if (aLastWidget) {
/// Signal about the point 2d set to the feature
/// \param the feature
/// \param the attribute of the feature
- void storedPoint2D(FeaturePtr theFeature, const std::string& theAttribute);
+ void storedPoint2D(ObjectPtr theFeature, const std::string& theAttribute);
private:
QWidget* myCustomWidget;
#include <ModuleBase_Operation.h>
#include <ModuleBase_OperationDescription.h>
#include <ModuleBase_SelectionValidator.h>
+#include <ModuleBase_ResultValidators.h>
#include <Config_Common.h>
#include <Config_FeatureMessage.h>
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+ registerValidators();
activateModule();
if (myMainWindow) {
myMainWindow->show();
aCommand = aMenu->feature(theOperation->getDescription()->operationId());
}
//Abort operation on uncheck the command
- connect(aCommand, SIGNAL(triggered(bool)), theOperation, SLOT(setRunning(bool)));
+ if (aCommand)
+ connect(aCommand, SIGNAL(triggered(bool)), theOperation, SLOT(setRunning(bool)));
}
/*
aObjDock->setWindowTitle(tr("Object browser"));
aObjDock->setStyleSheet("::title { position: relative; padding-left: 5px; text-align: left center }");
myObjectBrowser = new XGUI_ObjectsBrowser(aObjDock);
- connect(myObjectBrowser, SIGNAL(activePartChanged(FeaturePtr)), this, SLOT(changeCurrentDocument(FeaturePtr)));
+ connect(myObjectBrowser, SIGNAL(activePartChanged(ObjectPtr)), this, SLOT(changeCurrentDocument(ObjectPtr)));
aObjDock->setWidget(myObjectBrowser);
myContextMenuMgr->connectObjectBrowser();
}
}
}
+
+
+//**************************************************************
+void XGUI_Workshop::registerValidators() const
+{
+ PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
+ ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
+
+ aFactory->registerValidator("ModuleBase_ResulPointValidator", new ModuleBase_ResulPointValidator);
+ aFactory->registerValidator("ModuleBase_ResulLineValidator", new ModuleBase_ResulLineValidator);
+ aFactory->registerValidator("ModuleBase_ResulArcValidator", new ModuleBase_ResulArcValidator);
+}
private:
void initMenu();
+ void registerValidators() const;
+
+
ModuleBase_IModule* loadModule(const QString& theModule);
bool activateModule();