Part: modernize C++: use override
This commit is contained in:
@@ -85,7 +85,7 @@ class AbstractPrimitive : public QObject
|
||||
|
||||
public:
|
||||
AbstractPrimitive(Part::Primitive* feature = nullptr);
|
||||
virtual ~AbstractPrimitive() = default;
|
||||
~AbstractPrimitive() override = default;
|
||||
|
||||
bool hasValidPrimitive() const;
|
||||
virtual const char* getDefaultName() const = 0;
|
||||
|
||||
@@ -79,7 +79,7 @@ protected:
|
||||
void setGridLineColor(const App::Color & color);
|
||||
void setGridDivLineColor(const App::Color & color);
|
||||
|
||||
virtual bool extensionHandleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override;
|
||||
bool extensionHandleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Gui/ViewProviderGeometryObject.h>
|
||||
#include <Gui/ViewProviderBuilder.h>
|
||||
#include <Mod/Part/PartGlobal.h>
|
||||
#include <map>
|
||||
|
||||
class TopoDS_Shape;
|
||||
@@ -51,13 +52,13 @@ namespace PartGui {
|
||||
|
||||
class PartGuiExport ViewProviderPartReference : public Gui::ViewProviderGeometryObject
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderPartReference);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(PartGui::ViewProviderPartReference);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderPartReference();
|
||||
/// destructor
|
||||
virtual ~ViewProviderPartReference();
|
||||
~ViewProviderPartReference() override;
|
||||
|
||||
// Display properties
|
||||
//App::PropertyFloatConstraint LineWidth;
|
||||
@@ -70,18 +71,18 @@ public:
|
||||
//App::PropertyEnumeration Lighting;
|
||||
|
||||
|
||||
virtual void attach(App::DocumentObject *);
|
||||
virtual void setDisplayMode(const char* ModeName);
|
||||
void attach(App::DocumentObject *) override;
|
||||
void setDisplayMode(const char* ModeName) override;
|
||||
/// returns a list of all possible modes
|
||||
virtual std::vector<std::string> getDisplayModes(void) const;
|
||||
std::vector<std::string> getDisplayModes() const override;
|
||||
/// Update the view representation
|
||||
void reload();
|
||||
|
||||
virtual void updateData(const App::Property*);
|
||||
void updateData(const App::Property*) override;
|
||||
|
||||
protected:
|
||||
/// get called by the container whenever a property has been changed
|
||||
virtual void onChanged(const App::Property* prop);
|
||||
void onChanged(const App::Property* prop) override;
|
||||
//bool loadParameter();
|
||||
|
||||
// nodes for the data representation
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace PartDesign
|
||||
|
||||
class PartDesignExport Mirrored : public PartDesign::Transformed
|
||||
{
|
||||
PROPERTY_HEADER(PartDesign::Mirrored);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(PartDesign::Mirrored);
|
||||
|
||||
public:
|
||||
Mirrored();
|
||||
@@ -41,10 +41,10 @@ public:
|
||||
|
||||
/** @name methods override feature */
|
||||
//@{
|
||||
short mustExecute() const;
|
||||
short mustExecute() const override;
|
||||
|
||||
/// returns the type name of the view provider
|
||||
const char* getViewProviderName() const {
|
||||
const char* getViewProviderName() const override {
|
||||
return "PartDesignGui::ViewProviderMirrored";
|
||||
}
|
||||
//@}
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
* If MirrorPlane contains a feature and a face name, then the mirror plane will be
|
||||
* the given face, which must be planar
|
||||
*/
|
||||
const std::list<gp_Trsf> getTransformations(const std::vector<App::DocumentObject*>);
|
||||
const std::list<gp_Trsf> getTransformations(const std::vector<App::DocumentObject*>) override;
|
||||
};
|
||||
|
||||
} //namespace PartDesign
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
* Allow the user to pick only edges or faces (or both) from the defined support
|
||||
* Optionally restrict the selection to planar edges/faces
|
||||
*/
|
||||
bool allow(App::Document* pDoc, App::DocumentObject* pObj, const char* sSubName);
|
||||
bool allow(App::Document* pDoc, App::DocumentObject* pObj, const char* sSubName) override;
|
||||
|
||||
private:
|
||||
PartDesign::Body* getBody() const;
|
||||
|
||||
Reference in New Issue
Block a user