/// Overloaded method. Defines how to process each node
virtual void processNode(xmlNodePtr aNode);
- /// Overloaded method. Clears attribute cache on extit from attribute's node
+ /// Overloaded method. Clears attribute cache on exit from attribute's node
virtual void cleanup(xmlNodePtr aNode);
/// Overloaded method. Defines if the given node should be parsed recursively
virtual bool processChildren(xmlNodePtr aNode);
/// Fills feature message
- void fillFeature(xmlNodePtr theRoot,
+ void fillFeature(xmlNodePtr theRoot,
const std::shared_ptr<Config_FeatureMessage>& outFeatureMessage);
private:
}
// Check if shape is valid
if ( aShape.IsNull() ) {
- const static std::string aShapeError =
- "An error occurred while importing " + theFileName + ": " + anError.ToCString();
- setError(aShapeError);
- return false;
- }
+ const static std::string aShapeError =
+ "An error occurred while importing " + theFileName + ": " + anError.ToCString();
+ setError(aShapeError);
+ return false;
+ }
// Pass the results into the model
std::string anObjectName = aPath.Name().ToCString();
}
break;
}
- // register name
+ // register name
// aDoc->addNamingName(selectionLabel(), aName);
// the selected sub-shape will not be shared and as result it will not require registration
}
const std::string& theSubShapeName, Handle(TNaming_NamedShape) theNS)
{
TopoDS_Shape aSelection;
- std::string::size_type n = theSubShapeName.rfind('/');
+ std::string::size_type n = theSubShapeName.rfind('/');
if (n == std::string::npos) n = 0;
std::string aSubString = theSubShapeName.substr(n + 1);
n = aSubString.rfind('_');
//! Internal sub-document by ID
MODEL_EXPORT virtual std::shared_ptr<Model_Document> subDoc(std::string theDocID);
- ///! Returns the id of hte document
+ ///! Returns the id of the document
MODEL_EXPORT virtual const std::string& id() const
{
return myID;
///! Returns all (and disabled) results of the given type. Not fast method (iterates all features).
void allResults(const std::string& theGroupID, std::list<ResultPtr>& theResults);
- /// Creates a construction cresults
+ /// Creates a construction results
std::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
/// Creates a body results
myIsParamUpdated = true;
}
// created objects are always must be up to date (python box feature)
- // and updated not in internal uptation chain
+ // and updated not in internal updating chain
if (theMessage->eventID() == kCreatedEvent) {
myJustCreated.insert(*anObjIter);
} else if (myJustCreated.find(*anObjIter) == myJustCreated.end()) { // moved and updated
myJustUpdated.insert(*anObjIter);
}
}
- // this event is for solver update, not here, do not react immideately
+ // this event is for solver update, not here, do not react immediately
if (!isOnlyResults && !(theMessage->eventID() == kMovedEvent))
processOperation(false);
} else if (theMessage->eventID() == kOpStartEvent) {
virtual void setValue(
const ResultPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape) = 0;
- /// Returns the selected subshape
+ /// Returns the selected sub-shape
virtual std::shared_ptr<GeomAPI_Shape> value() = 0;
/// Returns the context of the selection (the whole shape owner)
/// Returns an id of the selection
virtual int Id() = 0;
-
/// Selects sub-shape by the textual Name
virtual void selectSubShape(const std::string& theType, const std::string& theSubShapeName) = 0;
/// The type of shape is taken from the current selection type
virtual void append(std::string theNamingName) = 0;
- /// Returns the number ofselection attributes in the list
+ /// Returns the number of selection attributes in the list
virtual int size() = 0;
/// The type of all elements selection
virtual void referencesToObjects(
std::list<std::pair<std::string, std::list<std::shared_ptr<ModelAPI_Object> > > >& theRefs) =0;
- /// Copies all atributes content into theTarget data
+ /// Copies all attributes content into theTarget data
virtual void copyTo(std::shared_ptr<ModelAPI_Data> theTarget) = 0;
/// Returns the invalid data pointer (to avoid working with NULL shared ptrs in swig)
{
std::shared_ptr<ModelAPI_Data> myData; ///< manager of the data model of a feature
std::shared_ptr<ModelAPI_Document> myDoc; ///< document this object belongs to
- public:
+public:
/// By default object is displayed in the object browser.
MODELAPI_EXPORT virtual bool isInHistory();
/// Returns the result is disabled or not.
MODELAPI_EXPORT virtual bool isDisabled() const;
- // Retuns the parameters of color definition in the resources config manager
+ // Returns the parameters of color definition in the resources config manager
virtual void colorConfigInfo(std::string& theSection, std::string& theName,
- std::string& theDefault) {}
+ std::string& theDefault) {}
/// Request for initialization of data model of the result: adding all attributes
virtual void initAttributes() {};
/// Stores the generated shape (called by the execution method).
virtual void storeGenerated(const std::shared_ptr<GeomAPI_Shape>& theFromShape,
- const std::shared_ptr<GeomAPI_Shape>& theToShape) = 0;
+ const std::shared_ptr<GeomAPI_Shape>& theToShape) = 0;
/// Stores the modified shape (called by the execution method).
virtual void storeModified(const std::shared_ptr<GeomAPI_Shape>& theOldShape,
- const std::shared_ptr<GeomAPI_Shape>& theNewShape) = 0;
+ const std::shared_ptr<GeomAPI_Shape>& theNewShape) = 0;
/// Records the subshape newShape which was generated during a topological construction.
/// As an example, consider the case of a face generated in construction of a box.
/// As an example, consider the case of a face removed by a Boolean operation.
virtual void deleted(
const std::shared_ptr<GeomAPI_Shape>& theOldShape, const int theTag = 1) = 0;
-
+
/// load deleted shapes
virtual void loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS,
- std::shared_ptr<GeomAPI_Shape> theShapeIn,
- const int theKindOfShape,
- const int theTag) = 0;
+ std::shared_ptr<GeomAPI_Shape> theShapeIn,
+ const int theKindOfShape,
+ const int theTag) = 0;
/// load and orient modified shapes
- virtual void loadAndOrientModifiedShapes (
- GeomAlgoAPI_MakeShape* theMS,
- std::shared_ptr<GeomAPI_Shape> theShapeIn,
- const int theKindOfShape,
- const int theTag,
- const std::string& theName,
- GeomAPI_DataMapOfShapeShape& theSubShapes) = 0;
+ virtual void loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS,
+ std::shared_ptr<GeomAPI_Shape> theShapeIn,
+ const int theKindOfShape,
+ const int theTag,
+ const std::string& theName,
+ GeomAPI_DataMapOfShapeShape& theSubShapes) = 0;
/// load and orient generated shapes
- virtual void loadAndOrientGeneratedShapes (
- GeomAlgoAPI_MakeShape* theMS,
- std::shared_ptr<GeomAPI_Shape> theShapeIn,
- const int theKindOfShape,
- const int theTag,
- const std::string& theName,
- GeomAPI_DataMapOfShapeShape& theSubShapes) = 0;
+ virtual void loadAndOrientGeneratedShapes (GeomAlgoAPI_MakeShape* theMS,
+ std::shared_ptr<GeomAPI_Shape> theShapeIn,
+ const int theKindOfShape,
+ const int theTag,
+ const std::string& theName,
+ GeomAPI_DataMapOfShapeShape& theSubShapes) = 0;
/// load shapes of the first level (to be used during shape import)
virtual void loadFirstLevel(std::shared_ptr<GeomAPI_Shape> theShape, const std::string& theName, int& theTag) = 0;
-
+
/// load disconnected edges
virtual void loadDisconnectedEdges(std::shared_ptr<GeomAPI_Shape> theShape, const std::string& theName, int& theTag) = 0;
//! Closes all documents
virtual void closeAll() = 0;
- //! Starts a new operation (opens a tansaction)
+ //! Starts a new operation (opens a transaction)
//! \param theId of operation for history (optional)
virtual void startOperation(const std::string& theId = "") = 0;
//! Finishes the previously started operation (closes the transaction)
/// Copies the document to the new one with the given id
virtual std::shared_ptr<ModelAPI_Document> copy(std::shared_ptr<ModelAPI_Document> theSource,
- std::string theID) = 0;
+ std::string theID) = 0;
/// Returns the validators factory: the only one instance per application
virtual ModelAPI_ValidatorsFactory* validators() = 0;
/**
* \ingroup GUI
- * Class which provides access to Workshop object serveces
+ * Class which provides access to Workshop object services
*/
class MODULEBASE_EXPORT ModuleBase_IWorkshop : public QObject
{
//! Returns the factory of selection filters : the only one instance per application
ModuleBase_FilterFactory* selectionFilters() const;
-
+
//! Returns currently active operation
virtual ModuleBase_Operation* currentOperation() const = 0;
//! Returns true if the operation with id theId can be started
virtual bool canStartOperation(QString theId) = 0;
- //! Returns AIS opbject by data object
+ //! Returns AIS object by data object
virtual AISObjectPtr findPresentation(const ObjectPtr& theObject) const = 0;
//! Returns data object by AIS
virtual void setSelected(const QList<ModuleBase_ViewerPrs>& theValues) = 0;
signals:
- /// Signal selection chaged.
+ /// Signal selection changed.
void selectionChanged();
/// Signal which is emited after activation of property panel
public:
/// Constructor
/// \param theParent the parent object
- /// \param theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theData the widget configuration. The attribute of the model widget is obtained from
/// \param theParentId is Id of a parent of the current attribute
ModuleBase_ModelWidget(QWidget* theParent, const Config_WidgetAPI* theData,
const std::string& theParentId);
/// \return the state whether the widget can accept the focus
virtual bool focusTo();
- /// The methiod called when widget is activated
+ /// The method called when widget is activated
void activate();
- /// The methiod called when widget is deactivated
+ /// The method called when widget is deactivated
virtual void deactivate() {}
/// Returns list of widget controls
void focusOutWidget(ModuleBase_ModelWidget* theWidget);
protected:
- /// Sets default value of widget. Nornaly, widget should fetch this value
+ /// Sets default value of widget. Normally, widget should fetch this value
/// from the xml. However, some widgets derived widgets could define it
void setDefaultValue(const std::string& theValue);
/// \brief Set the attribute name
/// \return True in success
virtual bool storeValueCustom() const = 0;
- /// The methiod called when widget is activated
+ /// The method called when widget is activated
virtual void activateCustom() {};
/// Sends Update and Redisplay for the given object
protected:
/// The attribute name of the model feature
- std::string myAttributeID;
+ std::string myAttributeID;
/// Name of parent
- std::string myParentId;
+ std::string myParentId;
/// A feature which is processing by active operation
- FeaturePtr myFeature;
+ FeaturePtr myFeature;
/// Flag which shows that current operation is in editing mode
- bool myIsEditing;
+ bool myIsEditing;
/// Flag which shows whether current widget is obligatory
/// The non-obligatory widgets should not accept the focus in the property panel
private:
/// Value should be computed on execute, like radius for circle's constraint (can not be zero)
- bool myIsComputedDefault;
-
+ bool myIsComputedDefault;
+
/// the default value, which is defined in the XML for this attribute
std::string myDefaultValue;
* <validator id="ExchangePlugin_ImportFormat" parameters="BREP:BREPImport,STEP:STEPImport" />
* </file_selector>
* \endcode
+* It can use following parameters:
+* - id - name of object attribute
+* - type - type of dialog. Possible values: open, save.
*/
class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelWidget
{
public:
/// Constructor
/// \param theParent the parent object
- /// \param theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theData the widget configuration. The attribute of the model widget is obtained from
/// \param theParentId is Id of a parent of the current attribute
ModuleBase_WidgetFileSelector(QWidget* theParent,
const Config_WidgetAPI* theData,
aMainLay->addWidget(aTypeLabel, 0, 0);
myTypeCombo = new QComboBox(this);
- // There is no sence to paramerize list of types while we can not parametrize selection mode
+ // There is no sense to parameterize list of types while we can not parameterize selection mode
myShapeValidator = new GeomValidators_ShapeType();
TopAbs_ShapeEnum aCurrentType =
ModuleBase_Tools::shapeType(myTypeCombo->currentText());
aSelectionListAttr->setSelectionType(myTypeCombo->currentText().toStdString());
- }
- return true;
+ }
+ return true;
}
//********************************************************************
}
}
emit valuesChanged();
- // the updateObject method should be called to flush the updated sigal. The workshop listens it,
+ // the updateObject method should be called to flush the updated signal. The workshop listens it,
// calls validators for the feature and, as a result, updates the Apply button state.
updateObject(myFeature);
void ModuleBase_WidgetMultiSelector::setCurrentShapeType(const TopAbs_ShapeEnum theShapeType)
{
QString aShapeTypeName;
-
+
for (int idx = 0; idx < myTypeCombo->count(); ++idx) {
aShapeTypeName = myTypeCombo->itemText(idx);
TopAbs_ShapeEnum aRefType = ModuleBase_Tools::shapeType(aShapeTypeName);
* tooltip="Select a set of objects"
* type_choice="Vertices Edges Faces Solids" />
* \endcode
-* It uses folloing parameters:
+* It uses following parameters:
* - id - is a name of corresponded attribute
* - tooltip - a tooltip for the widget
* - type_choice - list of expected shape types.
/// Constructor
/// \param theParent the parent object
/// \param theWorkshop instance of workshop interface
- /// \param theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theData the widget configuration. The attribute of the model widget is obtained from
/// \param theParentId is Id of a parent of the current attribute
ModuleBase_WidgetMultiSelector(QWidget* theParent,
ModuleBase_IWorkshop* theWorkshop,
virtual bool eventFilter(QObject* , QEvent* );
- /// The methiod called when widget is deactivated
+ /// The method called when widget is deactivated
virtual void deactivate();
/// Set the given wrapped value to the current widget
void onListSelection();
protected:
- /// The methiod called when widget is activated
+ /// The method called when widget is activated
virtual void activateCustom();
/// Saves the internal parameters to the given feature
/**
* \ingroup GUI
-* Implements a model widget for swithch as a container widget. It can be defined in XML with "switch" keyword
+* Implements a model widget for switch as a container widget. It can be defined in XML with "switch" keyword
*/
class MODULEBASE_EXPORT ModuleBase_WidgetSwitch : public ModuleBase_PagedContainer
{
/**
* \ingroup Modules
-* Customosation of ModuleBase_WidgetEditor in order to do not show the editor value if the mouse
+* Customization of ModuleBase_WidgetEditor in order to do not show the editor value if the mouse
* cursor is not over the OCC window
*/
class PARTSET_EXPORT PartSet_WidgetEditor : public ModuleBase_WidgetEditor
/// Constructor
/// \param theParent the parent object
/// \param theWorkshop instance of workshop interface
- /// \param theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theData the widget configuration. The attribute of the model widget is obtained from
/// \param theParentId is Id of a parent of the current attribute
PartSet_WidgetEditor(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
const Config_WidgetAPI* theData, const std::string& theParentId);
ModuleBase_IWorkshop* myWorkshop; // the current workshop
};
-#endif
\ No newline at end of file
+#endif