comparison layer/TimeValueLayer.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
72 72
73 void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override; 73 void copy(LayerGeometryProvider *v, Selection s, Clipboard &to) override;
74 bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset, 74 bool paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t frameOffset,
75 bool interactive) override; 75 bool interactive) override;
76 76
77 const Model *getModel() const override { return m_model; } 77 ModelId getModel() const override { return m_model; }
78 void setModel(SparseTimeValueModel *model); 78 void setModel(ModelId model); // a SparseTimeValueModel
79 79
80 PropertyList getProperties() const override; 80 PropertyList getProperties() const override;
81 QString getPropertyLabel(const PropertyName &) const override; 81 QString getPropertyLabel(const PropertyName &) const override;
82 QString getPropertyIconName(const PropertyName &) const override; 82 QString getPropertyIconName(const PropertyName &) const override;
83 PropertyType getPropertyType(const PropertyName &) const override; 83 PropertyType getPropertyType(const PropertyName &) const override;
122 122
123 bool isLayerScrollable(const LayerGeometryProvider *v) const override; 123 bool isLayerScrollable(const LayerGeometryProvider *v) const override;
124 124
125 bool isLayerEditable() const override { return true; } 125 bool isLayerEditable() const override { return true; }
126 126
127 int getCompletion(LayerGeometryProvider *) const override { return m_model->getCompletion(); } 127 int getCompletion(LayerGeometryProvider *) const override;
128 128
129 bool needsTextLabelHeight() const override { 129 bool needsTextLabelHeight() const override;
130 return m_plotStyle == PlotSegmentation && m_model->hasTextLabels();
131 }
132 130
133 bool getValueExtents(double &min, double &max, 131 bool getValueExtents(double &min, double &max,
134 bool &logarithmic, QString &unit) const override; 132 bool &logarithmic, QString &unit) const override;
135 133
136 bool getDisplayExtents(double &min, double &max) const override; 134 bool getDisplayExtents(double &min, double &max) const override;
176 174
177 EventVector getLocalPoints(LayerGeometryProvider *v, int) const; 175 EventVector getLocalPoints(LayerGeometryProvider *v, int) const;
178 176
179 int getDefaultColourHint(bool dark, bool &impose) override; 177 int getDefaultColourHint(bool dark, bool &impose) override;
180 178
181 SparseTimeValueModel *m_model; 179 ModelId m_model;
182 bool m_editing; 180 bool m_editing;
183 Event m_originalPoint; 181 Event m_originalPoint;
184 Event m_editingPoint; 182 Event m_editingPoint;
185 ChangeEventsCommand *m_editingCommand; 183 ChangeEventsCommand *m_editingCommand;
186 int m_colourMap; 184 int m_colourMap;