Mercurial > hg > svgui
diff layer/TimeValueLayer.h @ 1324:13d9b422f7fe zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Mon, 17 Sep 2018 13:51:31 +0100 |
parents | a34a2a25907c |
children | d79e21855aef |
line wrap: on
line diff
--- a/layer/TimeValueLayer.h Mon Dec 12 15:18:52 2016 +0000 +++ b/layer/TimeValueLayer.h Mon Sep 17 13:51:31 2018 +0100 @@ -13,8 +13,8 @@ COPYING included with this distribution for more information. */ -#ifndef _TIME_VALUE_LAYER_H_ -#define _TIME_VALUE_LAYER_H_ +#ifndef SV_TIME_VALUE_LAYER_H +#define SV_TIME_VALUE_LAYER_H #include "SingleColourLayer.h" #include "VerticalScaleLayer.h" @@ -46,8 +46,8 @@ virtual QString getLabelPreceding(sv_frame_t) const; virtual bool snapToFeatureFrame(LayerGeometryProvider *v, sv_frame_t &frame, - int &resolution, - SnapType snap) const; + int &resolution, + SnapType snap) const; virtual bool snapToSimilarFeature(LayerGeometryProvider *v, sv_frame_t &frame, int &resolution, SnapType snap) const; @@ -85,19 +85,19 @@ virtual int getPropertyRangeAndValue(const PropertyName &, int *min, int *max, int *deflt) const; virtual QString getPropertyValueLabel(const PropertyName &, - int value) const; + int value) const; virtual void setProperty(const PropertyName &, int value); void setFillColourMap(int); int getFillColourMap() const { return m_colourMap; } enum PlotStyle { - PlotPoints, - PlotStems, - PlotConnectedPoints, - PlotLines, - PlotCurve, - PlotSegmentation, + PlotPoints, + PlotStems, + PlotConnectedPoints, + PlotLines, + PlotCurve, + PlotSegmentation, PlotDiscreteCurves }; @@ -146,6 +146,7 @@ void setProperties(const QXmlAttributes &attributes); + /// Override from SingleColourLayer virtual ColourSignificance getLayerColourSignificance() const { if (m_plotStyle == PlotSegmentation) { return ColourHasMeaningfulValue; @@ -154,6 +155,15 @@ } } + /// Override from SingleColourLayer + virtual bool hasLightBackground() const { + if (m_plotStyle == PlotSegmentation) { + return true; + } else { + return SingleColourLayer::hasLightBackground(); + } + } + /// VerticalScaleLayer and ColourScaleLayer methods virtual int getYForValue(LayerGeometryProvider *, double value) const; virtual double getValueForY(LayerGeometryProvider *, int y) const;