14 #include "msdevstudio/MSconfig.h"
30 m_num_bins ( s_num_bins ),
38 : m_name ( binner.m_name ),
40 m_num_bins( binner.m_num_bins ),
41 m_range ( binner.m_range ),
42 m_offset ( binner.m_offset ),
43 m_width ( binner.m_width )
134 double multiplier = ( 50 - parm ) / 50.0;
136 if ( num_start == 1 ) {
139 double num_new = num_start + num_start * multiplier;
141 num_new = std::max ( 1.0, num_new );
void setStartRange(bool dragging) const
Sets the starting Range.
Range m_range_start
The Range at the start of dragging.
bool m_dragging
The status of dragging.
double calcBinWidth(int parm, bool dragging) const
Calculates the bin width parameter when dragging a slider control.
std::vector< double > m_bin_edges
The coordinates of the edges of bins.
virtual double axisBinWidth(int i) const =0
Returns the width of each bin.
double m_width
The width parameter for the binning.
static double s_bin_factor
The scale factor used to calculate new bin width from slider.
The base class for the BinnerAxis hierarchy.
const std::string m_name
The name of the binner.
double axisGetHigh() const
Returns the lower edge of the last + 1 bin.
double m_width_start
The width parameter at the start of dragging.
virtual int getNob(double width) const =0
Returns the number of bins given the width parameter width.
virtual bool hasEqualWidths() const
Returns true if all the bins have the same width.
double low() const
Returns the minimum of the range object.
double axisGetLow() const
Returns the lower edge of the first bin.
BinnerAxis(const BinnerAxis &binner)
The copy constructor.
Range m_range
The range of the bins.
virtual ~BinnerAxis()
The destructor.
int axisNumberOfBins() const
Returns the number of bins.
hippodraw::BinnerAxis class interface
const Range & getRange() const
Returns the range.
virtual double calcWidthParm(int number) const =0
Calculates the bin width parameter given the number of bins.
double high() const
Returns the maximum of the range object.
static int s_num_bins
The default number of bins.
virtual const std::vector< double > & binEdges()
Returns the vector of coordinates of the bin edges i.e returns the member m_edges.
int m_num_bins
The number of bins.
void setStartWidth(bool dragging) const
Sets the starting width parameter.
const std::string & name() const
Returns the name of this binner.
Expresses a range of values.