comparison layer/ImageLayer.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
36 36
37 public: 37 public:
38 ImageLayer(); 38 ImageLayer();
39 virtual ~ImageLayer(); 39 virtual ~ImageLayer();
40 40
41 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; 41 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
42 42
43 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const; 43 QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
44 44
45 virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, 45 bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame,
46 int &resolution, 46 int &resolution,
47 SnapType snap) const; 47 SnapType snap) const override;
48 48
49 virtual void drawStart(LayerGeometryProvider *v, QMouseEvent *); 49 void drawStart(LayerGeometryProvider *v, QMouseEvent *) override;
50 virtual void drawDrag(LayerGeometryProvider *v, QMouseEvent *); 50 void drawDrag(LayerGeometryProvider *v, QMouseEvent *) override;
51 virtual void drawEnd(LayerGeometryProvider *v, QMouseEvent *); 51 void drawEnd(LayerGeometryProvider *v, QMouseEvent *) override;
52 52
53 virtual void editStart(LayerGeometryProvider *v, QMouseEvent *); 53 void editStart(LayerGeometryProvider *v, QMouseEvent *) override;
54 virtual void editDrag(LayerGeometryProvider *v, QMouseEvent *); 54 void editDrag(LayerGeometryProvider *v, QMouseEvent *) override;
55 virtual void editEnd(LayerGeometryProvider *v, QMouseEvent *); 55 void editEnd(LayerGeometryProvider *v, QMouseEvent *) override;
56 56
57 virtual void moveSelection(Selection s, sv_frame_t newStartFrame); 57 void moveSelection(Selection s, sv_frame_t newStartFrame) override;
58 virtual void resizeSelection(Selection s, Selection newSize); 58 void resizeSelection(Selection s, Selection newSize) override;
59 virtual void deleteSelection(Selection s); 59 void deleteSelection(Selection s) override;
60 60
61 virtual void copy(LayerGeometryProvider *v, Selection s, Clipboard &to); 61 void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
62 virtual bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, 62 bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
63 bool interactive); 63 bool interactive) override;
64 64
65 virtual bool editOpen(LayerGeometryProvider *, QMouseEvent *); // on double-click 65 bool editOpen(LayerGeometryProvider *, QMouseEvent *) override; // on double-click
66 66
67 virtual const Model *getModel() const { return m_model; } 67 const Model *getModel() const override { return m_model; }
68 void setModel(ImageModel *model); 68 void setModel(ImageModel *model);
69 69
70 virtual PropertyList getProperties() const; 70 PropertyList getProperties() const override;
71 virtual QString getPropertyLabel(const PropertyName &) const; 71 QString getPropertyLabel(const PropertyName &) const override;
72 virtual PropertyType getPropertyType(const PropertyName &) const; 72 PropertyType getPropertyType(const PropertyName &) const override;
73 virtual int getPropertyRangeAndValue(const PropertyName &, 73 int getPropertyRangeAndValue(const PropertyName &,
74 int *min, int *max, int *deflt) const; 74 int *min, int *max, int *deflt) const override;
75 virtual QString getPropertyValueLabel(const PropertyName &, 75 QString getPropertyValueLabel(const PropertyName &,
76 int value) const; 76 int value) const override;
77 virtual void setProperty(const PropertyName &, int value); 77 void setProperty(const PropertyName &, int value) override;
78 78
79 virtual ColourSignificance getLayerColourSignificance() const { 79 ColourSignificance getLayerColourSignificance() const override {
80 return ColourAbsent; 80 return ColourAbsent;
81 } 81 }
82 82
83 virtual bool isLayerScrollable(const LayerGeometryProvider *v) const; 83 bool isLayerScrollable(const LayerGeometryProvider *v) const override;
84 84
85 virtual bool isLayerEditable() const { return true; } 85 bool isLayerEditable() const override { return true; }
86 86
87 virtual int getCompletion(LayerGeometryProvider *) const { return m_model->getCompletion(); } 87 int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); }
88 88
89 virtual bool getValueExtents(double &min, double &max, 89 bool getValueExtents(double &min, double &max,
90 bool &logarithmic, QString &unit) const; 90 bool &logarithmic, QString &unit) const override;
91 91
92 virtual void toXml(QTextStream &stream, QString indent = "", 92 void toXml(QTextStream &stream, QString indent = "",
93 QString extraAttributes = "") const; 93 QString extraAttributes = "") const override;
94 94
95 virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; } 95 int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; }
96 96
97 virtual void setLayerDormant(const LayerGeometryProvider *v, bool dormant); 97 void setLayerDormant(const LayerGeometryProvider *v, bool dormant) override;
98 98
99 void setProperties(const QXmlAttributes &attributes); 99 void setProperties(const QXmlAttributes &attributes) override;
100 100
101 virtual bool addImage(sv_frame_t frame, QString url); // using a command 101 virtual bool addImage(sv_frame_t frame, QString url); // using a command
102 102
103 protected slots: 103 protected slots:
104 void checkAddSources(); 104 void checkAddSources();