QBarDataItem Class
QBarDataItem 类提供了一个容器,用于将已解析的数据添加到条形图中。更多
Header: | #include <QBarDataItem> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
qmake: | QT += datavisualization |
自 | QtDataVisualization 1.0 |
公共函数
QBarDataItem() | |
QBarDataItem(float value) | |
QBarDataItem(float value, float angle) | |
QBarDataItem(const QBarDataItem &other) | |
~QBarDataItem() | |
float | rotation() const |
void | setRotation(float angle) |
void | setValue(float val) |
float | value() const |
QBarDataItem & | operator=(const QBarDataItem &other) |
另请参见 QBarDataProxy 和 Qt Data Visualization C++ Classes.
成员函数文档
QBarDataItem::QBarDataItem()
构造条形数据项。
QBarDataItem::QBarDataItem(float value)
构建一个条形数据项,其值为value 。
QBarDataItem::QBarDataItem(float value, float angle)
构建一个条形数据项,其值为value ,角度为angle 。
QBarDataItem::QBarDataItem(const QBarDataItem &other)
构造other 的副本。
[noexcept]
QBarDataItem::~QBarDataItem()
删除条形数据项。
float QBarDataItem::rotation() const
返回此数据项的旋转角度(度)。
另请参阅 setRotation()。
void QBarDataItem::setRotation(float angle)
设置该数据项的旋转角度angle (单位:度)。
另请参阅 rotation()。
void QBarDataItem::setValue(float val)
为该数据项设置值val 。
另请参阅 value()。
float QBarDataItem::value() const
返回此数据项的值。
另请参阅 setValue()。
QBarDataItem &QBarDataItem::operator=(const QBarDataItem &other)
将other 的副本分配给此对象。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.