comparison layer/TimeValueLayer.h @ 1205:42217d9c5920 3.0-integration

Fix erroneous use of single-colour setting to determine dark/light background when in segmentation mode
author Chris Cannam
date Tue, 20 Dec 2016 11:53:14 +0000
parents 4fe7a09be0fe
children a8e126fe6a53
comparison
equal deleted inserted replaced
1204:d421df27e184 1205:42217d9c5920
144 virtual void toXml(QTextStream &stream, QString indent = "", 144 virtual void toXml(QTextStream &stream, QString indent = "",
145 QString extraAttributes = "") const; 145 QString extraAttributes = "") const;
146 146
147 void setProperties(const QXmlAttributes &attributes); 147 void setProperties(const QXmlAttributes &attributes);
148 148
149 /// Override from SingleColourLayer
149 virtual ColourSignificance getLayerColourSignificance() const { 150 virtual ColourSignificance getLayerColourSignificance() const {
150 if (m_plotStyle == PlotSegmentation) { 151 if (m_plotStyle == PlotSegmentation) {
151 return ColourHasMeaningfulValue; 152 return ColourHasMeaningfulValue;
152 } else { 153 } else {
153 return ColourDistinguishes; 154 return ColourDistinguishes;
155 }
156 }
157
158 /// Override from SingleColourLayer
159 virtual bool hasLightBackground() const {
160 if (m_plotStyle == PlotSegmentation) {
161 return true;
162 } else {
163 return SingleColourLayer::hasLightBackground();
154 } 164 }
155 } 165 }
156 166
157 /// VerticalScaleLayer and ColourScaleLayer methods 167 /// VerticalScaleLayer and ColourScaleLayer methods
158 virtual int getYForValue(LayerGeometryProvider *, double value) const; 168 virtual int getYForValue(LayerGeometryProvider *, double value) const;