QAbstractAxis 類

The QAbstractAxis 類是用於專用軸類的基類。 更多...

頭: #include <QAbstractAxis>
實例化: AbstractAxis
繼承: QObject
繼承者: QBarCategoryAxis , QDateTimeAxis , QLogValueAxis ,和 QValueAxis

公共類型

enum AxisType { AxisTypeNoAxis, AxisTypeValue, AxisTypeBarCategory, AxisTypeCategory, AxisTypeDateTime, AxisTypeLogValue }
flags AxisTypes

特性

公共函數

~QAbstractAxis ()
Qt::Alignment alignment () const
QColor gridLineColor ()
QPen gridLinePen () const
void hide ()
bool isGridLineVisible () const
bool isLineVisible () const
bool isMinorGridLineVisible () const
bool isReverse () const
bool isTitleVisible () const
bool isVisible () const
int labelsAngle () const
QBrush labelsBrush () const
QColor labelsColor () const
QFont labelsFont () const
bool labelsVisible () const
QPen linePen () const
QColor linePenColor () const
QColor minorGridLineColor ()
QPen minorGridLinePen () const
Qt::Orientation orientation () const
void setGridLineColor (const QColor & color )
void setGridLinePen (const QPen & pen )
void setGridLineVisible (bool visible = true)
void setLabelsAngle (int angle )
void setLabelsBrush (const QBrush & brush )
void setLabelsColor (QColor color )
void setLabelsFont (const QFont & font )
void setLabelsVisible (bool visible = true)
void setLinePen (const QPen & pen )
void setLinePenColor (QColor color )
void setLineVisible (bool visible = true)
void setMax (const QVariant & max )
void setMin (const QVariant & min )
void setMinorGridLineColor (const QColor & color )
void setMinorGridLinePen (const QPen & pen )
void setMinorGridLineVisible (bool visible = true)
void setRange (const QVariant & min , const QVariant & max )
void setReverse (bool reverse = true)
void setShadesBorderColor (QColor color )
void setShadesBrush (const QBrush & brush )
void setShadesColor (QColor color )
void setShadesPen (const QPen & pen )
void setShadesVisible (bool visible = true)
void setTitleBrush (const QBrush & brush )
void setTitleFont (const QFont & font )
void setTitleText (const QString & title )
void setTitleVisible (bool visible = true)
void setVisible (bool visible = true)
QColor shadesBorderColor () const
QBrush shadesBrush () const
QColor shadesColor () const
QPen shadesPen () const
bool shadesVisible () const
void show ()
QBrush titleBrush () const
QFont titleFont () const
QString titleText () const
virtual AxisType type () const = 0

信號

void colorChanged (QColor color )
void gridLineColorChanged (const QColor & color )
void gridLinePenChanged (const QPen & pen )
void gridVisibleChanged (bool visible )
void labelsAngleChanged (int angle )
void labelsBrushChanged (const QBrush & brush )
void labelsColorChanged (QColor color )
void labelsFontChanged (const QFont & font )
void labelsVisibleChanged (bool visible )
void linePenChanged (const QPen & pen )
void lineVisibleChanged (bool visible )
void minorGridLineColorChanged (const QColor & color )
void minorGridLinePenChanged (const QPen & pen )
void minorGridVisibleChanged (bool visible )
void reverseChanged (bool reverse )
void shadesBorderColorChanged (QColor color )
void shadesBrushChanged (const QBrush & brush )
void shadesColorChanged (QColor color )
void shadesPenChanged (const QPen & pen )
void shadesVisibleChanged (bool visible )
void titleBrushChanged (const QBrush & brush )
void titleFontChanged (const QFont & font )
void titleTextChanged (const QString & text )
void titleVisibleChanged (bool visible )
void visibleChanged (bool visible )

額外繼承成員

詳細描述

The QAbstractAxis 類是用於專用軸類的基類。

Each series can be bound to one or more horizontal and vertical axes, but mixing axis types that would result in different domains is not supported, such as specifying QValueAxis and QLogValueAxis on the same orientation.

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

成員類型文檔編製

enum QAbstractAxis:: AxisType
flags QAbstractAxis:: AxisTypes

此枚舉類型指定軸對象的類型。

常量
QAbstractAxis::AxisTypeNoAxis 0x0
QAbstractAxis::AxisTypeValue 0x1
QAbstractAxis::AxisTypeBarCategory 0x2
QAbstractAxis::AxisTypeCategory 0x4
QAbstractAxis::AxisTypeDateTime 0x8
QAbstractAxis::AxisTypeLogValue 0x10

AxisTypes 類型是 typedef 對於 QFlags <AxisType>。它存儲 AxisType 值的 OR (或) 組閤。

特性文檔編製

alignment : const Qt::Alignment

此特性保持軸的對齊方式。

可以是 Qt::AlignLeft , Qt::AlignRight , Qt::AlignBottom ,或 Qt::AlignTop .

訪問函數:

Qt::Alignment alignment () const

color : QColor

This property holds the color of the axis and tick marks.

訪問函數:

QColor linePenColor () const
void setLinePenColor (QColor color )

通知程序信號:

void colorChanged (QColor color )

gridLineColor : QColor

此特性保持柵格綫的顔色。

訪問函數:

QColor gridLineColor ()
void setGridLineColor (const QColor & color )

通知程序信號:

void gridLineColorChanged (const QColor & color )

gridLinePen : QPen

This property holds the pen used to draw the grid line.

訪問函數:

QPen gridLinePen () const
void setGridLinePen (const QPen & pen )

通知程序信號:

void gridLinePenChanged (const QPen & pen )

gridVisible : bool

This property holds the visibility of the grid lines.

訪問函數:

bool isGridLineVisible () const
void setGridLineVisible (bool visible = true)

通知程序信號:

void gridVisibleChanged (bool visible )

labelsAngle : int

此特性保持軸標簽的角度,以度為單位。

訪問函數:

int labelsAngle () const
void setLabelsAngle (int angle )

通知程序信號:

void labelsAngleChanged (int angle )

labelsBrush : QBrush

This property holds the brush used to draw the labels.

Only the color of the brush is relevant.

訪問函數:

QBrush labelsBrush () const
void setLabelsBrush (const QBrush & brush )

通知程序信號:

void labelsBrushChanged (const QBrush & brush )

labelsColor : QColor

This property holds the color of the axis labels.

訪問函數:

QColor labelsColor () const
void setLabelsColor (QColor color )

通知程序信號:

void labelsColorChanged (QColor color )

labelsFont : QFont

This property holds the font of the axis labels.

訪問函數:

QFont labelsFont () const
void setLabelsFont (const QFont & font )

通知程序信號:

void labelsFontChanged (const QFont & font )

labelsVisible : bool

This property holds whether axis labels are visible.

訪問函數:

bool labelsVisible () const
void setLabelsVisible (bool visible = true)

通知程序信號:

void labelsVisibleChanged (bool visible )

linePen : QPen

This property holds the pen used to draw the line.

訪問函數:

QPen linePen () const
void setLinePen (const QPen & pen )

通知程序信號:

void linePenChanged (const QPen & pen )

lineVisible : bool

This property holds the visibility of the axis line.

訪問函數:

bool isLineVisible () const
void setLineVisible (bool visible = true)

通知程序信號:

void lineVisibleChanged (bool visible )

minorGridLineColor : QColor

This property holds the color of the minor grid line.

Applies only to axes that support minor grid lines.

訪問函數:

QColor minorGridLineColor ()
void setMinorGridLineColor (const QColor & color )

通知程序信號:

void minorGridLineColorChanged (const QColor & color )

minorGridLinePen : QPen

This property holds the pen used to draw the minor grid line.

Applies only to axes that support minor grid lines.

訪問函數:

QPen minorGridLinePen () const
void setMinorGridLinePen (const QPen & pen )

通知程序信號:

void minorGridLinePenChanged (const QPen & pen )

minorGridVisible : bool

This property holds the visibility of the minor grid lines.

Applies only to axes that support minor grid lines.

訪問函數:

bool isMinorGridLineVisible () const
void setMinorGridLineVisible (bool visible = true)

通知程序信號:

void minorGridVisibleChanged (bool visible )

orientation : const Qt::Orientation

此特性保持軸的取嚮。

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

訪問函數:

Qt::Orientation orientation () const

reverse : bool

此特性保持是否使用反嚮軸。

By default, the value is false .

The reverse axis is supported with a line, spline, and scatter series, as well as an area series with a cartesian chart. All axes of the same orientation attached to the same series must be reversed if one is reversed or the behavior is undefined.

訪問函數:

bool isReverse () const
void setReverse (bool reverse = true)

通知程序信號:

void reverseChanged (bool reverse )

shadesBorderColor : QColor

This property holds the border (pen) color of the axis shades.

訪問函數:

QColor shadesBorderColor () const
void setShadesBorderColor (QColor color )

通知程序信號:

void shadesBorderColorChanged (QColor color )

shadesBrush : QBrush

This property holds the brush used to draw the axis shades (the area between the grid lines).

訪問函數:

QBrush shadesBrush () const
void setShadesBrush (const QBrush & brush )

通知程序信號:

void shadesBrushChanged (const QBrush & brush )

shadesColor : QColor

This property holds the fill (brush) color of the axis shades.

訪問函數:

QColor shadesColor () const
void setShadesColor (QColor color )

通知程序信號:

void shadesColorChanged (QColor color )

shadesPen : QPen

This property holds the pen used to draw the axis shades (the area between the grid lines).

訪問函數:

QPen shadesPen () const
void setShadesPen (const QPen & pen )

通知程序信號:

void shadesPenChanged (const QPen & pen )

shadesVisible : bool

This property holds the visibility of the axis shades.

訪問函數:

bool shadesVisible () const
void setShadesVisible (bool visible = true)

通知程序信號:

void shadesVisibleChanged (bool visible )

titleBrush : QBrush

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

Only the color of the brush is relevant.

訪問函數:

QBrush titleBrush () const
void setTitleBrush (const QBrush & brush )

通知程序信號:

void titleBrushChanged (const QBrush & brush )

titleFont : QFont

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

訪問函數:

QFont titleFont () const
void setTitleFont (const QFont & font )

通知程序信號:

void titleFontChanged (const QFont & font )

titleText : QString

此特性保持軸的標題。

默認為空。軸標題支持 HTML 格式。

訪問函數:

QString titleText () const
void setTitleText (const QString & title )

通知程序信號:

void titleTextChanged (const QString & text )

titleVisible : bool

This property holds the visibility of the axis title.

By default, the value is true .

訪問函數:

bool isTitleVisible () const
void setTitleVisible (bool visible = true)

通知程序信號:

void titleVisibleChanged (bool visible )

visible : bool

This property holds the visibility of the axis.

訪問函數:

bool isVisible () const
void setVisible (bool visible = true)

通知程序信號:

void visibleChanged (bool visible )

成員函數文檔編製

QAbstractAxis:: ~QAbstractAxis ()

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

[signal] void QAbstractAxis:: colorChanged ( QColor color )

This signal is emitted when the color of the axis changes to color .

注意: 通知程序信號對於特性 color .

[signal] void QAbstractAxis:: gridLineColorChanged (const QColor & color )

This signal is emitted when the color of the pen used to draw the grid line changes to color .

注意: 通知程序信號對於特性 gridLineColor .

QPen QAbstractAxis:: gridLinePen () const

Returns the pen used to draw the grid.

注意: getter 函數對於特性 gridLinePen .

另請參閱 setGridLinePen ().

[signal] void QAbstractAxis:: gridLinePenChanged (const QPen & pen )

This signal is emitted when the pen used to draw the grid line changes to pen .

注意: 通知程序信號對於特性 gridLinePen .

[signal] void QAbstractAxis:: gridVisibleChanged ( bool visible )

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

注意: 通知程序信號對於特性 gridVisible .

void QAbstractAxis:: hide ()

Makes the axis, shades, labels, and grid lines invisible.

[signal] void QAbstractAxis:: labelsAngleChanged ( int angle )

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

注意: 通知程序信號對於特性 labelsAngle .

QBrush QAbstractAxis:: labelsBrush () const

Returns the brush used to draw labels.

注意: getter 函數對於特性 labelsBrush .

另請參閱 setLabelsBrush ().

[signal] void QAbstractAxis:: labelsBrushChanged (const QBrush & brush )

This signal is emitted when the brush used to draw the axis labels changes to brush .

注意: 通知程序信號對於特性 labelsBrush .

[signal] void QAbstractAxis:: labelsColorChanged ( QColor color )

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

注意: 通知程序信號對於特性 labelsColor .

QFont QAbstractAxis:: labelsFont () const

Returns the font used to draw labels.

注意: getter 函數對於特性 labelsFont .

另請參閱 setLabelsFont ().

[signal] void QAbstractAxis:: labelsFontChanged (const QFont & font )

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

注意: 通知程序信號對於特性 labelsFont .

[signal] void QAbstractAxis:: labelsVisibleChanged ( bool visible )

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

注意: 通知程序信號對於特性 labelsVisible .

QPen QAbstractAxis:: linePen () const

Returns the pen used to draw the axis line and tick marks.

注意: getter 函數對於特性 linePen .

另請參閱 setLinePen ().

[signal] void QAbstractAxis:: linePenChanged (const QPen & pen )

This signal is emitted when the pen used to draw the line of the axis changes to pen .

注意: 通知程序信號對於特性 linePen .

[signal] void QAbstractAxis:: lineVisibleChanged ( bool visible )

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

注意: 通知程序信號對於特性 lineVisible .

[signal] void QAbstractAxis:: minorGridLineColorChanged (const QColor & color )

This signal is emitted when the color of the pen used to draw the minor grid line changes to color .

注意: 通知程序信號對於特性 minorGridLineColor .

[signal] void QAbstractAxis:: minorGridLinePenChanged (const QPen & pen )

This signal is emitted when the pen used to draw the minor grid line changes to pen .

注意: 通知程序信號對於特性 minorGridLinePen .

[signal] void QAbstractAxis:: minorGridVisibleChanged ( bool visible )

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

注意: 通知程序信號對於特性 minorGridVisible .

Qt::Orientation QAbstractAxis:: orientation () const

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

注意: getter 函數對於特性 orientation .

void QAbstractAxis:: setGridLinePen (const QPen & pen )

Sets the pen used to draw the grid lines to pen .

注意: setter 函數對於特性 gridLinePen .

另請參閱 gridLinePen ().

void QAbstractAxis:: setLabelsBrush (const QBrush & brush )

Sets the brush used to draw labels to brush .

注意: setter 函數對於特性 labelsBrush .

另請參閱 labelsBrush ().

void QAbstractAxis:: setLabelsFont (const QFont & font )

Sets the font used to draw labels to font .

注意: setter 函數對於特性 labelsFont .

另請參閱 labelsFont ().

void QAbstractAxis:: setLinePen (const QPen & pen )

Sets the pen used to draw the axis line and tick marks to pen .

注意: setter 函數對於特性 linePen .

另請參閱 linePen ().

void QAbstractAxis:: setLineVisible ( bool visible = true)

Determines whether the axis line and tick marks are visible .

注意: setter 函數對於特性 lineVisible .

另請參閱 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:: setShadesBrush (const QBrush & brush )

Sets the brush used to draw shades to brush .

注意: setter 函數對於特性 shadesBrush .

另請參閱 shadesBrush ().

void QAbstractAxis:: setShadesPen (const QPen & pen )

Sets the pen used to draw shades to pen .

注意: setter 函數對於特性 shadesPen .

另請參閱 shadesPen ().

void QAbstractAxis:: setTitleBrush (const QBrush & brush )

Sets the brush used to draw titles to brush .

注意: setter 函數對於特性 titleBrush .

另請參閱 titleBrush ().

void QAbstractAxis:: setTitleFont (const QFont & font )

Sets the font used to draw titles to font .

注意: setter 函數對於特性 titleFont .

另請參閱 titleFont ().

void QAbstractAxis:: setVisible ( bool visible = true)

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

注意: setter 函數對於特性 visible .

另請參閱 isVisible ().

[signal] void QAbstractAxis:: shadesBorderColorChanged ( QColor color )

This signal is emitted when the border color of the axis shades changes to color .

注意: 通知程序信號對於特性 shadesBorderColor .

QBrush QAbstractAxis:: shadesBrush () const

Returns the brush used to draw shades.

注意: getter 函數對於特性 shadesBrush .

另請參閱 setShadesBrush ().

[signal] void QAbstractAxis:: shadesBrushChanged (const QBrush & brush )

This signal is emitted when the brush used to draw the axis shades changes to brush .

注意: 通知程序信號對於特性 shadesBrush .

[signal] void QAbstractAxis:: shadesColorChanged ( QColor color )

This signal is emitted when the color of the axis shades changes to color .

注意: 通知程序信號對於特性 shadesColor .

QPen QAbstractAxis:: shadesPen () const

Returns the pen used to draw shades.

注意: getter 函數對於特性 shadesPen .

另請參閱 setShadesPen ().

[signal] void QAbstractAxis:: shadesPenChanged (const QPen & pen )

This signal is emitted when the pen used to draw the axis shades changes to pen .

注意: 通知程序信號對於特性 shadesPen .

[signal] void QAbstractAxis:: shadesVisibleChanged ( bool visible )

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

注意: 通知程序信號對於特性 shadesVisible .

void QAbstractAxis:: show ()

Makes the axis, shades, labels, and grid lines visible.

QBrush QAbstractAxis:: titleBrush () const

Returns the brush used to draw titles.

注意: getter 函數對於特性 titleBrush .

另請參閱 setTitleBrush ().

[signal] void QAbstractAxis:: titleBrushChanged (const QBrush & brush )

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

注意: 通知程序信號對於特性 titleBrush .

QFont QAbstractAxis:: titleFont () const

Returns the font used to draw titles.

注意: getter 函數對於特性 titleFont .

另請參閱 setTitleFont ().

[signal] void QAbstractAxis:: titleFontChanged (const QFont & font )

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

注意: 通知程序信號對於特性 titleFont .

[signal] void QAbstractAxis:: titleTextChanged (const QString & text )

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

注意: 通知程序信號對於特性 titleText .

[signal] void QAbstractAxis:: titleVisibleChanged ( bool visible )

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

注意: 通知程序信號對於特性 titleVisible .

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

返迴軸的類型。

[signal] void QAbstractAxis:: visibleChanged ( bool visible )

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

注意: 通知程序信號對於特性 visible .