Axis Class Reference

Displays plot values along a scale. More...

#include <Axis.h>

List of all members.

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 FontgetTitleFont () 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 ()


Detailed Description

Displays plot values along a scale.

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.

See also:
PlotWidget

Definition at line 36 of file Axis.h.


Constructor & Destructor Documentation

virtual Axis::~Axis (  )  [protected, virtual]

This object should be destroyed by calling DesktopServices::deleteAxis().

Definition at line 249 of file Axis.h.


Member Function Documentation

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.

Returns:
A pointer to the Qt widget that displays the axis.

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.

Returns:
The axis position.

virtual void Axis::setTitle ( const std::string &  title  )  [pure virtual]

Sets the title text.

Parameters:
title The new title text.

virtual std::string Axis::getTitle (  )  const [pure virtual]

Returns the title text.

Returns:
The current title. An empty string is returned if a title has not yet been set.

virtual void Axis::setTitleFont ( const Font font  )  [pure virtual]

Sets the font for the title text.

Parameters:
font The new title font.

virtual const Font& Axis::getTitleFont (  )  const [pure virtual]

Returns read-only access to the title text font.

Returns:
The current title text font. To modify the font values, call setTitleFont() instead.

virtual void Axis::setTitleColor ( const ColorType titleColor  )  [pure virtual]

Sets the title text color.

Parameters:
titleColor The new title text color.

virtual ColorType Axis::getTitleColor (  )  const [pure virtual]

Returns the title color.

Returns:
The current title text color. A valid color is returned even if the title is empty.

virtual void Axis::setScaleType ( ScaleType  scaleType  )  [pure virtual]

Sets the axis scale type.

Parameters:
scaleType The new scale type.

virtual ScaleType Axis::getScaleType (  )  const [pure virtual]

Returns the axis scale type.

Returns:
The scale type.

virtual void Axis::setValueRange ( double  dMin,
double  dMax 
) [pure virtual]

Sets the minimum and maximum values.

Parameters:
dMin The new minimum value.
dMax The new maximum value.

virtual double Axis::getMinimumValue (  )  const [pure virtual]

Returns the minimum axis value.

Returns:
The minimum value of the axis.

virtual double Axis::getMaximumValue (  )  const [pure virtual]

Returns the maximum axis value.

Returns:
The maximum value of the axis.

virtual std::vector<double> Axis::getMajorTickLocations (  )  const [pure virtual]

Returns the values of all major tick mark locations.

Returns:
The major tick mark values. The values are guaranteed to be between the minimum and maximum value inclusive.
See also:
getMinorTickLocations(), getMinimumValue(), getMaximumValue()

virtual std::vector<double> Axis::getMinorTickLocations (  )  const [pure virtual]

Returns the values of all minor tick mark locations.

Returns:
The minor tick mark values. The values are guaranteed to be between the minimum and maximum value inclusive.
See also:
getMajorTickLocations(), getMinimumValue(), getMaximumValue()

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.

Parameters:
numTicks The new maximum number of major tick marks.
See also:
setMaxNumMinorTicks()

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.

Parameters:
numTicks The new maximum number of minor tick marks.
See also:
setMaxNumMajorTicks()

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.

Returns:
The maximum value of major tick marks.

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.

Returns:
The maximum value of minor tick marks.

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.

Parameters:
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.

Returns:
The text format for the values, whose syntax is identical to the format string provided to sprintf() in the standard C++ library.


Software Development Kit - Opticks 4.9.0 Build 16218