Mercurial > hg > svgui
comparison layer/TimeRulerLayer.h @ 1486:ac0a8addabcf
Merge from branch by-id
author | Chris Cannam |
---|---|
date | Wed, 17 Jul 2019 14:25:16 +0100 |
parents | 696e569ff21b |
children | e6362cf5ff1d |
comparison
equal
deleted
inserted
replaced
1468:de41a11cabc2 | 1486:ac0a8addabcf |
---|---|
32 public: | 32 public: |
33 TimeRulerLayer(); | 33 TimeRulerLayer(); |
34 | 34 |
35 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; | 35 void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; |
36 | 36 |
37 void setModel(Model *); | 37 void setModel(ModelId); |
38 const Model *getModel() const override { return m_model; } | 38 ModelId 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 |
61 void setProperties(const QXmlAttributes &attributes) override; | 61 void setProperties(const QXmlAttributes &attributes) override; |
62 | 62 |
63 bool canExistWithoutModel() const override { return true; } | 63 bool canExistWithoutModel() const override { return true; } |
64 | 64 |
65 protected: | 65 protected: |
66 Model *m_model; | 66 ModelId m_model; |
67 LabelHeight m_labelHeight; | 67 LabelHeight m_labelHeight; |
68 | 68 |
69 int getDefaultColourHint(bool dark, bool &impose) override; | 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; |