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