QAbstractAxis Class
QAbstractAxis 是专门处理坐标轴的基类. 更多...
头文件: | #include <QAbstractAxis> |
Instantiated By: | AbstractAxis |
基类: | QObject |
派生类: | QBarCategoryAxis, QDateTimeAxis, QLogValueAxis, and QValueAxis |
公有类型
enum | AxisType { AxisTypeNoAxis, AxisTypeValue, AxisTypeBarCategory, AxisTypeCategory, AxisTypeDateTime, AxisTypeLogValue } |
flags | AxisTypes |
属性
|
|
- 1 个属性继承自 QObject
公有函数
~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 |
- 32 个公有函数继承自 QObject
信号
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) |
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有槽函数继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
QAbstractAxis 是专门处理坐标轴的基类.
每一个连续的序列可以绑定到一个或者多个水平轴和垂直轴, 但是不同域的混合轴的类型是不支持的. 比如在同一个方向指定 QValueAxis 和 QLogValueAxis.
每个轴的元素(比如轴线, 标题, 标签, 网格线, 阴影, 可见性)都是可以控制的.
成员类型
enum QAbstractAxis::AxisType
flags QAbstractAxis::AxisTypes
这个枚举类型指定了轴对象的类型.
Constant | Value |
---|---|
QAbstractAxis::AxisTypeNoAxis | 0x0 |
QAbstractAxis::AxisTypeValue | 0x1 |
QAbstractAxis::AxisTypeBarCategory | 0x2 |
QAbstractAxis::AxisTypeCategory | 0x4 |
QAbstractAxis::AxisTypeDateTime | 0x8 |
QAbstractAxis::AxisTypeLogValue | 0x10 |
AxisTypes 是 QFlags<AxisType> 的typedef. 它是AxisType类型的组合.
属性
alignment : const Qt::Alignment
这个属性是轴的对齐属性.
其值可以为 Qt::AlignLeft, Qt::AlignRight, Qt::AlignBottom, Qt::AlignTop.
访问函数:
Qt::Alignment | alignment() const |
color : QColor
这个属性是指坐标轴与刻度的颜色.
访问函数:
QColor | linePenColor() const |
void | setLinePenColor(QColor color) |
Notifier signal:
void | colorChanged(QColor color) |
gridLineColor : QColor
这个属性是指网格线的颜色.
访问函数:
QColor | gridLineColor() |
void | setGridLineColor(const QColor &color) |
Notifier signal:
void | gridLineColorChanged(const QColor &color) |
gridLinePen : QPen
这个属性是指绘制网格线的QPen.
访问函数:
QPen | gridLinePen() const |
void | setGridLinePen(const QPen &pen) |
Notifier signal:
void | gridLinePenChanged(const QPen &pen) |
gridVisible : bool
这个属性是网格线是否可见.
访问函数:
bool | isGridLineVisible() const |
void | setGridLineVisible(bool visible = true) |
Notifier signal:
void | gridVisibleChanged(bool visible) |
labelsAngle : int
这个属性以度数保存轴坐标的角度.
访问函数:
int | labelsAngle() const |
void | setLabelsAngle(int angle) |
Notifier signal:
void | labelsAngleChanged(int angle) |
labelsBrush : QBrush
这个属性表示用于绘制标签的QBrush.
只有QBrush的颜色是相关的.
访问函数:
QBrush | labelsBrush() const |
void | setLabelsBrush(const QBrush &brush) |
Notifier signal:
void | labelsBrushChanged(const QBrush &brush) |
labelsColor : QColor
这个属性表示轴标签的颜色.
访问函数:
QColor | labelsColor() const |
void | setLabelsColor(QColor color) |
Notifier signal:
void | labelsColorChanged(QColor color) |
labelsFont : QFont
这个属性表示轴标签的字体信息.
访问函数:
QFont | labelsFont() const |
void | setLabelsFont(const QFont &font) |
Notifier signal:
void | labelsFontChanged(const QFont &font) |
labelsVisible : bool
这个属性表示轴标签是否可见.
访问函数:
bool | labelsVisible() const |
void | setLabelsVisible(bool visible = true) |
Notifier signal:
void | labelsVisibleChanged(bool visible) |
linePen : QPen
该属性表示绘制轴线的QPen.
访问函数:
QPen | linePen() const |
void | setLinePen(const QPen &pen) |
Notifier signal:
void | linePenChanged(const QPen &pen) |
lineVisible : bool
该属性表示轴线是否可见.
访问函数:
bool | isLineVisible() const |
void | setLineVisible(bool visible = true) |
Notifier signal:
void | lineVisibleChanged(bool visible) |
minorGridLineColor : QColor
该属性表示副格线的颜色.
仅适用于支持副网格线的轴.
访问函数:
QColor | minorGridLineColor() |
void | setMinorGridLineColor(const QColor &color) |
Notifier signal:
void | minorGridLineColorChanged(const QColor &color) |
minorGridLinePen : QPen
该属性表示副格线的QPen.
仅适用于支持副网格线的轴.
访问函数:
QPen | minorGridLinePen() const |
void | setMinorGridLinePen(const QPen &pen) |
Notifier signal:
void | minorGridLinePenChanged(const QPen &pen) |
minorGridVisible : bool
该属性表示副格线是否可见.
仅适用于支持副网格线的轴.
访问函数:
bool | isMinorGridLineVisible() const |
void | setMinorGridLineVisible(bool visible = true) |
Notifier signal:
void | minorGridVisibleChanged(bool visible) |
orientation : const Qt::Orientation
该属性表示坐标轴的方向.
当坐标轴被添加到图表时, 该属性为 Qt::Horizontal 或 Qt::Vertical.
访问函数:
Qt::Orientation | orientation() const |
reverse : bool
该属性表示是否使用反转轴.
该值默认为 false
.
反转轴由直线, 样条, 散列图系列以及笛卡尔图表组成的区域支持. 如果一个方向相反, 或者行为为定义, 则所有相同方向的所有轴必须保持一致.
访问函数:
bool | isReverse() const |
void | setReverse(bool reverse = true) |
Notifier signal:
void | reverseChanged(bool reverse) |
shadesBorderColor : QColor
该属性表示坐标轴阴影的边框(笔)颜色.
访问函数:
QColor | shadesBorderColor() const |
void | setShadesBorderColor(QColor color) |
Notifier signal:
void | shadesBorderColorChanged(QColor color) |
shadesBrush : QBrush
该属性表示用于绘制轴阴影的QBrush(网格线之间的区域).
访问函数:
QBrush | shadesBrush() const |
void | setShadesBrush(const QBrush &brush) |
Notifier signal:
void | shadesBrushChanged(const QBrush &brush) |
shadesColor : QColor
这个属性表示轴阴影的颜色.
访问函数:
QColor | shadesColor() const |
void | setShadesColor(QColor color) |
Notifier signal:
void | shadesColorChanged(QColor color) |
shadesPen : QPen
该属性表示用于绘制轴阴影的QPen(网格线之间的区域).
访问函数:
QPen | shadesPen() const |
void | setShadesPen(const QPen &pen) |
Notifier signal:
void | shadesPenChanged(const QPen &pen) |
shadesVisible : bool
该属性表示轴阴影是否可见.
访问函数:
bool | shadesVisible() const |
void | setShadesVisible(bool visible = true) |
Notifier signal:
void | shadesVisibleChanged(bool visible) |
titleBrush : QBrush
该属性表示用于绘制坐标轴标题文本的QBrush.
只画刷的颜色有效.
访问函数:
QBrush | titleBrush() const |
void | setTitleBrush(const QBrush &brush) |
Notifier signal:
void | titleBrushChanged(const QBrush &brush) |
titleFont : QFont
该属性表示坐标轴标题的字体.
访问函数:
QFont | titleFont() const |
void | setTitleFont(const QFont &font) |
Notifier signal:
void | titleFontChanged(const QFont &font) |
titleText : QString
该属性表示坐标轴的标题.
默认为空. 坐标轴的标题支持HTML的格式.
访问函数:
QString | titleText() const |
void | setTitleText(const QString &title) |
Notifier signal:
void | titleTextChanged(const QString &text) |
titleVisible : bool
该属性表示坐标轴的可见性.
默认值为 true
.
访问函数:
bool | isTitleVisible() const |
void | setTitleVisible(bool visible = true) |
Notifier signal:
void | titleVisibleChanged(bool visible) |
visible : bool
该属性表示坐标轴的可见性.
访问函数:
bool | isVisible() const |
void | setVisible(bool visible = true) |
Notifier signal:
void | visibleChanged(bool visible) |
成员函数
QAbstractAxis::~QAbstractAxis()
析构函数. 销毁轴对象, 当一个坐标轴添加到图表时, 该图表获得该坐标轴的所有权.
[signal]
void QAbstractAxis::colorChanged(QColor color)
当坐标轴的color变化时, 该信号被发射.
注意: 属性 color 的通知信号.
[signal]
void QAbstractAxis::gridLineColorChanged(const QColor &color)
当绘制网格线的笔的color改变时, 该信号被发射.
注意: 属性 gridLineColor 的通知信号.
QPen QAbstractAxis::gridLinePen() const
返回用于绘制网格的QPen.
注意: 属性 gridLinePen 的获取函数.
参见 setGridLinePen().
[signal]
void QAbstractAxis::gridLinePenChanged(const QPen &pen)
绘制网格线的笔变化时, 会发出此信号.
注意: 属性 gridLinePen 的通知信号.
[signal]
void QAbstractAxis::gridVisibleChanged(bool visible)
坐标轴网格线的可见性变化时, 发出该信号.
注意: 属性 gridVisible 的通知信号.
void QAbstractAxis::hide()
使坐标轴, 阴影, 标签, 网格线不可见.
[signal]
void QAbstractAxis::labelsAngleChanged(int angle)
坐标轴标签的角度变化时, 发出该信号.
注意: 属性 labelsAngle 的通知信号.
QBrush QAbstractAxis::labelsBrush() const
返回用于绘制标签的QBrush.
注意: 属性 labelsBrush 的获取函数.
参见 setLabelsBrush().
[signal]
void QAbstractAxis::labelsBrushChanged(const QBrush &brush)
绘制坐标轴标签的QBrush改变时,会发出此信号.
注意: 属性 labelsBrush 的通知信号.
[signal]
void QAbstractAxis::labelsColorChanged(QColor color)
坐标轴标签的颜色改变时, 会发出此信号.
注意: 属性 labelsColor 的通知信号.
QFont QAbstractAxis::labelsFont() const
返回用于绘制标签的字体.
注意: 属性 labelsFont 的获取函数.
参见 setLabelsFont().
[signal]
void QAbstractAxis::labelsFontChanged(const QFont &font)
坐标轴的字体改变时, 会发出此信号.
注意: 属性 labelsFont 的通知信号.
[signal]
void QAbstractAxis::labelsVisibleChanged(bool visible)
坐标轴标签的可见性变化时, 会发出此信号.
注意: 属性 labelsVisible 的通知信号.
QPen QAbstractAxis::linePen() const
返回用于绘制轴线与刻度线的QPen.
注意: 属性 linePen 的获取函数.
参见 setLinePen().
[signal]
void QAbstractAxis::linePenChanged(const QPen &pen)
绘制坐标轴的笔变化时, 会发出此信号.
注意: 属性 linePen 的通知信号.
[signal]
void QAbstractAxis::lineVisibleChanged(bool visible)
坐标轴线的可见性变化时, 会发出此信号.
注意: 属性 lineVisible 的通知信号.
[signal]
void QAbstractAxis::minorGridLineColorChanged(const QColor &color)
绘制副格线的笔的颜色变化时, 该信号被发射.
注意: 属性 minorGridLineColor 的通知信号.
[signal]
void QAbstractAxis::minorGridLinePenChanged(const QPen &pen)
绘制副格线的笔变化时, 该信号被发射.
注意: 属性 minorGridLinePen 的通知信号.
[signal]
void QAbstractAxis::minorGridVisibleChanged(bool visible)
绘制副格线的可见性变化时, 该信号被发射.
注意: 属性 minorGridVisible 的通知信号.
Qt::Orientation QAbstractAxis::orientation() const
返回坐标轴的方向(垂直或者水平).
注意: 属性 orientation 的获取函数.
void QAbstractAxis::setGridLinePen(const QPen &pen)
设置绘制网格线的笔.
注意: 属性 gridLinePen 的设置函数.
参见 gridLinePen().
void QAbstractAxis::setLabelsBrush(const QBrush &brush)
设置用于绘制标签的画笔.
注意: 属性 labelsBrush 的设置函数.
参见 labelsBrush().
void QAbstractAxis::setLabelsFont(const QFont &font)
设置用于绘制标签的字体.
注意: 属性 labelsFont 的设置函数.
参见 labelsFont().
void QAbstractAxis::setLinePen(const QPen &pen)
设置用于绘制坐标轴线和刻度线的笔.
注意: 属性 linePen 的设置函数.
参见 linePen().
void QAbstractAxis::setLineVisible(bool visible = true)
设置坐标轴线与刻度线是否可见.
注意: 属性 lineVisible 的设置函数.
参见 isLineVisible().
void QAbstractAxis::setMax(const QVariant &max)
设置坐标轴上显示的最大值. 根据当前坐标轴的类型, 最大值参数会被转换为适当的值. 如果转化失败, 该函数设置无效.
void QAbstractAxis::setMin(const QVariant &min)
设置坐标轴上显示的最小值. 根据当前坐标轴的类型, 最小值参数会被转换为适当的值. 如果转化失败, 该函数设置无效.
void QAbstractAxis::setRange(const QVariant &min, const QVariant &max)
设置坐标轴的范围. 根据当前坐标轴的类型, 最大值最小值会被转换为适当的值. 如果转化失败, 该函数设置无效.
void QAbstractAxis::setShadesBrush(const QBrush &brush)
设置用于绘制阴影的QBrush.
注意: 属性 shadesBrush 的设置函数.
参见 shadesBrush().
void QAbstractAxis::setShadesPen(const QPen &pen)
设置用于绘制阴影的QPen.
注意: 属性 shadesPen 的设置函数.
参见 shadesPen().
void QAbstractAxis::setTitleBrush(const QBrush &brush)
设置用于绘制标题的QBrush.
注意: 属性 titleBrush 的设置函数.
参见 titleBrush().
void QAbstractAxis::setTitleFont(const QFont &font)
设置用于绘制标题的QFont.
注意: 属性 titleFont 的设置函数.
参见 titleFont().
void QAbstractAxis::setVisible(bool visible = true)
设置坐标轴, 阴影, 标签, 网格线是否可见.
注意: 属性 visible 的设置函数.
参见 isVisible().
[signal]
void QAbstractAxis::shadesBorderColorChanged(QColor color)
绘制坐标轴边框的颜色变化时, 会发出此信号.
注意: 属性 shadesBorderColor 的通知信号.
QBrush QAbstractAxis::shadesBrush() const
返回用于绘制阴影的QBrush.
注意: 属性 shadesBrush 的获取函数.
参见 setShadesBrush().
[signal]
void QAbstractAxis::shadesBrushChanged(const QBrush &brush)
绘制坐标轴阴影的画刷变化时, 会发出此信号.
注意: 属性 shadesBrush 的通知信号.
[signal]
void QAbstractAxis::shadesColorChanged(QColor color)
绘制坐标轴阴影颜色发生变化时, 会发出此信号.
注意: 属性 shadesColor 的通知信号.
QPen QAbstractAxis::shadesPen() const
返回用于绘制阴影的笔.
注意: 属性 shadesPen 的获取函数.
参见 setShadesPen().
[signal]
void QAbstractAxis::shadesPenChanged(const QPen &pen)
绘制坐标轴阴影的笔发生变化时, 会发出此信号.
注意: 属性 shadesPen 的通知信号.
[signal]
void QAbstractAxis::shadesVisibleChanged(bool visible)
坐标轴的阴影可见性变化时, 会发出此信号.
注意: 属性 shadesVisible 的通知信号.
void QAbstractAxis::show()
使坐标轴, 阴影, 标签, 网格线可见.
QBrush QAbstractAxis::titleBrush() const
返回用于绘制标题的画刷.
注意: 属性 titleBrush 的获取函数.
参见 setTitleBrush().
[signal]
void QAbstractAxis::titleBrushChanged(const QBrush &brush)
绘制坐标轴标题的画刷变化时, 该信号被发射.
注意: 属性 titleBrush 的通知信号.
QFont QAbstractAxis::titleFont() const
返回绘制标题的笔.
注意: 属性 titleFont 的获取函数.
参见 setTitleFont().
[signal]
void QAbstractAxis::titleFontChanged(const QFont &font)
坐标轴标题的字体属性更改时, 会发出此信号.
注意: 属性 titleFont 的通知信号.
[signal]
void QAbstractAxis::titleTextChanged(const QString &text)
坐标轴标题的文本内容改变时, 会发出此信号.
注意: 属性 titleText 的通知信号.
[signal]
void QAbstractAxis::titleVisibleChanged(bool visible)
坐标轴的标题文本的可见性变化时, 会发出此信号.
注意: 属性 titleVisible 的通知信号.
[pure virtual]
AxisType QAbstractAxis::type() const
返回坐标轴的类型.
[signal]
void QAbstractAxis::visibleChanged(bool visible)
坐标轴的可见性变化时, 会发出此信号.
注意: 属性 visible 的通知信号.