From 5abee1d5aa24e1c1e09420c2bb98e52b75e8d549 Mon Sep 17 00:00:00 2001 From: Sergey POKHODENKO Date: Thu, 14 May 2015 14:17:32 +0300 Subject: [PATCH] Spell-checking --- src/Config/Config_FeatureReader.h | 4 +- .../ExchangePlugin_ImportFeature.cpp | 10 ++--- src/Model/Model_AttributeSelection.cpp | 4 +- src/Model/Model_Document.h | 2 +- src/Model/Model_Objects.h | 2 +- src/Model/Model_Update.cpp | 4 +- src/ModelAPI/ModelAPI_AttributeSelection.h | 3 +- .../ModelAPI_AttributeSelectionList.h | 2 +- src/ModelAPI/ModelAPI_Data.h | 2 +- src/ModelAPI/ModelAPI_Object.h | 2 +- src/ModelAPI/ModelAPI_Result.h | 4 +- src/ModelAPI/ModelAPI_ResultBody.h | 40 +++++++++---------- src/ModelAPI/ModelAPI_Session.h | 4 +- src/ModuleBase/ModuleBase_IWorkshop.h | 8 ++-- src/ModuleBase/ModuleBase_ModelWidget.h | 22 +++++----- .../ModuleBase_WidgetFileSelector.h | 5 ++- .../ModuleBase_WidgetMultiSelector.cpp | 10 ++--- .../ModuleBase_WidgetMultiSelector.h | 8 ++-- src/ModuleBase/ModuleBase_WidgetSwitch.h | 2 +- src/PartSet/PartSet_WidgetEditor.h | 6 +-- 20 files changed, 72 insertions(+), 72 deletions(-) diff --git a/src/Config/Config_FeatureReader.h b/src/Config/Config_FeatureReader.h index a0952ec1b..8a976a59a 100644 --- a/src/Config/Config_FeatureReader.h +++ b/src/Config/Config_FeatureReader.h @@ -39,14 +39,14 @@ class Config_FeatureReader : public Config_XMLReader /// 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& outFeatureMessage); private: diff --git a/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp index 4644e3a45..364f57465 100644 --- a/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp @@ -95,11 +95,11 @@ bool ExchangePlugin_ImportFeature::importFile(const std::string& theFileName) } // 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(); diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 4818b3a57..8356ed7e0 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -854,7 +854,7 @@ std::string Model_AttributeSelection::namingName(const std::string& theDefaultNa } 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 } @@ -897,7 +897,7 @@ const TopoDS_Shape getShapeFromNS( 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('_'); diff --git a/src/Model/Model_Document.h b/src/Model/Model_Document.h index 7969d1724..41eac2c15 100644 --- a/src/Model/Model_Document.h +++ b/src/Model/Model_Document.h @@ -106,7 +106,7 @@ class Model_Document : public ModelAPI_Document //! Internal sub-document by ID MODEL_EXPORT virtual std::shared_ptr 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; diff --git a/src/Model/Model_Objects.h b/src/Model/Model_Objects.h index ef1d403b6..61bc125a6 100644 --- a/src/Model/Model_Objects.h +++ b/src/Model/Model_Objects.h @@ -86,7 +86,7 @@ class Model_Objects ///! Returns all (and disabled) results of the given type. Not fast method (iterates all features). void allResults(const std::string& theGroupID, std::list& theResults); - /// Creates a construction cresults + /// Creates a construction results std::shared_ptr createConstruction( const std::shared_ptr& theFeatureData, const int theIndex = 0); /// Creates a body results diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index d3cc6c9c1..e937f38ef 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -98,14 +98,14 @@ void Model_Update::processEvent(const std::shared_ptr& theMessag 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) { diff --git a/src/ModelAPI/ModelAPI_AttributeSelection.h b/src/ModelAPI/ModelAPI_AttributeSelection.h index 71c850e59..6b5af818c 100644 --- a/src/ModelAPI/ModelAPI_AttributeSelection.h +++ b/src/ModelAPI/ModelAPI_AttributeSelection.h @@ -22,7 +22,7 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute virtual void setValue( const ResultPtr& theContext, const std::shared_ptr& theSubShape) = 0; - /// Returns the selected subshape + /// Returns the selected sub-shape virtual std::shared_ptr value() = 0; /// Returns the context of the selection (the whole shape owner) @@ -48,7 +48,6 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute /// 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; diff --git a/src/ModelAPI/ModelAPI_AttributeSelectionList.h b/src/ModelAPI/ModelAPI_AttributeSelectionList.h index 170efc09a..7994c37a6 100644 --- a/src/ModelAPI/ModelAPI_AttributeSelectionList.h +++ b/src/ModelAPI/ModelAPI_AttributeSelectionList.h @@ -27,7 +27,7 @@ class ModelAPI_AttributeSelectionList : public ModelAPI_Attribute /// 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 diff --git a/src/ModelAPI/ModelAPI_Data.h b/src/ModelAPI/ModelAPI_Data.h index e57aaec10..417098a33 100644 --- a/src/ModelAPI/ModelAPI_Data.h +++ b/src/ModelAPI/ModelAPI_Data.h @@ -141,7 +141,7 @@ class MODELAPI_EXPORT ModelAPI_Data virtual void referencesToObjects( std::list > > >& theRefs) =0; - /// Copies all atributes content into theTarget data + /// Copies all attributes content into theTarget data virtual void copyTo(std::shared_ptr theTarget) = 0; /// Returns the invalid data pointer (to avoid working with NULL shared ptrs in swig) diff --git a/src/ModelAPI/ModelAPI_Object.h b/src/ModelAPI/ModelAPI_Object.h index 9d1d04c39..d489a955b 100644 --- a/src/ModelAPI/ModelAPI_Object.h +++ b/src/ModelAPI/ModelAPI_Object.h @@ -28,7 +28,7 @@ class ModelAPI_Object { std::shared_ptr myData; ///< manager of the data model of a feature std::shared_ptr myDoc; ///< document this object belongs to - public: +public: /// By default object is displayed in the object browser. MODELAPI_EXPORT virtual bool isInHistory(); diff --git a/src/ModelAPI/ModelAPI_Result.h b/src/ModelAPI/ModelAPI_Result.h index 9889e4884..6a96d373b 100644 --- a/src/ModelAPI/ModelAPI_Result.h +++ b/src/ModelAPI/ModelAPI_Result.h @@ -55,9 +55,9 @@ class ModelAPI_Result : public ModelAPI_Object /// 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() {}; diff --git a/src/ModelAPI/ModelAPI_ResultBody.h b/src/ModelAPI/ModelAPI_ResultBody.h index ff4ce6e19..edc4847b7 100644 --- a/src/ModelAPI/ModelAPI_ResultBody.h +++ b/src/ModelAPI/ModelAPI_ResultBody.h @@ -41,11 +41,11 @@ public: /// Stores the generated shape (called by the execution method). virtual void storeGenerated(const std::shared_ptr& theFromShape, - const std::shared_ptr& theToShape) = 0; + const std::shared_ptr& theToShape) = 0; /// Stores the modified shape (called by the execution method). virtual void storeModified(const std::shared_ptr& theOldShape, - const std::shared_ptr& theNewShape) = 0; + const std::shared_ptr& 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. @@ -67,32 +67,30 @@ public: /// As an example, consider the case of a face removed by a Boolean operation. virtual void deleted( const std::shared_ptr& theOldShape, const int theTag = 1) = 0; - + /// load deleted shapes virtual void loadDeletedShapes (GeomAlgoAPI_MakeShape* theMS, - std::shared_ptr theShapeIn, - const int theKindOfShape, - const int theTag) = 0; + std::shared_ptr theShapeIn, + const int theKindOfShape, + const int theTag) = 0; /// load and orient modified shapes - virtual void loadAndOrientModifiedShapes ( - GeomAlgoAPI_MakeShape* theMS, - std::shared_ptr theShapeIn, - const int theKindOfShape, - const int theTag, - const std::string& theName, - GeomAPI_DataMapOfShapeShape& theSubShapes) = 0; + virtual void loadAndOrientModifiedShapes (GeomAlgoAPI_MakeShape* theMS, + std::shared_ptr 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 theShapeIn, - const int theKindOfShape, - const int theTag, - const std::string& theName, - GeomAPI_DataMapOfShapeShape& theSubShapes) = 0; + virtual void loadAndOrientGeneratedShapes (GeomAlgoAPI_MakeShape* theMS, + std::shared_ptr 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 theShape, const std::string& theName, int& theTag) = 0; - + /// load disconnected edges virtual void loadDisconnectedEdges(std::shared_ptr theShape, const std::string& theName, int& theTag) = 0; diff --git a/src/ModelAPI/ModelAPI_Session.h b/src/ModelAPI/ModelAPI_Session.h index 47f607181..d355addae 100644 --- a/src/ModelAPI/ModelAPI_Session.h +++ b/src/ModelAPI/ModelAPI_Session.h @@ -44,7 +44,7 @@ class MODELAPI_EXPORT ModelAPI_Session //! 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) @@ -98,7 +98,7 @@ class MODELAPI_EXPORT ModelAPI_Session /// Copies the document to the new one with the given id virtual std::shared_ptr copy(std::shared_ptr theSource, - std::string theID) = 0; + std::string theID) = 0; /// Returns the validators factory: the only one instance per application virtual ModelAPI_ValidatorsFactory* validators() = 0; diff --git a/src/ModuleBase/ModuleBase_IWorkshop.h b/src/ModuleBase/ModuleBase_IWorkshop.h index 229b6e2e3..48bc23a15 100644 --- a/src/ModuleBase/ModuleBase_IWorkshop.h +++ b/src/ModuleBase/ModuleBase_IWorkshop.h @@ -26,7 +26,7 @@ class ModuleBase_FilterFactory; /** * \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 { @@ -64,14 +64,14 @@ Q_OBJECT //! 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 @@ -82,7 +82,7 @@ Q_OBJECT virtual void setSelected(const QList& theValues) = 0; signals: - /// Signal selection chaged. + /// Signal selection changed. void selectionChanged(); /// Signal which is emited after activation of property panel diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 615fdb152..6ba89d2cc 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -34,7 +34,7 @@ Q_OBJECT 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); @@ -95,10 +95,10 @@ Q_OBJECT /// \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 @@ -166,7 +166,7 @@ signals: 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 @@ -184,7 +184,7 @@ signals: /// \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 @@ -202,16 +202,16 @@ protected slots: 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 @@ -219,8 +219,8 @@ protected slots: 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; diff --git a/src/ModuleBase/ModuleBase_WidgetFileSelector.h b/src/ModuleBase/ModuleBase_WidgetFileSelector.h index ae2d0daa7..8b5987fa0 100644 --- a/src/ModuleBase/ModuleBase_WidgetFileSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetFileSelector.h @@ -33,6 +33,9 @@ class QLineEdit; * * * \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 { @@ -40,7 +43,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW 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, diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 45b7a2053..53754fab0 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -50,7 +50,7 @@ ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParen 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(); @@ -152,8 +152,8 @@ bool ModuleBase_WidgetMultiSelector::storeValueCustom() const TopAbs_ShapeEnum aCurrentType = ModuleBase_Tools::shapeType(myTypeCombo->currentText()); aSelectionListAttr->setSelectionType(myTypeCombo->currentText().toStdString()); - } - return true; + } + return true; } //******************************************************************** @@ -392,7 +392,7 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged() } } 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); @@ -406,7 +406,7 @@ void ModuleBase_WidgetMultiSelector::onSelectionChanged() 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); diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h index 42ca970a5..0aee58849 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h @@ -43,7 +43,7 @@ class QAction; * 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. @@ -55,7 +55,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Widge /// 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, @@ -74,7 +74,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Widge 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 @@ -102,7 +102,7 @@ protected slots: 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 diff --git a/src/ModuleBase/ModuleBase_WidgetSwitch.h b/src/ModuleBase/ModuleBase_WidgetSwitch.h index 5772a3d08..ff422b9b0 100644 --- a/src/ModuleBase/ModuleBase_WidgetSwitch.h +++ b/src/ModuleBase/ModuleBase_WidgetSwitch.h @@ -18,7 +18,7 @@ class QStackedLayout; /** * \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 { diff --git a/src/PartSet/PartSet_WidgetEditor.h b/src/PartSet/PartSet_WidgetEditor.h index a4f611146..3536ebfaf 100644 --- a/src/PartSet/PartSet_WidgetEditor.h +++ b/src/PartSet/PartSet_WidgetEditor.h @@ -16,7 +16,7 @@ class ModuleBase_IWorkshop; /** * \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 @@ -26,7 +26,7 @@ Q_OBJECT /// 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); @@ -42,4 +42,4 @@ private: ModuleBase_IWorkshop* myWorkshop; // the current workshop }; -#endif \ No newline at end of file +#endif -- 2.39.2