IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QAbstractAxis Class

The QAbstractAxis class is a base class used for specialized axis classes.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAbstractAxis Class

Detailed Description

Each series can be bound to only one horizontal and vertical axis.

The properties and visibility of various axis elements, such as axis line, title, labels, and grid lines, can be individually controlled.

Member Type Documentation

 

enum QAbstractAxis::AxisType

flags QAbstractAxis::AxisTypes

This enum type specifies the type of the axis object.

Constant

QAbstractAxis::AxisTypeNoAxis

0x0

QAbstractAxis::AxisTypeValue

0x1

QAbstractAxis::AxisTypeBarCategory

0x2

The AxisTypes type is a typedef for QFlags<AxisType>. It stores an OR combination of AxisType values.

Property Documentation

 

[read-only] alignment : const Qt::Alignment

This property holds the alignment of the axis.

Can be Qt::AlignLeft, Qt::AlignRight, Qt::AlignBottom, or Qt::AlignTop.

Access functions:

  • alignment() const

gridVisible : bool

This property holds the visibility of the grid lines. By default, the value is true.

Access functions:

  • bool isGridLineVisible() const

  • void setGridLineVisible(bool visible = true)

Notifier signal:

labelsAngle : qreal

This property holds the angle of the axis labels in degrees.

Access functions:

  • labelsAngle() const

  • void setLabelsAngle( angle)

Notifier signal:

labelsVisible : bool

This property holds whether axis labels are visible. By default, the value is true.

Access functions:

  • bool labelsVisible() const

  • void setLabelsVisible(bool visible = true)

Notifier signal:

lineVisible : bool

This property holds the visibility of the axis line. By default, the value is true.

Access functions:

Notifier signal:

minorGridVisible : bool

This property holds the visibility of the minor grid lines.

Applies only to axes that support minor grid lines. By default, the value is true.

Access functions:

  • bool isMinorGridLineVisible() const

  • void setMinorGridLineVisible(bool visible = true)

Notifier signal:

[read-only] orientation : const Qt::Orientation

This property holds the orientation of the axis.

Fixed to either Qt::Horizontal or Qt::Vertical when the axis is added to a graph.

Access functions:

titleColor : QColor

This property holds the color used to draw the title text.

Access functions:

Notifier signal:

titleFont : QFont

This property holds the font of the title of the axis.

Access functions:

Notifier signal:

titleText : QString

This property holds the title of the axis.

Empty by default. Axis titles support HTML formatting.

Access functions:

  • titleText() const

  • void setTitleText(const &title)

Notifier signal:

titleVisible : bool

This property holds the visibility of the axis title.

By default, the value is true.

Access functions:

  • bool isTitleVisible() const

  • void setTitleVisible(bool visible = true)

Notifier signal:

visible : bool

This property holds the visibility of the axis. By default, the value is true.

Access functions:

  • bool isVisible() const

  • void setVisible(bool visible = true)

Notifier signal:

Member Function Documentation

 

[virtual] QAbstractAxis::~QAbstractAxis()

Destructs the axis object. When the axis is added to a graph, the graph object takes ownership.

void QAbstractAxis::gridVisibleChanged(bool visible)

This signal is emitted when the visibility of the grid lines of the axis changes to visible.

Notifier signal for property gridVisible.

void QAbstractAxis::hide()

Makes the axis, labels, and grid lines invisible.

void QAbstractAxis::labelsAngleChanged(qreal angle)

This signal is emitted when the angle of the axis labels changes to angle.

Notifier signal for property labelsAngle.

void QAbstractAxis::labelsVisibleChanged(bool visible)

This signal is emitted when the visibility of the labels of the axis changes to visible.

Notifier signal for property labelsVisible.

void QAbstractAxis::lineVisibleChanged(bool visible)

This signal is emitted when the visibility of the axis line changes to visible.

Notifier signal for property lineVisible.

void QAbstractAxis::minorGridVisibleChanged(bool visible)

This signal is emitted when the visibility of the minor grid lines of the axis changes to visible.

Notifier signal for property minorGridVisible.

Qt::Orientation QAbstractAxis::orientation() const

Returns the orientation of the axis (vertical or horizontal).

Getter function for property orientation.

void QAbstractAxis::setLineVisible(bool visible = true)

Determines whether the axis line and tick marks are visible.

Setter function for property lineVisible.

See Also

See also isLineVisible()

void QAbstractAxis::setMax(const QVariant &max)

Sets the maximum value shown on the axis. Depending on the actual axis type, the max parameter is converted to the appropriate type of value. If the conversion is impossible, the function call does nothing.

void QAbstractAxis::setMin(const QVariant &min)

Sets the minimum value shown on the axis. Depending on the actual axis type, the min parameter is converted to the appropriate type of value. If the conversion is impossible, the function call does nothing.

void QAbstractAxis::setRange(const QVariant &min, const QVariant &max)

Sets the range shown on the axis. Depending on the actual axis type, the min and max parameters are converted to appropriate types of values. If the conversion is impossible, the function call does nothing.

void QAbstractAxis::setTitleColor(const QColor &color)

Sets the color used to draw titles to color.

Setter function for property titleColor.

See Also

See also titleColor()

void QAbstractAxis::setTitleFont(const QFont &font)

Sets the font used to draw titles to font.

Setter function for property titleFont.

See Also

See also titleFont()

void QAbstractAxis::setVisible(bool visible = true)

Sets the visibility of the axis, labels, and grid lines to visible.

Setter function for property visible.

See Also

See also isVisible()

void QAbstractAxis::show()

Makes the axis, labels, and grid lines visible.

QColor QAbstractAxis::titleColor() const

Returns the color used to draw titles.

Getter function for property titleColor.

See Also

See also setTitleColor()

void QAbstractAxis::titleColorChanged(const QColor &color)

This signal is emitted when the color used to draw the axis title changes to color.

Notifier signal for property titleColor.

QFont QAbstractAxis::titleFont() const

Returns the font used to draw titles.

Getter function for property titleFont.

See Also

See also setTitleFont()

void QAbstractAxis::titleFontChanged(const QFont &font)

This signal is emitted when the font of the axis title changes to font.

Notifier signal for property titleFont.

void QAbstractAxis::titleTextChanged(const QString &text)

This signal is emitted when the text of the axis title changes to text.

Notifier signal for property titleText.

void QAbstractAxis::titleVisibleChanged(bool visible)

This signal is emitted when the visibility of the title text of the axis changes to visible.

Notifier signal for property titleVisible.

[pure virtual] QAbstractAxis::AxisType QAbstractAxis::type() const

Returns the type of the axis.

void QAbstractAxis::update()

This signal is emitted when the axis needs to be updated.

void QAbstractAxis::visibleChanged(bool visible)

This signal is emitted when the visibility of the axis changes to visible.

Notifier signal for property visible.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+