comparison layer/SliceLayer.h @ 1281:fc9d9f1103fa horizontal-scale

Provide linear horizontal scale in spectrum as well as log; fix bin positioning and colour scale property box updating; ensure proper background colour and visibility of peak lines
author Chris Cannam
date Thu, 03 May 2018 15:15:15 +0100
parents a34a2a25907c
children 51e6125627fa
comparison
equal deleted inserted replaced
1280:34394e8c2942 1281:fc9d9f1103fa
30 30
31 public: 31 public:
32 SliceLayer(); 32 SliceLayer();
33 ~SliceLayer(); 33 ~SliceLayer();
34 34
35 // virtual void setModel(const Model *model);
36 // virtual const Model *getModel() const { return m_model; }
37 virtual const Model *getModel() const { return 0; } 35 virtual const Model *getModel() const { return 0; }
38 36
39 void setSliceableModel(const Model *model); 37 void setSliceableModel(const Model *model);
40 38
41 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const; 39 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const;
46 virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const; 44 virtual void paintVerticalScale(LayerGeometryProvider *v, bool, QPainter &paint, QRect rect) const;
47 45
48 virtual ColourSignificance getLayerColourSignificance() const { 46 virtual ColourSignificance getLayerColourSignificance() const {
49 return ColourAndBackgroundSignificant; 47 return ColourAndBackgroundSignificant;
50 } 48 }
49
50 virtual bool hasLightBackground() const;
51 51
52 virtual PropertyList getProperties() const; 52 virtual PropertyList getProperties() const;
53 virtual QString getPropertyLabel(const PropertyName &) const; 53 virtual QString getPropertyLabel(const PropertyName &) const;
54 virtual QString getPropertyIconName(const PropertyName &) const; 54 virtual QString getPropertyIconName(const PropertyName &) const;
55 virtual PropertyType getPropertyType(const PropertyName &) const; 55 virtual PropertyType getPropertyType(const PropertyName &) const;
83 83
84 enum PlotStyle { PlotLines, PlotSteps, PlotBlocks, PlotFilledBlocks }; 84 enum PlotStyle { PlotLines, PlotSteps, PlotBlocks, PlotFilledBlocks };
85 85
86 enum BinScale { LinearBins, LogBins, InvertedLogBins }; 86 enum BinScale { LinearBins, LogBins, InvertedLogBins };
87 87
88 bool usesSolidColour() const { return m_plotStyle == PlotFilledBlocks; }
89
88 void setFillColourMap(int); 90 void setFillColourMap(int);
89 int getFillColourMap() const { return m_colourMap; } 91 int getFillColourMap() const { return m_colourMap; }
90 92
91 void setEnergyScale(EnergyScale); 93 void setEnergyScale(EnergyScale);
92 EnergyScale getEnergyScale() const { return m_energyScale; } 94 EnergyScale getEnergyScale() const { return m_energyScale; }