Qt 5.8 | Qt Data Visualization | C++ Classes | QAbstract3DAxis

Qt 5.8.0 Reference Documentation

# QAbstract3DAxis Class

QAbstract3DAxis is base class for axes of a graph. More...

Header: | #include <QAbstract3DAxis>
Since: | QtDataVisualization 1.0
Instantiated By: | AbstractAxis3D
Inherited By: | QCategory3DAxis and QValue3DAxis

- List of all members, including inherited members

## Public Types

enum | AxisOrientation { AxisOrientationNone, AxisOrientationX, AxisOrientationY, AxisOrientationZ }
enum | AxisType { AxisTypeNone, AxisTypeCategory, AxisTypeValue }

## Properties

- autoAdjustRange : bool
- labelAutoRotation : float
- labels : QStringList
- max : float
- min : float

- orientation : const AxisOrientation
- title : QString
- titleFixed : bool
- titleVisible : bool
- type : const AxisType

## Public Functions

virtual | ~QAbstract3DAxis()
bool | isAutoAdjustRange() const
bool | isTitleFixed() const
bool | isTitleVisible() const
float | labelAutoRotation() const
QStringList | labels() const
float | max() const
float | min() const
AxisOrientation | orientation() const
void | setAutoAdjustRange(bool autoAdjust)
void | setLabelAutoRotation(float angle)
void | setLabels(const QStringList &labels)
void | setMax(float max)
void | setMin(float min)
void | setRange(float min, float max)
void | setTitle(const QString &title)
void | setTitleFixed(bool fixed)
void | setTitleVisible(bool visible)
QString | title() const
AxisType | type() const

## Signals

void | autoAdjustRangeChanged(bool autoAdjust)
void | labelAutoRotationChanged(float angle)
void | labelsChanged()
void | maxChanged(float value)
void | minChanged(float value)
void | orientationChanged(QAbstract3DAxis::AxisOrientation orientation)
void | rangeChanged(float min, float max)
void | titleChanged(const QString &newTitle)
void | titleFixedChanged(bool fixed)
void | titleVisibilityChanged(bool visible)

## Detailed Description

QAbstract3DAxis is base class for axes of a graph.

You should not need to use this class directly, but one of its subclasses instead.

See also QCategory3DAxis and QValue3DAxis.

## Member Type Documentation

### enum QAbstract3DAxis::AxisOrientation

The orientation of the axis object.

Constant | Value
--- | ---
`QAbstract3DAxis::AxisOrientationNone` | `0`
`QAbstract3DAxis::AxisOrientationX` | `1`
`QAbstract3DAxis::AxisOrientationY` | `2`
`QAbstract3DAxis::AxisOrientationZ` | `4`

### enum QAbstract3DAxis::AxisType

The type of the axis object.

Constant | Value
--- | ---
`QAbstract3DAxis::AxisTypeNone` | `0`
`QAbstract3DAxis::AxisTypeCategory` | `1`
`QAbstract3DAxis::AxisTypeValue` | `2`

## Property Documentation

### autoAdjustRange : bool

If set, the axis will automatically adjust the range so that all data fits in it.

Access functions:

bool | isAutoAdjustRange() const
void | setAutoAdjustRange(bool autoAdjust)

Notifier signal:

void | autoAdjustRangeChanged(bool autoAdjust)

See also setRange(), setMin(), and setMax().

### labelAutoRotation : float

Defines the maximum angle the labels can autorotate when the camera angle changes. The angle can be between 0 and 90, inclusive. The default value is 0. If the value is 0, axis labels do not automatically rotate. If the value is greater than zero, labels attempt to orient themselves toward the camera, up to the specified angle.

Access functions:

float | labelAutoRotation() const
void | setLabelAutoRotation(float angle)

Notifier signal:

void | labelAutoRotationChanged(float angle)

### labels : QStringList

Defines the labels for the axis.

Note: Setting this property for QValue3DAxis does nothing, as it generates labels automatically.

Access functions:

QStringList | labels() const
void | setLabels(const QStringList &labels)

Notifier signal:

void | labelsChanged()

### max : float

Defines the maximum value on the axis. When setting this property the min is adjusted if necessary, to ensure that the range remains valid.

Note: For QCategory3DAxis this specifies the index of the last row or column to show.

Access functions:

float | max() const
void | setMax(float max)

Notifier signal:

void | maxChanged(float value)

### min : float

Defines the minimum value on the axis. When setting this property the max is adjusted if necessary, to ensure that the range remains valid.

Note: For QCategory3DAxis this specifies the index of the first row or column to show.

Access functions:

float | min() const
void | setMin(float min)

Notifier signal:

void | minChanged(float value)

### orientation : const AxisOrientation

Defines the orientation of the axis, one of AxisOrientation.

Access functions:

AxisOrientation | orientation() const

Notifier signal:

void | orientationChanged(QAbstract3DAxis::AxisOrientation orientation)

### title : QString

Defines the title for the axis.

Access functions:

QString | title() const
void | setTitle(const QString &title)

Notifier signal:

void | titleChanged(const QString &newTitle)

See also titleVisible and titleFixed.

### titleFixed : bool

If `true`, axis titles in the primary graph view will be rotated towards the camera similarly to the axis labels. If `false`, axis titles are only rotated around their axis but are not otherwise oriented towards the camera. This property doesn't have any effect if labelAutoRotation property value is zero. Default value is `true`.

Access functions:

bool | isTitleFixed() const
void | setTitleFixed(bool fixed)

Notifier signal:

void | titleFixedChanged(bool fixed)

See also labelAutoRotation, title, and titleVisible.

### titleVisible : bool

Defines if the axis title is visible in the primary graph view. The default value is `false`.

Access functions:

bool | isTitleVisible() const
void | setTitleVisible(bool visible)

Notifier signal:

void | titleVisibilityChanged(bool visible)

See also title and titleFixed.

### type : const AxisType

Defines the type of the axis, one of AxisType.

Access functions:

AxisType | type() const

## Member Function Documentation

### `[virtual]` QAbstract3DAxis::~QAbstract3DAxis()

Destroys QAbstract3DAxis.

### `[signal]` void QAbstract3DAxis::rangeChanged(float min, float max)

Emits range min and max values when range changes.

### void QAbstract3DAxis::setRange(float min, float max)

Sets value range of the axis from min to max. When setting the range, the max is adjusted if necessary, to ensure that the range remains valid.

Note: For QCategory3DAxis this specifies the index range of rows or columns to show.