Mercurial > hg > svgui
diff layer/TextLayer.h @ 1406:a18e78b9c78b fix-static-analysis
Use override throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 13:52:27 +0000 |
parents | a34a2a25907c |
children | 05d614f6e46d |
line wrap: on
line diff
--- a/layer/TextLayer.h Thu Nov 22 14:55:38 2018 +0000 +++ b/layer/TextLayer.h Mon Nov 26 13:52:27 2018 +0000 @@ -32,69 +32,69 @@ public: TextLayer(); - virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; + void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; - virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; + QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; - virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, + bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, int &resolution, - SnapType snap) const; + SnapType snap) const override; - virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *); - virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *); - virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *); + void drawStart(LayerGeometryProvider *v, QMouseEvent *) override; + void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override; + void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override; - virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *); - virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *); - virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *); + void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override; + void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override; + void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override; - virtual void editStart(LayerGeometryProvider *v, QMouseEvent *); - virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *); - virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *); + void editStart(LayerGeometryProvider *v, QMouseEvent *) override; + void editDrag(LayerGeometryProvider *v, QMouseEvent *) override; + void editEnd(LayerGeometryProvider *v, QMouseEvent *) override; - virtual void moveSelection(Selection s, sv_frame_t newStartFrame); - virtual void resizeSelection(Selection s, Selection newSize); - virtual void deleteSelection(Selection s); + void moveSelection(Selection s, sv_frame_t newStartFrame) override; + void resizeSelection(Selection s, Selection newSize) override; + void deleteSelection(Selection s) override; - virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to); - virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, - bool interactive); + void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override; + bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, + bool interactive) override; - virtual bool editOpen(LayerGeometryProvider *, QMouseEvent *); // on double-click + bool editOpen(LayerGeometryProvider *, QMouseEvent *) override; // on double-click - virtual const Model *getModel() const { return m_model; } + const Model *getModel() const override { return m_model; } void setModel(TextModel *model); - virtual PropertyList getProperties() const; - virtual QString getPropertyLabel(const PropertyName &) const; - virtual PropertyType getPropertyType(const PropertyName &) const; - virtual int getPropertyRangeAndValue(const PropertyName &, - int *min, int *max, int *deflt) const; - virtual QString getPropertyValueLabel(const PropertyName &, - int value) const; - virtual void setProperty(const PropertyName &, int value); + PropertyList getProperties() const override; + QString getPropertyLabel(const PropertyName &) const override; + PropertyType getPropertyType(const PropertyName &) const override; + int getPropertyRangeAndValue(const PropertyName &, + int *min, int *max, int *deflt) const override; + QString getPropertyValueLabel(const PropertyName &, + int value) const override; + void setProperty(const PropertyName &, int value) override; - virtual bool isLayerScrollable(const LayerGeometryProvider *v) const; + bool isLayerScrollable(const LayerGeometryProvider *v) const override; - virtual bool isLayerEditable() const { return true; } + bool isLayerEditable() const override { return true; } - virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); } + int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); } - virtual bool getValueExtents(double &min, double &max, - bool &logarithmic, QString &unit) const; + bool getValueExtents(double &min, double &max, + bool &logarithmic, QString &unit) const override; - virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; } + int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; } - virtual void toXml(QTextStream &stream, QString indent = "", - QString extraAttributes = "") const; + void toXml(QTextStream &stream, QString indent = "", + QString extraAttributes = "") const override; - void setProperties(const QXmlAttributes &attributes); + void setProperties(const QXmlAttributes &attributes) override; protected: int getYForHeight(LayerGeometryProvider *v, double height) const; double getHeightForY(LayerGeometryProvider *v, int y) const; - virtual int getDefaultColourHint(bool dark, bool &impose); + int getDefaultColourHint(bool dark, bool &impose) override; TextModel::PointList getLocalPoints(LayerGeometryProvider *v, int x, int y) const;