TD: modernize C++: use override
This commit is contained in:
@@ -41,7 +41,7 @@ class TechDrawExport DrawComplexSection: public DrawViewSection
|
||||
|
||||
public:
|
||||
DrawComplexSection();
|
||||
~DrawComplexSection() = default;
|
||||
~DrawComplexSection() override = default;
|
||||
|
||||
App::PropertyLink CuttingToolWireObject;
|
||||
App::PropertyEnumeration ProjectionStrategy;//Offset or Aligned
|
||||
|
||||
@@ -54,7 +54,7 @@ class TechDrawExport DrawGeomHatch : public App::DocumentObject
|
||||
|
||||
public:
|
||||
DrawGeomHatch();
|
||||
~DrawGeomHatch() = default;
|
||||
~DrawGeomHatch() override = default;
|
||||
|
||||
App::PropertyLinkSub Source; //the dvX & face(s) this crosshatch belongs to
|
||||
App::PropertyFile FilePattern;
|
||||
|
||||
@@ -40,7 +40,7 @@ class TechDrawExport DrawLeaderLine : public TechDraw::DrawView
|
||||
|
||||
public:
|
||||
DrawLeaderLine();
|
||||
~DrawLeaderLine() = default;
|
||||
~DrawLeaderLine() override = default;
|
||||
|
||||
App::PropertyLink LeaderParent;
|
||||
App::PropertyVectorList WayPoints;
|
||||
|
||||
@@ -43,31 +43,31 @@ namespace TechDraw
|
||||
|
||||
class TechDrawExport DrawParametricTemplate: public TechDraw::DrawTemplate
|
||||
{
|
||||
PROPERTY_HEADER(TechDraw::DrawParametricTemplate);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::DrawParametricTemplate);
|
||||
|
||||
public:
|
||||
DrawParametricTemplate(); /// Constructor
|
||||
~DrawParametricTemplate();
|
||||
~DrawParametricTemplate() override;
|
||||
|
||||
App::PropertyFile Template;
|
||||
|
||||
/** @name methods override Feature */
|
||||
//@{
|
||||
/// recalculate the Feature
|
||||
virtual App::DocumentObjectExecReturn *execute();
|
||||
App::DocumentObjectExecReturn *execute() override;
|
||||
//@}
|
||||
|
||||
|
||||
short mustExecute() const;
|
||||
short mustExecute() const override;
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName() const {
|
||||
const char* getViewProviderName() const override {
|
||||
return "TechDrawGui::ViewProviderTemplate";
|
||||
}
|
||||
|
||||
// from base class
|
||||
virtual PyObject *getPyObject();
|
||||
virtual unsigned int getMemSize() const;
|
||||
PyObject *getPyObject() override;
|
||||
unsigned int getMemSize() const override;
|
||||
|
||||
public:
|
||||
std::vector<TechDraw::BaseGeomPtr> getGeometry() { return geom; }
|
||||
@@ -76,11 +76,11 @@ public:
|
||||
// Template Drawing Methods
|
||||
int drawLine(double x1, double y1, double x2, double y2);
|
||||
|
||||
double getHeight() const;
|
||||
double getWidth() const;
|
||||
double getHeight() const override;
|
||||
double getWidth() const override;
|
||||
|
||||
protected:
|
||||
void onChanged(const App::Property* prop);
|
||||
void onChanged(const App::Property* prop) override;
|
||||
|
||||
protected:
|
||||
std::vector<TechDraw::BaseGeomPtr> geom;
|
||||
|
||||
@@ -55,7 +55,7 @@ class TechDrawExport DrawProjGroup : public TechDraw::DrawViewCollection
|
||||
public:
|
||||
/// Constructor
|
||||
DrawProjGroup();
|
||||
~DrawProjGroup() = default;
|
||||
~DrawProjGroup() override = default;
|
||||
|
||||
App::PropertyLinkList Source;
|
||||
App::PropertyXLinkList XSource;
|
||||
|
||||
@@ -55,7 +55,7 @@ class TechDrawExport DrawProjGroupItem : public TechDraw::DrawViewPart
|
||||
public:
|
||||
/// Constructor
|
||||
DrawProjGroupItem();
|
||||
~DrawProjGroupItem() = default;
|
||||
~DrawProjGroupItem() override = default;
|
||||
|
||||
App::PropertyEnumeration Type;
|
||||
App::PropertyVector RotationVector; //this is superseded by dvp xdirection
|
||||
|
||||
@@ -39,7 +39,7 @@ class TechDrawExport DrawRichAnno : public TechDraw::DrawView
|
||||
|
||||
public:
|
||||
DrawRichAnno();
|
||||
~DrawRichAnno() = default;
|
||||
~DrawRichAnno() override = default;
|
||||
|
||||
App::PropertyLink AnnoParent;
|
||||
App::PropertyString AnnoText;
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
}
|
||||
|
||||
// from base class
|
||||
virtual PyObject *getPyObject(void) override;
|
||||
PyObject *getPyObject(void) override;
|
||||
|
||||
private:
|
||||
static const char* OrientationEnums[];
|
||||
|
||||
@@ -39,7 +39,7 @@ class TechDrawExport DrawTile : public App::DocumentObject
|
||||
|
||||
public:
|
||||
DrawTile();
|
||||
~DrawTile() = default;
|
||||
~DrawTile() override = default;
|
||||
|
||||
App::PropertyLink TileParent; //eg DrawWeldSymbol
|
||||
App::PropertyIntegerConstraint TileRow;
|
||||
|
||||
@@ -42,7 +42,7 @@ class TechDrawExport DrawViewAnnotation : public TechDraw::DrawView
|
||||
public:
|
||||
/// Constructor
|
||||
DrawViewAnnotation();
|
||||
~DrawViewAnnotation() = default;
|
||||
~DrawViewAnnotation() override = default;
|
||||
|
||||
App::PropertyStringList Text;
|
||||
App::PropertyFont Font;
|
||||
|
||||
@@ -41,7 +41,7 @@ class TechDrawExport DrawViewArch : public TechDraw::DrawViewSymbol
|
||||
public:
|
||||
/// Constructor
|
||||
DrawViewArch();
|
||||
~DrawViewArch() = default;
|
||||
~DrawViewArch() override = default;
|
||||
|
||||
App::PropertyLink Source;
|
||||
App::PropertyBool AllOn;
|
||||
|
||||
@@ -42,7 +42,7 @@ class TechDrawExport DrawViewClip: public TechDraw::DrawView
|
||||
public:
|
||||
/// Constructor
|
||||
DrawViewClip();
|
||||
~DrawViewClip() = default;
|
||||
~DrawViewClip() override = default;
|
||||
|
||||
App::PropertyLength Width;
|
||||
App::PropertyLength Height;
|
||||
|
||||
@@ -41,7 +41,7 @@ class TechDrawExport DrawViewDimExtent : public TechDraw::DrawViewDimension
|
||||
public:
|
||||
/// Constructor
|
||||
DrawViewDimExtent();
|
||||
~DrawViewDimExtent() = default;
|
||||
~DrawViewDimExtent() override = default;
|
||||
|
||||
App::PropertyLinkSubList Source; //DrawViewPart & SubElements(Edges)
|
||||
//Cosmetic End points are stored in DVD::References2d
|
||||
|
||||
@@ -42,7 +42,7 @@ class TechDrawExport DrawViewDraft : public TechDraw::DrawViewSymbol
|
||||
public:
|
||||
/// Constructor
|
||||
DrawViewDraft();
|
||||
~DrawViewDraft() = default;
|
||||
~DrawViewDraft() override = default;
|
||||
|
||||
App::PropertyLink Source;
|
||||
App::PropertyFloat LineWidth;
|
||||
|
||||
@@ -41,7 +41,7 @@ class TechDrawExport DrawWeldSymbol : public TechDraw::DrawView
|
||||
|
||||
public:
|
||||
DrawWeldSymbol();
|
||||
~DrawWeldSymbol() = default;
|
||||
~DrawWeldSymbol() override = default;
|
||||
|
||||
App::PropertyLink Leader;
|
||||
App::PropertyBool AllAround;
|
||||
|
||||
@@ -38,12 +38,12 @@ namespace TechDraw
|
||||
*/
|
||||
class TechDrawExport FeatureProjection : public Part::Feature
|
||||
{
|
||||
PROPERTY_HEADER(TechDraw::FeatureProjection);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(TechDraw::FeatureProjection);
|
||||
|
||||
public:
|
||||
/// Constructor
|
||||
FeatureProjection();
|
||||
virtual ~FeatureProjection();
|
||||
~FeatureProjection() override;
|
||||
|
||||
App::PropertyLink Source;
|
||||
App::PropertyVector Direction;
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
/** @name methods override feature */
|
||||
//@{
|
||||
/// recalculate the Feature
|
||||
virtual App::DocumentObjectExecReturn *execute(void);
|
||||
App::DocumentObjectExecReturn *execute() override;
|
||||
//@}
|
||||
};
|
||||
|
||||
|
||||
@@ -39,14 +39,14 @@ class CenterLine;
|
||||
|
||||
class TechDrawExport PropertyCenterLineList: public App::PropertyLists
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
PropertyCenterLineList();
|
||||
virtual ~PropertyCenterLineList();
|
||||
~PropertyCenterLineList() override;
|
||||
|
||||
virtual void setSize(int newSize);
|
||||
virtual int getSize(void) const;
|
||||
void setSize(int newSize) override;
|
||||
int getSize() const override;
|
||||
|
||||
/** Sets the property
|
||||
*/
|
||||
@@ -58,20 +58,20 @@ public:
|
||||
return _lValueList[idx];
|
||||
}
|
||||
|
||||
const std::vector<CenterLine*> &getValues(void) const {
|
||||
const std::vector<CenterLine*> &getValues() const {
|
||||
return _lValueList;
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
PyObject *getPyObject() override;
|
||||
void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save(Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
void Save(Base::Writer &writer) const override;
|
||||
void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual App::Property *Copy(void) const;
|
||||
virtual void Paste(const App::Property &from);
|
||||
App::Property *Copy() const override;
|
||||
void Paste(const App::Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize(void) const;
|
||||
unsigned int getMemSize() const override;
|
||||
|
||||
private:
|
||||
std::vector<CenterLine*> _lValueList;
|
||||
|
||||
@@ -39,7 +39,7 @@ class CosmeticEdge;
|
||||
|
||||
class TechDrawExport PropertyCosmeticEdgeList: public App::PropertyLists
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -52,10 +52,10 @@ public:
|
||||
* A destructor.
|
||||
* A more elaborate description of the destructor.
|
||||
*/
|
||||
virtual ~PropertyCosmeticEdgeList();
|
||||
virtual ~PropertyCosmeticEdgeList() override;
|
||||
|
||||
virtual void setSize(int newSize);
|
||||
virtual int getSize(void) const;
|
||||
void setSize(int newSize) override;
|
||||
int getSize(void) const override;
|
||||
|
||||
/** Sets the property
|
||||
*/
|
||||
@@ -68,20 +68,20 @@ public:
|
||||
return _lValueList[idx];
|
||||
}
|
||||
|
||||
const std::vector<CosmeticEdge*> &getValues(void) const {
|
||||
const std::vector<CosmeticEdge*> &getValues() const {
|
||||
return _lValueList;
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
PyObject *getPyObject() override;
|
||||
void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save(Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
void Save(Base::Writer &writer) const override;
|
||||
void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual App::Property *Copy(void) const;
|
||||
virtual void Paste(const App::Property &from);
|
||||
App::Property *Copy() const override;
|
||||
void Paste(const App::Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize(void) const;
|
||||
unsigned int getMemSize(void) const override;
|
||||
|
||||
private:
|
||||
std::vector<CosmeticEdge*> _lValueList;
|
||||
|
||||
@@ -41,7 +41,7 @@ class CosmeticVertex;
|
||||
|
||||
class TechDrawExport PropertyCosmeticVertexList: public App::PropertyLists
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -54,10 +54,10 @@ public:
|
||||
* A destructor.
|
||||
* A more elaborate description of the destructor.
|
||||
*/
|
||||
virtual ~PropertyCosmeticVertexList();
|
||||
~PropertyCosmeticVertexList() override;
|
||||
|
||||
virtual void setSize(int newSize);
|
||||
virtual int getSize(void) const;
|
||||
void setSize(int newSize) override;
|
||||
int getSize(void) const override;
|
||||
|
||||
/** Sets the property
|
||||
*/
|
||||
@@ -69,20 +69,20 @@ public:
|
||||
return _lValueList[idx];
|
||||
}
|
||||
|
||||
const std::vector<CosmeticVertex*> &getValues(void) const {
|
||||
const std::vector<CosmeticVertex*> &getValues() const {
|
||||
return _lValueList;
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
PyObject *getPyObject() override;
|
||||
void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save(Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
void Save(Base::Writer &writer) const override;
|
||||
void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual App::Property *Copy(void) const;
|
||||
virtual void Paste(const App::Property &from);
|
||||
App::Property *Copy() const override;
|
||||
void Paste(const App::Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize(void) const;
|
||||
unsigned int getMemSize() const override;
|
||||
|
||||
private:
|
||||
std::vector<CosmeticVertex*> _lValueList;
|
||||
|
||||
@@ -38,7 +38,7 @@ class GeomFormat;
|
||||
|
||||
class TechDrawExport PropertyGeomFormatList: public App::PropertyLists
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -51,10 +51,10 @@ public:
|
||||
* A destructor.
|
||||
* A more elaborate description of the destructor.
|
||||
*/
|
||||
virtual ~PropertyGeomFormatList();
|
||||
~PropertyGeomFormatList() override;
|
||||
|
||||
virtual void setSize(int newSize);
|
||||
virtual int getSize(void) const;
|
||||
void setSize(int newSize) override;
|
||||
int getSize() const override;
|
||||
|
||||
/** Sets the property
|
||||
*/
|
||||
@@ -66,20 +66,20 @@ public:
|
||||
return _lValueList[idx];
|
||||
}
|
||||
|
||||
const std::vector<GeomFormat*> &getValues(void) const {
|
||||
const std::vector<GeomFormat*> &getValues() const {
|
||||
return _lValueList;
|
||||
}
|
||||
|
||||
virtual PyObject *getPyObject(void);
|
||||
virtual void setPyObject(PyObject *);
|
||||
PyObject *getPyObject() override;
|
||||
void setPyObject(PyObject *) override;
|
||||
|
||||
virtual void Save(Base::Writer &writer) const;
|
||||
virtual void Restore(Base::XMLReader &reader);
|
||||
void Save(Base::Writer &writer) const override;
|
||||
void Restore(Base::XMLReader &reader) override;
|
||||
|
||||
virtual App::Property *Copy(void) const;
|
||||
virtual void Paste(const App::Property &from);
|
||||
App::Property *Copy() const override;
|
||||
void Paste(const App::Property &from) override;
|
||||
|
||||
virtual unsigned int getMemSize(void) const;
|
||||
unsigned int getMemSize() const override;
|
||||
|
||||
private:
|
||||
std::vector<GeomFormat*> _lValueList;
|
||||
|
||||
@@ -37,11 +37,11 @@ public:
|
||||
DlgPageChooser(const std::vector<std::string> labels,
|
||||
const std::vector<std::string> names,
|
||||
QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
|
||||
~DlgPageChooser();
|
||||
~DlgPageChooser() override;
|
||||
|
||||
std::string getSelection() const;
|
||||
void accept();
|
||||
void reject();
|
||||
void accept() override;
|
||||
void reject() override;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
|
||||
@@ -40,11 +40,11 @@ class TechDrawGuiExport DlgStringListEditor : public QDialog
|
||||
public:
|
||||
DlgStringListEditor(const std::vector<std::string> texts,
|
||||
QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
|
||||
~DlgStringListEditor();
|
||||
~DlgStringListEditor() override;
|
||||
|
||||
std::vector<std::string> getTexts() const;
|
||||
void accept();
|
||||
void reject();
|
||||
void accept() override;
|
||||
void reject() override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotItemActivated(QListWidgetItem* item);
|
||||
|
||||
@@ -40,13 +40,13 @@ namespace TechDrawGui
|
||||
class TechDrawGuiExport QGCustomBorder : public QGraphicsRectItem
|
||||
{
|
||||
public:
|
||||
explicit QGCustomBorder(void);
|
||||
~QGCustomBorder() {}
|
||||
explicit QGCustomBorder();
|
||||
~QGCustomBorder() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 136};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr );
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
virtual void centerAt(QPointF centerPos);
|
||||
virtual void centerAt(double cX, double cY);
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ namespace TechDrawGui
|
||||
class TechDrawGuiExport QGCustomLabel : public QGraphicsTextItem
|
||||
{
|
||||
public:
|
||||
explicit QGCustomLabel(void);
|
||||
~QGCustomLabel() {}
|
||||
explicit QGCustomLabel();
|
||||
~QGCustomLabel() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 135};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr );
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
virtual void centerAt(QPointF centerPos);
|
||||
virtual void centerAt(double cX, double cY);
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ namespace TechDrawGui
|
||||
class TechDrawGuiExport QGCustomRect : public QGraphicsRectItem
|
||||
{
|
||||
public:
|
||||
explicit QGCustomRect(void);
|
||||
~QGCustomRect() {}
|
||||
explicit QGCustomRect();
|
||||
~QGCustomRect() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 133};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr );
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
virtual void centerAt(QPointF centerPos);
|
||||
virtual void centerAt(double cX, double cY);
|
||||
|
||||
|
||||
@@ -43,15 +43,15 @@ namespace TechDrawGui
|
||||
class TechDrawGuiExport QGCustomSvg : public QGraphicsSvgItem
|
||||
{
|
||||
public:
|
||||
explicit QGCustomSvg(void);
|
||||
~QGCustomSvg();
|
||||
explicit QGCustomSvg();
|
||||
~QGCustomSvg() override;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 131};
|
||||
int type() const override { return Type;}
|
||||
|
||||
virtual void paint( QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget = nullptr ) override;
|
||||
void paint( QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget = nullptr ) override;
|
||||
virtual void centerAt(QPointF centerPos);
|
||||
virtual void centerAt(double cX, double cY);
|
||||
virtual bool load(QByteArray *svgString);
|
||||
|
||||
@@ -44,12 +44,12 @@ class TechDrawGuiExport QGCustomText : public QGraphicsTextItem
|
||||
{
|
||||
public:
|
||||
explicit QGCustomText(QGraphicsItem* parent = nullptr);
|
||||
~QGCustomText() {}
|
||||
~QGCustomText() override {}
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 130};
|
||||
int type() const override { return Type;}
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
virtual QRectF boundingRect() const override;
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
QRectF boundingRect() const override;
|
||||
QRectF tightBoundingRect() const;
|
||||
QPointF tightBoundingAdjust() const;
|
||||
|
||||
@@ -65,12 +65,12 @@ public:
|
||||
virtual void justifyRightAt(QPointF centerPos, bool vCenter = true);
|
||||
virtual void justifyRightAt(double cX, double cY, bool vCenter = true);
|
||||
|
||||
virtual double getHeight(void);
|
||||
virtual double getWidth(void);
|
||||
virtual double getHeight();
|
||||
virtual double getWidth();
|
||||
|
||||
virtual QColor getNormalColor(void);
|
||||
virtual QColor getPreColor(void);
|
||||
virtual QColor getSelectColor(void);
|
||||
virtual QColor getNormalColor();
|
||||
virtual QColor getPreColor();
|
||||
virtual QColor getSelectColor();
|
||||
virtual void setColor(QColor c);
|
||||
|
||||
virtual void setTightBounding(bool tight);
|
||||
@@ -79,11 +79,11 @@ public:
|
||||
void makeMark(Base::Vector3d v);
|
||||
|
||||
protected:
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
|
||||
Base::Reference<ParameterGrp> getParmGroup(void);
|
||||
Base::Reference<ParameterGrp> getParmGroup();
|
||||
|
||||
bool isHighlighted;
|
||||
bool tightBounding; // Option to use tighter boundingRect(), works only for plaintext QGCustomText
|
||||
|
||||
@@ -40,14 +40,14 @@ namespace TechDrawGui
|
||||
class TechDrawGuiExport QGDisplayArea : public QGraphicsItemGroup
|
||||
{
|
||||
public:
|
||||
explicit QGDisplayArea(void);
|
||||
~QGDisplayArea() {}
|
||||
explicit QGDisplayArea();
|
||||
~QGDisplayArea() override {}
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 137};
|
||||
int type() const { return Type;}
|
||||
virtual QRectF boundingRect() const;
|
||||
int type() const override { return Type;}
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr );
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
virtual void centerAt(QPointF centerPos);
|
||||
virtual void centerAt(double cX, double cY);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class TechDrawGuiExport QGMarker : public QObject, public QGIVertex
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QGMarker(int idx);
|
||||
~QGMarker() = default;
|
||||
~QGMarker() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 302};
|
||||
int type() const override { return Type;}
|
||||
@@ -78,7 +78,7 @@ class TechDrawGuiExport QGEPath : public QObject, public QGIPrimPath
|
||||
|
||||
public:
|
||||
explicit QGEPath(QGILeaderLine* leader);
|
||||
~QGEPath() = default;
|
||||
~QGEPath() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 301};
|
||||
int type() const override { return Type;}
|
||||
|
||||
@@ -52,10 +52,10 @@ class TechDrawGuiExport QGIArrow : public QGIPrimPath
|
||||
{
|
||||
public:
|
||||
explicit QGIArrow();
|
||||
~QGIArrow() {}
|
||||
~QGIArrow() override {}
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 109};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
public:
|
||||
void draw();
|
||||
|
||||
@@ -34,21 +34,21 @@ class TechDrawGuiExport QGICMark : public QGIVertex
|
||||
{
|
||||
public:
|
||||
explicit QGICMark(int index);
|
||||
~QGICMark() {}
|
||||
~QGICMark() override {}
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 171};
|
||||
int type() const override { return Type;}
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
|
||||
virtual QRectF boundingRect() const override;
|
||||
virtual QPainterPath shape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
QPainterPath shape() const override;
|
||||
|
||||
void draw(void);
|
||||
float getSize() { return m_size; }
|
||||
void setSize(float s);
|
||||
float getThick() { return m_width; }
|
||||
void setThick(float t);
|
||||
virtual void setPrettyNormal() override;
|
||||
void setPrettyNormal() override;
|
||||
|
||||
double getMarkFuzz(void) const;
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@ namespace TechDrawGui
|
||||
class TechDrawGuiExport QGICaption : public QGCustomText
|
||||
{
|
||||
public:
|
||||
explicit QGICaption(void);
|
||||
~QGICaption() {}
|
||||
explicit QGICaption();
|
||||
~QGICaption() override {}
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 180};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -37,15 +37,15 @@ class TechDrawGuiExport QGICenterLine : public QGIDecoration
|
||||
{
|
||||
public:
|
||||
explicit QGICenterLine();
|
||||
~QGICenterLine() {}
|
||||
~QGICenterLine() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 174};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr );
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
|
||||
void setBounds(double x1, double y1, double x2, double y2);
|
||||
virtual void draw();
|
||||
void draw() override;
|
||||
|
||||
void setIntersection(bool isIntersecting);
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace TechDrawGui
|
||||
class TechDrawGuiExport QGIDecoration : public QGraphicsItemGroup
|
||||
{
|
||||
public:
|
||||
explicit QGIDecoration(void);
|
||||
~QGIDecoration() {}
|
||||
explicit QGIDecoration();
|
||||
~QGIDecoration() override = default;
|
||||
enum {Type = QGraphicsItem::UserType + 173};
|
||||
int type() const override { return Type;}
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
double getWidth() { return m_width; }
|
||||
void setStyle(Qt::PenStyle s);
|
||||
void setColor(QColor c);
|
||||
QColor getColor(void) { return m_colNormal; }
|
||||
QColor getColor() { return m_colNormal; }
|
||||
void setFill(Qt::BrushStyle bs) { m_brushCurrent = bs; }
|
||||
void makeMark(double x, double y);
|
||||
void makeMark(Base::Vector3d v);
|
||||
@@ -81,9 +81,9 @@ protected:
|
||||
void setPrettyNormal();
|
||||
void setPrettyPre();
|
||||
void setPrettySel();
|
||||
virtual QColor prefNormalColor(void);
|
||||
virtual QColor prefPreColor(void);
|
||||
virtual QColor prefSelectColor(void);
|
||||
virtual QColor prefNormalColor();
|
||||
virtual QColor prefPreColor();
|
||||
virtual QColor prefSelectColor();
|
||||
QPen m_pen;
|
||||
QBrush m_brush;
|
||||
QColor m_colCurrent;
|
||||
|
||||
@@ -39,12 +39,12 @@ class TechDrawGuiExport QGIDimLines : public QGIPrimPath
|
||||
{
|
||||
public:
|
||||
explicit QGIDimLines();
|
||||
~QGIDimLines() {}
|
||||
~QGIDimLines() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 175};
|
||||
int type() const override { return Type;}
|
||||
virtual QRectF boundingRect() const override;
|
||||
virtual QPainterPath shape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
QPainterPath shape() const override;
|
||||
|
||||
public:
|
||||
void draw();
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
protected:
|
||||
//QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
double getEdgeFuzz(void) const;
|
||||
double getEdgeFuzz() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -46,14 +46,14 @@ class TechDrawGuiExport QGIDrawingTemplate : public QGITemplate
|
||||
|
||||
public:
|
||||
explicit QGIDrawingTemplate(QGSPage *);
|
||||
~QGIDrawingTemplate();
|
||||
~QGIDrawingTemplate() override;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 151};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
void clearContents();
|
||||
void draw();
|
||||
virtual void updateView(bool update = false);
|
||||
void draw() override;
|
||||
void updateView(bool update = false) override;
|
||||
|
||||
protected:
|
||||
TechDraw::DrawParametricTemplate * getParametricTemplate();
|
||||
|
||||
@@ -34,13 +34,13 @@ class TechDrawGuiExport QGIEdge : public QGIPrimPath
|
||||
{
|
||||
public:
|
||||
explicit QGIEdge(int index);
|
||||
~QGIEdge() {}
|
||||
~QGIEdge() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 103};
|
||||
|
||||
int type() const override { return Type;}
|
||||
virtual QRectF boundingRect() const override;
|
||||
virtual QPainterPath shape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
QPainterPath shape() const override;
|
||||
|
||||
int getProjIndex() const { return projIndex; }
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
bool getHiddenEdge() { return(isHiddenEdge); }
|
||||
void setSmoothEdge(bool b) { isSmoothEdge = b; }
|
||||
bool getSmoothEdge() { return(isSmoothEdge); }
|
||||
virtual void setPrettyNormal() override;
|
||||
void setPrettyNormal() override;
|
||||
|
||||
double getEdgeFuzz(void) const;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class TechDrawGuiExport QGIGhostHighlight : public QObject, public QGIHighlight
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QGIGhostHighlight();
|
||||
~QGIGhostHighlight();
|
||||
~QGIGhostHighlight() override;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 177};
|
||||
int type() const override { return Type;}
|
||||
@@ -54,8 +54,8 @@ Q_SIGNALS:
|
||||
void positionChange(QPointF p);
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
bool m_dragging;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class TechDrawGuiExport QGIHighlight : public QGIDecoration
|
||||
{
|
||||
public:
|
||||
explicit QGIHighlight();
|
||||
~QGIHighlight();
|
||||
~QGIHighlight() override;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 176};
|
||||
int type() const override { return Type;}
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
void setBounds(double x1, double y1, double x2, double y2);
|
||||
void setReference(const char* sym);
|
||||
void setFont(QFont f, double fsize);
|
||||
virtual void draw() override;
|
||||
void draw() override;
|
||||
void setInteractive(bool state);
|
||||
void setFeatureName(std::string name) { m_featureName = name; }
|
||||
std::string getFeatureName() { return m_featureName; }
|
||||
@@ -69,7 +69,7 @@ protected:
|
||||
void makeHighlight();
|
||||
void makeReference();
|
||||
void setTools();
|
||||
int getHoleStyle(void);
|
||||
int getHoleStyle();
|
||||
|
||||
private:
|
||||
QString m_refText;
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
};
|
||||
|
||||
explicit QGILeaderLine();
|
||||
~QGILeaderLine() = default;
|
||||
~QGILeaderLine() override = default;
|
||||
|
||||
int type() const override
|
||||
{
|
||||
|
||||
@@ -43,13 +43,13 @@ class TechDrawGuiExport QGIPrimPath : public QGraphicsPathItem
|
||||
{
|
||||
public:
|
||||
explicit QGIPrimPath();
|
||||
~QGIPrimPath() {}
|
||||
~QGIPrimPath() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 170};
|
||||
|
||||
int type() const override { return Type;}
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
virtual QPainterPath shape() const override { return path(); }
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
QPainterPath shape() const override { return path(); }
|
||||
|
||||
void setHighlighted(bool state);
|
||||
virtual void setPrettyNormal();
|
||||
@@ -71,20 +71,20 @@ public:
|
||||
void setFill(QBrush b);
|
||||
void resetFill();
|
||||
void setFillColor(QColor c);
|
||||
QColor getFillColor(void) { return m_colDefFill; }
|
||||
QColor getFillColor() { return m_colDefFill; }
|
||||
void setFillOverride(bool b) { m_fillOverride = b; }
|
||||
|
||||
protected:
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
virtual QColor getNormalColor(void);
|
||||
virtual QColor getPreColor(void);
|
||||
virtual QColor getSelectColor(void);
|
||||
Base::Reference<ParameterGrp> getParmGroup(void);
|
||||
virtual Qt::PenCapStyle prefCapStyle(void);
|
||||
virtual QColor getNormalColor();
|
||||
virtual QColor getPreColor();
|
||||
virtual QColor getSelectColor();
|
||||
Base::Reference<ParameterGrp> getParmGroup();
|
||||
virtual Qt::PenCapStyle prefCapStyle();
|
||||
|
||||
bool isHighlighted;
|
||||
|
||||
|
||||
@@ -58,33 +58,33 @@ public:
|
||||
enum {Type = QGraphicsItem::UserType + 233};
|
||||
|
||||
explicit QGIRichAnno();
|
||||
~QGIRichAnno() = default;
|
||||
~QGIRichAnno() override = default;
|
||||
|
||||
int type() const override { return Type;}
|
||||
virtual void paint( QPainter * painter,
|
||||
const QStyleOptionGraphicsItem * option,
|
||||
QWidget * widget = nullptr ) override;
|
||||
virtual QRectF boundingRect() const override;
|
||||
void paint( QPainter * painter,
|
||||
const QStyleOptionGraphicsItem * option,
|
||||
QWidget * widget = nullptr ) override;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
virtual void drawBorder() override;
|
||||
virtual void updateView(bool update = false) override;
|
||||
void drawBorder() override;
|
||||
void updateView(bool update = false) override;
|
||||
|
||||
void setTextItem(void);
|
||||
void setTextItem();
|
||||
|
||||
virtual TechDraw::DrawRichAnno* getFeature(void);
|
||||
virtual TechDraw::DrawRichAnno* getFeature();
|
||||
QPen rectPen() const;
|
||||
|
||||
void setExportingPdf(bool b) { m_isExportingPdf = b; }
|
||||
bool getExportingPdf(void) { return m_isExportingPdf; }
|
||||
bool getExportingPdf() { return m_isExportingPdf; }
|
||||
void setExportingSvg(bool b) { m_isExportingSvg = b; }
|
||||
bool getExportingSvg(void) { return m_isExportingSvg; }
|
||||
bool getExportingSvg() { return m_isExportingSvg; }
|
||||
|
||||
protected:
|
||||
virtual void draw() override;
|
||||
void draw() override;
|
||||
void setLineSpacing(int lineSpacing);
|
||||
QFont prefFont(void);
|
||||
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
bool m_isExportingPdf;
|
||||
bool m_isExportingSvg;
|
||||
|
||||
@@ -47,12 +47,12 @@ class TechDrawGuiExport QGISectionLine : public QGIDecoration
|
||||
{
|
||||
public:
|
||||
explicit QGISectionLine();
|
||||
~QGISectionLine() {}
|
||||
~QGISectionLine() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 172};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr );
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
|
||||
void setEnds(Base::Vector3d l1, Base::Vector3d l2);
|
||||
void setBounds(double x1, double y1, double x2, double y2);
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
bool pathMode() { return m_pathMode; }
|
||||
void setChangePoints(TechDraw::ChangePointVector changePoints);
|
||||
void clearChangePoints();
|
||||
virtual void draw();
|
||||
void draw() override;
|
||||
|
||||
protected:
|
||||
QColor getSectionColor();
|
||||
|
||||
@@ -47,10 +47,10 @@ class TechDrawGuiExport QGITemplate : public QObject, public QGraphicsItemGroup
|
||||
|
||||
public:
|
||||
QGITemplate(QGSPage *);
|
||||
~QGITemplate();
|
||||
~QGITemplate() override;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 150};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
void clearContents();
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
inline qreal getY() { return y() * -1; }
|
||||
|
||||
virtual void updateView(bool update = false);
|
||||
std::vector<TemplateTextField *> getTextFields(void) { return textFields; };
|
||||
std::vector<TemplateTextField *> getTextFields() { return textFields; };
|
||||
|
||||
virtual void draw() = 0;
|
||||
|
||||
|
||||
@@ -47,12 +47,12 @@ class TechDrawGuiExport QGITile : public QGIDecoration
|
||||
{
|
||||
public:
|
||||
explicit QGITile(TechDraw::DrawTileWeld*);
|
||||
~QGITile(void);
|
||||
~QGITile() override;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 325};
|
||||
int type(void) const { return Type;}
|
||||
int type(void) const override { return Type;}
|
||||
|
||||
virtual QRectF boundingRect() const;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
void setTileTextLeft(std::string s);
|
||||
void setTileTextRight(std::string s);
|
||||
@@ -64,8 +64,8 @@ public:
|
||||
void setTileScale(double s);
|
||||
void setTailRight(bool b) { m_tailRight = b; }
|
||||
void setAltWeld(bool b) { m_altWeld = b; }
|
||||
bool isTailRight(void);
|
||||
virtual void draw(void);
|
||||
bool isTailRight();
|
||||
void draw() override;
|
||||
|
||||
protected:
|
||||
QColor getTileColor(void) const;
|
||||
|
||||
@@ -34,11 +34,11 @@ class TechDrawGuiExport QGIVertex : public QGIPrimPath
|
||||
{
|
||||
public:
|
||||
explicit QGIVertex(int index);
|
||||
~QGIVertex() {}
|
||||
~QGIVertex() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 105};
|
||||
int type() const override { return Type;}
|
||||
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
|
||||
int getProjIndex() const { return projIndex; }
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class TechDrawGuiExport QGIView : public QObject, public QGraphicsItemGroup
|
||||
Q_OBJECT
|
||||
public:
|
||||
QGIView();
|
||||
~QGIView();
|
||||
~QGIView() override;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 101};
|
||||
int type() const override { return Type;}
|
||||
|
||||
@@ -62,7 +62,7 @@ class QGIBalloonLabel: public QGraphicsObject
|
||||
|
||||
public:
|
||||
QGIBalloonLabel();
|
||||
~QGIBalloonLabel() = default;
|
||||
~QGIBalloonLabel() override = default;
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
};
|
||||
|
||||
explicit QGIViewBalloon();
|
||||
~QGIViewBalloon() = default;
|
||||
~QGIViewBalloon() override = default;
|
||||
|
||||
void setViewPartFeature(TechDraw::DrawViewBalloon* balloonFeat);
|
||||
int type() const override
|
||||
|
||||
@@ -62,7 +62,7 @@ Q_OBJECT
|
||||
|
||||
public:
|
||||
QGIDatumLabel();
|
||||
~QGIDatumLabel() = default;
|
||||
~QGIDatumLabel() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 107};
|
||||
int type() const override { return Type;}
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
enum {Type = QGraphicsItem::UserType + 106};
|
||||
|
||||
QGIViewDimension();
|
||||
~QGIViewDimension() = default;
|
||||
~QGIViewDimension() override = default;
|
||||
|
||||
void setViewPartFeature(TechDraw::DrawViewDimension *obj);
|
||||
int type() const override { return Type;}
|
||||
|
||||
@@ -46,21 +46,21 @@ Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QGMText(void);
|
||||
~QGMText() {}
|
||||
~QGMText() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 300};
|
||||
int type() const override { return Type;}
|
||||
virtual void paint( QPainter * painter,
|
||||
const QStyleOptionGraphicsItem * option,
|
||||
QWidget * widget = nullptr ) override;
|
||||
void paint( QPainter * painter,
|
||||
const QStyleOptionGraphicsItem * option,
|
||||
QWidget * widget = nullptr ) override;
|
||||
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void showBox(bool b) { m_showBox = b; }
|
||||
virtual bool showBox(void) { return m_showBox; }
|
||||
virtual bool showBox() { return m_showBox; }
|
||||
|
||||
virtual void setPrettyNormal() override;
|
||||
virtual void setPrettyPre() override;
|
||||
virtual void setPrettySel() override;
|
||||
void setPrettyNormal() override;
|
||||
void setPrettyPre() override;
|
||||
void setPrettySel() override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void dragging();
|
||||
@@ -69,9 +69,9 @@ Q_SIGNALS:
|
||||
void dragFinished();
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
private:
|
||||
bool m_showBox;
|
||||
|
||||
@@ -75,7 +75,7 @@ class TechDrawGuiExport QGSPage: public QGraphicsScene
|
||||
|
||||
public:
|
||||
explicit QGSPage(ViewProviderPage* vpPage, QWidget* parent = nullptr);
|
||||
~QGSPage() = default;
|
||||
~QGSPage() override = default;
|
||||
|
||||
bool addView(const App::DocumentObject* obj);
|
||||
bool attachView(App::DocumentObject* obj);
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
};
|
||||
|
||||
QGVPage(ViewProviderPage* vpPage, QGSPage* scenePage, QWidget* parent = nullptr);
|
||||
~QGVPage();
|
||||
~QGVPage() override;
|
||||
|
||||
void setRenderer(RendererType type = Native);
|
||||
void drawBackground(QPainter* painter, const QRectF& rect) override;
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
SymbolChooser(QWidget *parent = nullptr,
|
||||
QString startDir = QString(),
|
||||
QString source = QString());
|
||||
~SymbolChooser();
|
||||
~SymbolChooser() override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void onOKClicked();
|
||||
|
||||
@@ -51,7 +51,7 @@ class TechDrawGuiExport TaskActiveView : public QWidget
|
||||
|
||||
public:
|
||||
TaskActiveView(TechDraw::DrawPage* pageFeat);
|
||||
~TaskActiveView();
|
||||
~TaskActiveView() override;
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
void enableTaskButtons(bool b);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
void changeEvent(QEvent *e) override;
|
||||
|
||||
void blockButtons(bool b);
|
||||
void setUiPrimary(void);
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
App::DocumentObject* profileObject,
|
||||
std::vector<std::string> profileSubs);
|
||||
TaskComplexSection(TechDraw::DrawComplexSection* complexSection);
|
||||
~TaskComplexSection() = default;
|
||||
~TaskComplexSection() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -58,7 +58,7 @@ class TaskCosVertex : public QWidget
|
||||
public:
|
||||
TaskCosVertex(TechDraw::DrawViewPart* baseFeat,
|
||||
TechDraw::DrawPage* page);
|
||||
~TaskCosVertex() = default;
|
||||
~TaskCosVertex() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -62,7 +62,7 @@ class TaskDetail : public QWidget
|
||||
public:
|
||||
explicit TaskDetail(TechDraw::DrawViewPart* baseFeat);
|
||||
explicit TaskDetail(TechDraw::DrawViewDetail* detailFeat);
|
||||
~TaskDetail() = default;
|
||||
~TaskDetail() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -88,24 +88,24 @@ class TaskDlgDimReference: public Gui::TaskView::TaskDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TaskDlgDimReference(TechDraw::DrawViewDimension* inDvd);
|
||||
~TaskDlgDimReference();
|
||||
explicit TaskDlgDimReference(TechDraw::DrawViewDimension* inDvd);
|
||||
~TaskDlgDimReference() override;
|
||||
|
||||
public:
|
||||
/// is called the TaskView when the dialog is opened
|
||||
virtual void open();
|
||||
void open() override;
|
||||
/// is called by the framework if an button is clicked which has no accept or reject role
|
||||
virtual void clicked(int);
|
||||
void clicked(int) override;
|
||||
/// is called by the framework if the dialog is accepted (Ok)
|
||||
virtual bool accept();
|
||||
bool accept() override;
|
||||
/// is called by the framework if the dialog is rejected (Cancel)
|
||||
virtual bool reject();
|
||||
bool reject() override;
|
||||
/// is called by the framework if the user presses the help button
|
||||
virtual void helpRequested()
|
||||
void helpRequested() override
|
||||
{
|
||||
return;
|
||||
}
|
||||
virtual bool isAllowedAlterDocument(void) const
|
||||
bool isAllowedAlterDocument() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class TaskGeomHatch : public QWidget
|
||||
|
||||
public:
|
||||
TaskGeomHatch(TechDraw::DrawGeomHatch* inHatch, TechDrawGui::ViewProviderGeomHatch* inVp, bool mode);
|
||||
~TaskGeomHatch() = default;
|
||||
~TaskGeomHatch() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
TaskLeaderLine(TechDraw::DrawView* baseFeat,
|
||||
TechDraw::DrawPage* page);
|
||||
explicit TaskLeaderLine(TechDrawGui::ViewProviderLeader* leadVP);
|
||||
~TaskLeaderLine() = default;
|
||||
~TaskLeaderLine() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -49,7 +49,7 @@ class TaskProjGroup : public QWidget
|
||||
|
||||
public:
|
||||
TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode);
|
||||
~TaskProjGroup() = default;
|
||||
~TaskProjGroup() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
TaskRichAnno(TechDraw::DrawView* baseFeat,
|
||||
TechDraw::DrawPage* page);
|
||||
explicit TaskRichAnno(TechDrawGui::ViewProviderRichAnno* annoVP);
|
||||
~TaskRichAnno() = default;
|
||||
~TaskRichAnno() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -48,7 +48,7 @@ class TaskSectionView : public QWidget
|
||||
public:
|
||||
explicit TaskSectionView(TechDraw::DrawViewPart* base);
|
||||
explicit TaskSectionView(TechDraw::DrawViewSection* section);
|
||||
~TaskSectionView() = default;
|
||||
~TaskSectionView() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -79,7 +79,7 @@ class TaskSurfaceFinishSymbols : public QWidget
|
||||
|
||||
public:
|
||||
explicit TaskSurfaceFinishSymbols(TechDraw::DrawViewPart* view);
|
||||
~TaskSurfaceFinishSymbols() = default;
|
||||
~TaskSurfaceFinishSymbols() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
|
||||
@@ -97,7 +97,7 @@ class TechDrawGuiExport TaskWeldingSymbol : public QWidget
|
||||
public:
|
||||
TaskWeldingSymbol(TechDraw::DrawLeaderLine* leadFeat);
|
||||
TaskWeldingSymbol(TechDraw::DrawWeldSymbol* weldFeat);
|
||||
~TaskWeldingSymbol();
|
||||
~TaskWeldingSymbol() override;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
@@ -123,18 +123,18 @@ public Q_SLOTS:
|
||||
void onSymbolSelected(QString symbolPath, QString source);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *event);
|
||||
void setUiPrimary(void);
|
||||
void changeEvent(QEvent *event) override;
|
||||
void setUiPrimary();
|
||||
void setUiEdit();
|
||||
|
||||
TechDraw::DrawWeldSymbol* createWeldingSymbol(void);
|
||||
void updateWeldingSymbol(void);
|
||||
TechDraw::DrawWeldSymbol* createWeldingSymbol();
|
||||
void updateWeldingSymbol();
|
||||
|
||||
void getTileFeats(void);
|
||||
void updateTiles(void);
|
||||
void getTileFeats();
|
||||
void updateTiles();
|
||||
|
||||
void collectArrowData(void);
|
||||
void collectOtherData(void);
|
||||
void collectArrowData();
|
||||
void collectOtherData();
|
||||
|
||||
std::string prefSymbolDir();
|
||||
|
||||
|
||||
@@ -45,10 +45,10 @@ class TechDrawGuiExport TemplateTextField : public QGraphicsRectItem
|
||||
TechDraw::DrawTemplate *myTmplte,
|
||||
const std::string &myFieldName);
|
||||
|
||||
virtual ~TemplateTextField() = default;
|
||||
~TemplateTextField() override = default;
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 160};
|
||||
int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
/// Returns the field name that this TemplateTextField represents
|
||||
std::string fieldName() const { return fieldNameStr; }
|
||||
@@ -58,10 +58,10 @@ class TechDrawGuiExport TemplateTextField : public QGraphicsRectItem
|
||||
std::string fieldNameStr;
|
||||
|
||||
/// Need this to properly handle mouse release
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
/// Trigger the dialog for editing template text
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
};
|
||||
} // namespace TechDrawGui
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ class TechDrawGuiExport ViewProviderCosmeticExtension : public Gui::ViewProvider
|
||||
|
||||
public:
|
||||
/// Constructor
|
||||
ViewProviderCosmeticExtension(void);
|
||||
virtual ~ViewProviderCosmeticExtension() = default;
|
||||
ViewProviderCosmeticExtension();
|
||||
~ViewProviderCosmeticExtension() override = default;
|
||||
|
||||
virtual QIcon extensionMergeGreyableOverlayIcons(const QIcon & orig) const override;
|
||||
QIcon extensionMergeGreyableOverlayIcons(const QIcon & orig) const override;
|
||||
};
|
||||
|
||||
using ViewProviderCosmeticExtensionPython = Gui::ViewProviderExtensionPythonT<TechDrawGui::ViewProviderCosmeticExtension>;
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
TechDraw::DrawGeomHatch* getViewObject() const;
|
||||
|
||||
virtual Gui::MDIView *getMDIView() const override;
|
||||
Gui::MDIView *getMDIView() const override;
|
||||
};
|
||||
|
||||
} // namespace TechDrawGui
|
||||
|
||||
@@ -49,19 +49,19 @@ public:
|
||||
|
||||
void attach(App::DocumentObject *) override;
|
||||
|
||||
virtual bool useNewSelectionModel(void) const override {return false;}
|
||||
virtual void updateData(const App::Property*) override;
|
||||
virtual void onChanged(const App::Property *prop) override;
|
||||
virtual void hide(void) override;
|
||||
virtual void show(void) override;
|
||||
virtual bool isShow(void) const override;
|
||||
bool useNewSelectionModel() const override {return false;}
|
||||
void updateData(const App::Property*) override;
|
||||
void onChanged(const App::Property *prop) override;
|
||||
void hide() override;
|
||||
void show() override;
|
||||
bool isShow() const override;
|
||||
QGITemplate* getQTemplate(void);
|
||||
TechDraw::DrawTemplate* getTemplate() const;
|
||||
MDIViewPage* getMDIViewPage(void) const;
|
||||
virtual Gui::MDIView *getMDIView() const override;
|
||||
Gui::MDIView *getMDIView() const override;
|
||||
|
||||
void setMarkers(bool state);
|
||||
virtual bool onDelete(const std::vector<std::string> &) override;
|
||||
bool onDelete(const std::vector<std::string> &) override;
|
||||
|
||||
const char* whoAmI() const;
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ class CompassDialWidget : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CompassDialWidget(QWidget* parent = 0);
|
||||
~CompassDialWidget() = default;
|
||||
CompassDialWidget(QWidget* parent = nullptr);
|
||||
~CompassDialWidget() override = default;
|
||||
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
@@ -46,8 +46,8 @@ class CompassWidget: public QWidget
|
||||
Q_PROPERTY(double angle READ dialAngle WRITE setDialAngle NOTIFY angleChanged)
|
||||
|
||||
public:
|
||||
CompassWidget(QWidget* parent = 0);
|
||||
~CompassWidget() = default;
|
||||
CompassWidget(QWidget* parent = nullptr);
|
||||
~CompassWidget() override = default;
|
||||
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
@@ -51,7 +51,7 @@ class VectorEditWidget : public QWidget
|
||||
|
||||
public:
|
||||
VectorEditWidget(QWidget* parent = 0);
|
||||
~VectorEditWidget() = default;
|
||||
~VectorEditWidget() override = default;
|
||||
|
||||
QSize minimumSizeHint() const override;
|
||||
bool eventFilter(QObject *target, QEvent *event) override;
|
||||
|
||||
@@ -35,16 +35,16 @@ namespace TechDrawGui {
|
||||
*/
|
||||
class TechDrawGuiExport Workbench : public Gui::StdWorkbench
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
||||
|
||||
public:
|
||||
Workbench();
|
||||
virtual ~Workbench();
|
||||
~Workbench() override;
|
||||
|
||||
protected:
|
||||
Gui::MenuItem* setupMenuBar() const;
|
||||
Gui::ToolBarItem* setupToolBars() const;
|
||||
Gui::ToolBarItem* setupCommandBars() const;
|
||||
Gui::MenuItem* setupMenuBar() const override;
|
||||
Gui::ToolBarItem* setupToolBars() const override;
|
||||
Gui::ToolBarItem* setupCommandBars() const override;
|
||||
};
|
||||
|
||||
} // namespace TechDrawGui
|
||||
|
||||
@@ -43,7 +43,7 @@ class MRichTextEdit : public QWidget, protected Ui::MRichTextEdit {
|
||||
|
||||
public:
|
||||
MRichTextEdit(QWidget *parent = nullptr, QString textIn = QString() );
|
||||
~MRichTextEdit() = default;
|
||||
~MRichTextEdit() override = default;
|
||||
|
||||
QString toPlainText() const { return f_textedit->toPlainText(); }
|
||||
QString toHtml() const;
|
||||
@@ -70,8 +70,8 @@ protected:
|
||||
void bgColorChanged(const QColor &color);
|
||||
void list(bool checked, QTextListFormat::Style style);
|
||||
void indent(int delta);
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
void focusInEvent(QFocusEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
bool hasMultipleSizes();
|
||||
|
||||
void addFontSize(QString fontSize);
|
||||
|
||||
@@ -38,9 +38,9 @@ class MTextEdit : public QTextEdit {
|
||||
void dropImage(const QImage& image, const QString& format);
|
||||
|
||||
protected:
|
||||
bool canInsertFromMimeData(const QMimeData *source) const;
|
||||
void insertFromMimeData(const QMimeData *source);
|
||||
QMimeData *createMimeDataFromSelection() const;
|
||||
bool canInsertFromMimeData(const QMimeData *source) const override;
|
||||
void insertFromMimeData(const QMimeData *source) override;
|
||||
QMimeData *createMimeDataFromSelection() const override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user