Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
1405:4c359c2b220c | 1406:a18e78b9c78b |
---|---|
30 Q_OBJECT | 30 Q_OBJECT |
31 | 31 |
32 public: | 32 public: |
33 TextLayer(); | 33 TextLayer(); |
34 | 34 |
35 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; | 35 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; |
36 | 36 |
37 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; | 37 QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; |
38 | 38 |
39 virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, | 39 bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, |
40 int &resolution, | 40 int &resolution, |
41 SnapType snap) const; | 41 SnapType snap) const override; |
42 | 42 |
43 virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *); | 43 void drawStart(LayerGeometryProvider *v, QMouseEvent *) override; |
44 virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *); | 44 void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override; |
45 virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *); | 45 void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override; |
46 | 46 |
47 virtual void eraseStart(LayerGeometryProvider *v, QMouseEvent *); | 47 void eraseStart(LayerGeometryProvider *v, QMouseEvent *) override; |
48 virtual void eraseDrag(LayerGeometryProvider *v, QMouseEvent *); | 48 void eraseDrag(LayerGeometryProvider *v, QMouseEvent *) override; |
49 virtual void eraseEnd(LayerGeometryProvider *v, QMouseEvent *); | 49 void eraseEnd(LayerGeometryProvider *v, QMouseEvent *) override; |
50 | 50 |
51 virtual void editStart(LayerGeometryProvider *v, QMouseEvent *); | 51 void editStart(LayerGeometryProvider *v, QMouseEvent *) override; |
52 virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *); | 52 void editDrag(LayerGeometryProvider *v, QMouseEvent *) override; |
53 virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *); | 53 void editEnd(LayerGeometryProvider *v, QMouseEvent *) override; |
54 | 54 |
55 virtual void moveSelection(Selection s, sv_frame_t newStartFrame); | 55 void moveSelection(Selection s, sv_frame_t newStartFrame) override; |
56 virtual void resizeSelection(Selection s, Selection newSize); | 56 void resizeSelection(Selection s, Selection newSize) override; |
57 virtual void deleteSelection(Selection s); | 57 void deleteSelection(Selection s) override; |
58 | 58 |
59 virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to); | 59 void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override; |
60 virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, | 60 bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, |
61 bool interactive); | 61 bool interactive) override; |
62 | 62 |
63 virtual bool editOpen(LayerGeometryProvider *, QMouseEvent *); // on double-click | 63 bool editOpen(LayerGeometryProvider *, QMouseEvent *) override; // on double-click |
64 | 64 |
65 virtual const Model *getModel() const { return m_model; } | 65 const Model *getModel() const override { return m_model; } |
66 void setModel(TextModel *model); | 66 void setModel(TextModel *model); |
67 | 67 |
68 virtual PropertyList getProperties() const; | 68 PropertyList getProperties() const override; |
69 virtual QString getPropertyLabel(const PropertyName &) const; | 69 QString getPropertyLabel(const PropertyName &) const override; |
70 virtual PropertyType getPropertyType(const PropertyName &) const; | 70 PropertyType getPropertyType(const PropertyName &) const override; |
71 virtual int getPropertyRangeAndValue(const PropertyName &, | 71 int getPropertyRangeAndValue(const PropertyName &, |
72 int *min, int *max, int *deflt) const; | 72 int *min, int *max, int *deflt) const override; |
73 virtual QString getPropertyValueLabel(const PropertyName &, | 73 QString getPropertyValueLabel(const PropertyName &, |
74 int value) const; | 74 int value) const override; |
75 virtual void setProperty(const PropertyName &, int value); | 75 void setProperty(const PropertyName &, int value) override; |
76 | 76 |
77 virtual bool isLayerScrollable(const LayerGeometryProvider *v) const; | 77 bool isLayerScrollable(const LayerGeometryProvider *v) const override; |
78 | 78 |
79 virtual bool isLayerEditable() const { return true; } | 79 bool isLayerEditable() const override { return true; } |
80 | 80 |
81 virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); } | 81 int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); } |
82 | 82 |
83 virtual bool getValueExtents(double &min, double &max, | 83 bool getValueExtents(double &min, double &max, |
84 bool &logarithmic, QString &unit) const; | 84 bool &logarithmic, QString &unit) const override; |
85 | 85 |
86 virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; } | 86 int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; } |
87 | 87 |
88 virtual void toXml(QTextStream &stream, QString indent = "", | 88 void toXml(QTextStream &stream, QString indent = "", |
89 QString extraAttributes = "") const; | 89 QString extraAttributes = "") const override; |
90 | 90 |
91 void setProperties(const QXmlAttributes &attributes); | 91 void setProperties(const QXmlAttributes &attributes) override; |
92 | 92 |
93 protected: | 93 protected: |
94 int getYForHeight(LayerGeometryProvider *v, double height) const; | 94 int getYForHeight(LayerGeometryProvider *v, double height) const; |
95 double getHeightForY(LayerGeometryProvider *v, int y) const; | 95 double getHeightForY(LayerGeometryProvider *v, int y) const; |
96 | 96 |
97 virtual int getDefaultColourHint(bool dark, bool &impose); | 97 int getDefaultColourHint(bool dark, bool &impose) override; |
98 | 98 |
99 TextModel::PointList getLocalPoints(LayerGeometryProvider *v, int x, int y) const; | 99 TextModel::PointList getLocalPoints(LayerGeometryProvider *v, int x, int y) const; |
100 | 100 |
101 bool getPointToDrag(LayerGeometryProvider *v, int x, int y, TextModel::Point &) const; | 101 bool getPointToDrag(LayerGeometryProvider *v, int x, int y, TextModel::Point &) const; |
102 | 102 |