#include <Axis.h>
Public Member Functions | |
| virtual QWidget * | getWidget ()=0 |
| virtual AxisPosition | getPosition () const =0 |
| virtual void | setTitle (const std::string &title)=0 |
| virtual std::string | getTitle () const =0 |
| virtual void | setTitleFont (const Font &font)=0 |
| virtual const Font & | getTitleFont () const =0 |
| virtual void | setTitleColor (const ColorType &titleColor)=0 |
| virtual ColorType | getTitleColor () const =0 |
| virtual void | setScaleType (ScaleType scaleType)=0 |
| virtual ScaleType | getScaleType () const =0 |
| virtual void | setValueRange (double dMin, double dMax)=0 |
| virtual double | getMinimumValue () const =0 |
| virtual double | getMaximumValue () const =0 |
| virtual std::vector< double > | getMajorTickLocations () const =0 |
| virtual std::vector< double > | getMinorTickLocations () const =0 |
| virtual void | setMaxNumMajorTicks (int numTicks)=0 |
| virtual void | setMaxNumMinorTicks (int numTicks)=0 |
| virtual int | getMaxNumMajorTicks () const =0 |
| virtual int | getMaxNumMinorTicks () const =0 |
| virtual void | setLabelFormat (const std::string &labelFormat)=0 |
| virtual std::string | getLabelFormat () const =0 |
Protected Member Functions | |
| virtual | ~Axis () |
The Axis widget calculates values according to a scale type and displays values along the scale with tick marks. In the PlotWidget, axis widgets are positioned around a PlotView to show the currently displayed area of the plot.
This interface provides access to associate a title with the axis and to change its text properties and to define the scale that is used to calculate the axis values.
Definition at line 36 of file Axis.h.
| virtual Axis::~Axis | ( | ) | [protected, virtual] |
This object should be destroyed by calling DesktopServices::deleteAxis().
| virtual QWidget* Axis::getWidget | ( | ) | [pure virtual] |
Returns the Qt widget that displays the axis.
This method returns the Qt widget that displays the axis. This can be used to add the axis to a custom dialog or widget if it is not already contained in a PlotWidget.
| virtual AxisPosition Axis::getPosition | ( | ) | const [pure virtual] |
Returns the axis position.
The axis poisition is the position where the axis should be displayed relative to a plot view. It defines how the tick marks are drawn and how the text is oriented.
| virtual void Axis::setTitle | ( | const std::string & | title | ) | [pure virtual] |
Sets the title text.
| title | The new title text. |
| virtual std::string Axis::getTitle | ( | ) | const [pure virtual] |
Returns the title text.
| virtual void Axis::setTitleFont | ( | const Font & | font | ) | [pure virtual] |
Sets the font for the title text.
| font | The new title font. |
| virtual const Font& Axis::getTitleFont | ( | ) | const [pure virtual] |
Returns read-only access to the title text font.
| virtual void Axis::setTitleColor | ( | const ColorType & | titleColor | ) | [pure virtual] |
Sets the title text color.
| titleColor | The new title text color. |
| virtual ColorType Axis::getTitleColor | ( | ) | const [pure virtual] |
Returns the title color.
| virtual void Axis::setScaleType | ( | ScaleType | scaleType | ) | [pure virtual] |
Sets the axis scale type.
| scaleType | The new scale type. |
| virtual ScaleType Axis::getScaleType | ( | ) | const [pure virtual] |
Returns the axis scale type.
| virtual void Axis::setValueRange | ( | double | dMin, | |
| double | dMax | |||
| ) | [pure virtual] |
Sets the minimum and maximum values.
| dMin | The new minimum value. | |
| dMax | The new maximum value. |
| virtual double Axis::getMinimumValue | ( | ) | const [pure virtual] |
Returns the minimum axis value.
| virtual double Axis::getMaximumValue | ( | ) | const [pure virtual] |
Returns the maximum axis value.
| virtual std::vector<double> Axis::getMajorTickLocations | ( | ) | const [pure virtual] |
Returns the values of all major tick mark locations.
| virtual std::vector<double> Axis::getMinorTickLocations | ( | ) | const [pure virtual] |
Returns the values of all minor tick mark locations.
| virtual void Axis::setMaxNumMajorTicks | ( | int | numTicks | ) | [pure virtual] |
Sets the maximum number of major tick marks along the axis scale.
This method sets the maximum number of major tick marks to display along the axis scale. Calling this method recalculates the scale based on the current minimum and maximum values.
| numTicks | The new maximum number of major tick marks. |
| virtual void Axis::setMaxNumMinorTicks | ( | int | numTicks | ) | [pure virtual] |
Sets the maximum number of minor tick marks along the axis scale.
This method sets the maximum number of minor tick marks to display between each major tick mark along the axis scale. Calling this method recalculates the scale based on the current minimum and maximum values.
| numTicks | The new maximum number of minor tick marks. |
| virtual int Axis::getMaxNumMajorTicks | ( | ) | const [pure virtual] |
Returns the maximum number of major tick marks along the axis scale.
This method returns the maximum number of major tick marks that are displayed between the minimum and maximum value. The default value is ten.
| virtual int Axis::getMaxNumMinorTicks | ( | ) | const [pure virtual] |
Returns the maximum number of minor tick marks along the axis scale.
This method returns the maximum number of minor tick marks that are displayed between each major tick mark along the axis scale. The default value is four.
| virtual void Axis::setLabelFormat | ( | const std::string & | labelFormat | ) | [pure virtual] |
Sets the format for the value text labels.
This method sets the display format for the value text labels displayed at the major tick mark locations. This method can be called to set a desired precision or to enforce or prevent scientific notation on the value labels.
| labelFormat | The new text format for the values, whose syntax is identical to the format string provided to sprintf() in the standard C++ library. |
| virtual std::string Axis::getLabelFormat | ( | ) | const [pure virtual] |
Returns the format for the value text labels.
This method returns the display format for the value text labels displayed at the major tick mark locations.