Public Member Functions | Static Public Member Functions

vtkQtChartAxisDomain Class Reference

The vtkQtChartAxisDomain class is used to merge similar domains for an axis. More...

#include <vtkQtChartAxisDomain.h>

List of all members.

Public Member Functions

 vtkQtChartAxisDomain ()
 vtkQtChartAxisDomain (const vtkQtChartAxisDomain &other)
 ~vtkQtChartAxisDomain ()
vtkQtChartAxisDomainoperator= (const vtkQtChartAxisDomain &other)
Setup Methods
bool isEmpty () const
 Gets whether or not the domain is empty.
bool isRangeInList () const
 Gets whether or not the range is inside the list.
vtkQtChartAxis::AxisDomain getDomainType () const
 Gets the axis domain type.
QVariant::Type getVariantType () const
 Gets the QVariant domain type.
bool isTypeCompatible (QVariant::Type domain) const
 Gets whether or not the given type is compatible with the current domain type.
const QList< QVariant > & getDomain (bool &isRange) const
 Gets the current domain.
void setRange (const QList< QVariant > &range)
 Sets the domain to the given range.
void setDomain (const QList< QVariant > &domain)
 Sets the domain to the given list of values.
bool mergeRange (const QList< QVariant > &range)
 Merges the given range with the current domain.
bool mergeDomain (const QList< QVariant > &domain)
 Merges the given list with the current domain.
bool mergeDomain (const vtkQtChartAxisDomain &other)
 Merges the given domain with the current domain.
void clear ()
 Clears the domain contents.
Preference Methods
bool isRangePaddingUsed () const
 Gets whether or not the range should be padded.
void setRangePaddingUsed (bool padRange)
 Sets whether or not the range should be padded.
bool isExpansionToZeroUsed () const
 Gets whether or not the range should be expanded to zero.
void setExpansionToZeroUsed (bool expand)
 Sets whether or not the range should be expanded to zero.
bool isExtraSpaceUsed () const
 Gets whether or not space should be added to the end labels.
void setExtraSpaceUsed (bool addSpace)
 Sets whether or not space should be added to the end labels.
void setPreferences (bool padRange, bool expandToZero, bool addSpace)
 Sets the axis preferences.

Static Public Member Functions

static vtkQtChartAxis::AxisDomain getAxisDomain (QVariant::Type domain)
 Translates the QVariant type to axis domain type.
static void sort (QList< QVariant > &list)
 Sorts the list of variants according to value.

Detailed Description

The vtkQtChartAxisDomain class is used to merge similar domains for an axis.

Definition at line 37 of file vtkQtChartAxisDomain.h.


Constructor & Destructor Documentation

vtkQtChartAxisDomain::vtkQtChartAxisDomain (  )
vtkQtChartAxisDomain::vtkQtChartAxisDomain ( const vtkQtChartAxisDomain other )
vtkQtChartAxisDomain::~vtkQtChartAxisDomain (  ) [inline]

Definition at line 42 of file vtkQtChartAxisDomain.h.

{}

Member Function Documentation

void vtkQtChartAxisDomain::clear (  )

Clears the domain contents.

static vtkQtChartAxis::AxisDomain vtkQtChartAxisDomain::getAxisDomain ( QVariant::Type  domain ) [static]

Translates the QVariant type to axis domain type.

Parameters:
domainThe QVariant domain type.
Returns:
The axis domain type.
const QList<QVariant>& vtkQtChartAxisDomain::getDomain ( bool &  isRange ) const

Gets the current domain.

Parameters:
isRangeUsed to return whether or not the domain is a range.
Returns:
A reference to the current domain values.
vtkQtChartAxis::AxisDomain vtkQtChartAxisDomain::getDomainType (  ) const

Gets the axis domain type.

Returns:
The axis domain type.
QVariant::Type vtkQtChartAxisDomain::getVariantType (  ) const

Gets the QVariant domain type.

Returns:
The QVariant domain type.
bool vtkQtChartAxisDomain::isEmpty (  ) const

Gets whether or not the domain is empty.

The domain is empty if both the range and list are empty.

Returns:
True if the domain is empty.
bool vtkQtChartAxisDomain::isExpansionToZeroUsed (  ) const [inline]

Gets whether or not the range should be expanded to zero.

Returns:
True if the range should be expanded to zero.

Definition at line 148 of file vtkQtChartAxisDomain.h.

{return this->ExpandToZero;}
bool vtkQtChartAxisDomain::isExtraSpaceUsed (  ) const [inline]

Gets whether or not space should be added to the end labels.

Returns:
True if space should be added to the end labels.

Definition at line 159 of file vtkQtChartAxisDomain.h.

{return this->AddSpace;}
bool vtkQtChartAxisDomain::isRangeInList (  ) const

Gets whether or not the range is inside the list.

Returns:
True if the range is inside the list.
bool vtkQtChartAxisDomain::isRangePaddingUsed (  ) const [inline]

Gets whether or not the range should be padded.

Returns:
True if the range should be padded.

Definition at line 137 of file vtkQtChartAxisDomain.h.

{return this->PadRange;}
bool vtkQtChartAxisDomain::isTypeCompatible ( QVariant::Type  domain ) const

Gets whether or not the given type is compatible with the current domain type.

Parameters:
domainThe QVariant domain type.
Returns:
True if the given type is compatible with the current domain.
bool vtkQtChartAxisDomain::mergeDomain ( const QList< QVariant > &  domain )

Merges the given list with the current domain.

Note:
The list should be sorted before calling this method.
Parameters:
domainThe list of domain values.
Returns:
True if the merge was successful.
bool vtkQtChartAxisDomain::mergeDomain ( const vtkQtChartAxisDomain other )

Merges the given domain with the current domain.

The axis domain preferences are merged as well as the domain values.

Parameters:
otherThe domain to merge.
Returns:
True if the merge was successful.
bool vtkQtChartAxisDomain::mergeRange ( const QList< QVariant > &  range )

Merges the given range with the current domain.

Parameters:
rangeA list of two values.
Returns:
True if the merge was successful.
vtkQtChartAxisDomain& vtkQtChartAxisDomain::operator= ( const vtkQtChartAxisDomain other )
void vtkQtChartAxisDomain::setDomain ( const QList< QVariant > &  domain )

Sets the domain to the given list of values.

Note:
The list should be sorted before calling this method.
Parameters:
domainThe list of domain values.
void vtkQtChartAxisDomain::setExpansionToZeroUsed ( bool  expand ) [inline]

Sets whether or not the range should be expanded to zero.

Parameters:
expandTrue if the range should be expanded to zero.

Definition at line 153 of file vtkQtChartAxisDomain.h.

{this->ExpandToZero = expand;}
void vtkQtChartAxisDomain::setExtraSpaceUsed ( bool  addSpace ) [inline]

Sets whether or not space should be added to the end labels.

Parameters:
addSpaceTrue if space should be added to the end labels.

Definition at line 164 of file vtkQtChartAxisDomain.h.

{this->AddSpace = addSpace;}
void vtkQtChartAxisDomain::setPreferences ( bool  padRange,
bool  expandToZero,
bool  addSpace 
)

Sets the axis preferences.

Parameters:
padRangeTrue if the range should be padded.
expandToZeroTrue if the range should be expanded to zero.
addSpaceTrue if space should be added to the end labels.
void vtkQtChartAxisDomain::setRange ( const QList< QVariant > &  range )

Sets the domain to the given range.

Parameters:
rangeA list of two values.
void vtkQtChartAxisDomain::setRangePaddingUsed ( bool  padRange ) [inline]

Sets whether or not the range should be padded.

Parameters:
padRangeTrue if the range should be padded.

Definition at line 142 of file vtkQtChartAxisDomain.h.

{this->PadRange = padRange;}
static void vtkQtChartAxisDomain::sort ( QList< QVariant > &  list ) [static]

Sorts the list of variants according to value.

The list of variants is sorted according to value using a quick sort algorithm. The list is sorted in place and non-recursively.

Parameters:
listThe list of shapes to be sorted.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines