Mercurial > hg > svgui
comparison layer/TimeRulerLayer.h @ 1414:fa986b91d77f
Merge from branch fix-static-analysis
| author | Chris Cannam |
|---|---|
| date | Wed, 09 Jan 2019 15:24:51 +0000 |
| parents | 05d614f6e46d |
| children | 696e569ff21b |
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 _TIME_RULER_H_ | 16 #ifndef SV_TIME_RULER_H |
| 17 #define _TIME_RULER_H_ | 17 #define SV_TIME_RULER_H |
| 18 | 18 |
| 19 #include "SingleColourLayer.h" | 19 #include "SingleColourLayer.h" |
| 20 | 20 |
| 21 #include <QRect> | 21 #include <QRect> |
| 22 #include <QColor> | 22 #include <QColor> |
| 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 |
