comparison layer/ImageLayer.h @ 1414:fa986b91d77f

Merge from branch fix-static-analysis
author Chris Cannam
date Wed, 09 Jan 2019 15:24:51 +0000
parents 05d614f6e46d
children 09d008b5c8f4
comparison
equal deleted inserted replaced
1413:0930a27ebea2 1414:fa986b91d77f
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef _IMAGE_LAYER_H_ 16 #ifndef SV_IMAGE_LAYER_H
17 #define _IMAGE_LAYER_H_ 17 #define SV_IMAGE_LAYER_H
18 18
19 #include "Layer.h" 19 #include "Layer.h"
20 #include "data/model/ImageModel.h" 20 #include "data/model/ImageModel.h"
21 21
22 #include <QObject> 22 #include <QObject>
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();