comparison layer/TimeRulerLayer.h @ 1406:a18e78b9c78b fix-static-analysis

Use override throughout
author Chris Cannam
date Mon, 26 Nov 2018 13:52:27 +0000
parents 4c28e3302045
children 05d614f6e46d
comparison
equal deleted inserted replaced
1405:4c359c2b220c 1406:a18e78b9c78b
30 Q_OBJECT 30 Q_OBJECT
31 31
32 public: 32 public:
33 TimeRulerLayer(); 33 TimeRulerLayer();
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 void setModel(Model *); 37 void setModel(Model *);
38 virtual const Model *getModel() const { return m_model; } 38 const Model *getModel() const override { return m_model; }
39 39
40 enum LabelHeight { LabelTop, LabelMiddle, LabelBottom }; 40 enum LabelHeight { LabelTop, LabelMiddle, LabelBottom };
41 void setLabelHeight(LabelHeight h) { m_labelHeight = h; } 41 void setLabelHeight(LabelHeight h) { m_labelHeight = h; }
42 LabelHeight getLabelHeight() const { return m_labelHeight; } 42 LabelHeight getLabelHeight() const { return m_labelHeight; }
43 43
44 virtual bool snapToFeatureFrame(LayerGeometryProvider *, sv_frame_t &, int &, SnapType) const; 44 bool snapToFeatureFrame(LayerGeometryProvider *, sv_frame_t &, int &, SnapType) const override;
45 45
46 virtual ColourSignificance getLayerColourSignificance() const { 46 ColourSignificance getLayerColourSignificance() const override {
47 return ColourIrrelevant; 47 return ColourIrrelevant;
48 } 48 }
49 49
50 virtual bool getValueExtents(double &, double &, bool &, QString &) const { 50 bool getValueExtents(double &, double &, bool &, QString &) const override {
51 return false; 51 return false;
52 } 52 }
53 53
54 virtual QString getLayerPresentationName() const; 54 QString getLayerPresentationName() const override;
55 55
56 virtual int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const { return 0; } 56 int getVerticalScaleWidth(LayerGeometryProvider *, bool, QPainter &) const override { return 0; }
57 57
58 virtual void toXml(QTextStream &stream, QString indent = "", 58 void toXml(QTextStream &stream, QString indent = "",
59 QString extraAttributes = "") const; 59 QString extraAttributes = "") const override;
60 60
61 void setProperties(const QXmlAttributes &attributes); 61 void setProperties(const QXmlAttributes &attributes) override;
62 62
63 virtual bool canExistWithoutModel() const { return true; } 63 bool canExistWithoutModel() const override { return true; }
64 64
65 protected: 65 protected:
66 Model *m_model; 66 Model *m_model;
67 LabelHeight m_labelHeight; 67 LabelHeight m_labelHeight;
68 68
69 virtual int getDefaultColourHint(bool dark, bool &impose); 69 int getDefaultColourHint(bool dark, bool &impose) override;
70 70
71 int64_t getMajorTickUSec(LayerGeometryProvider *, bool &quarterTicks) const; 71 int64_t getMajorTickUSec(LayerGeometryProvider *, bool &quarterTicks) const;
72 int getXForUSec(LayerGeometryProvider *, double usec) const; 72 int getXForUSec(LayerGeometryProvider *, double usec) const;
73 }; 73 };
74 74