QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
静态 Public 成员函数 | 所有成员列表
QwtPlotItemInfo类 参考

Utility class for querying QwtPlotItem types and filtering plot items 更多...

#include <qwt_plot_item_info.h>

静态 Public 成员函数

static bool isSeriesItem (const QwtPlotItem *item)
 Check whether the item is a QwtPlotSeriesItem subclass
 
static bool isXYSeriesItem (const QwtPlotItem *item)
 Check whether the item stores QPointF data
 
static bool isIntervalSeriesItem (const QwtPlotItem *item)
 Check whether the item stores QwtIntervalSample data
 
static bool isDecoratorItem (const QwtPlotItem *item)
 Check whether the item is a decorator (non-data item)
 
static bool isDataItem (const QwtPlotItem *item)
 Check whether the item holds any data series
 
static QwtPlotItemList seriesItems (const QwtPlot *plot)
 Get all QwtPlotSeriesItem instances from a plot
 
static QwtPlotItemList xySeriesItems (const QwtPlot *plot)
 Get all QPointF-based series items from a plot
 
static QwtPlotItemList filterByRtti (const QwtPlot *plot, int rtti)
 Filter items by a single rtti value
 
static QwtPlotItemList filterByRtti (const QwtPlot *plot, const QSet< int > &rttiSet)
 Filter items by a set of rtti values
 
static QwtPlotItemList visibleItems (const QwtPlot *plot)
 Get all currently visible items from a plot
 
static int dataSize (const QwtPlotItem *item)
 Get the number of data samples in a plot item
 
static QRectF dataRect (const QwtPlotItem *item)
 Get the bounding rectangle of the item's data
 
static QString rttiName (int rtti)
 Get a human-readable name for an rtti value
 

详细描述

Utility class for querying QwtPlotItem types and filtering plot items

QwtPlotItemInfo provides static methods to determine the runtime type of plot items, filter items by category, and retrieve basic information such as data size and bounding rectangle. This class does not modify any plot or item state.

QwtPlot* plot = ...;
QwtPlotItemList curves = Qwt::QwtPlotItemInfo::xySeriesItems(plot);
for (auto* item : curves) {
qDebug() << item->title().text()
<< "has" << Qwt::QwtPlotItemInfo::dataSize(item) << "points";
}
A 2-D plotting widget
Definition qwt_plot.h:99
参见
QwtPlotDataAccess, QwtPlotStyling

成员函数说明

◆ dataRect()

QRectF QwtPlotItemInfo::dataRect ( const QwtPlotItem item)
static

Get the bounding rectangle of the item's data

参数
itemPlot item to query
返回
Bounding rectangle, or an invalid QRectF if the item does not hold data

◆ dataSize()

int QwtPlotItemInfo::dataSize ( const QwtPlotItem item)
static

Get the number of data samples in a plot item

参数
itemPlot item to query
返回
Number of samples, or -1 if the item does not hold a data series

◆ filterByRtti() [1/2]

QwtPlotItemList QwtPlotItemInfo::filterByRtti ( const QwtPlot plot,
const QSet< int > &  rttiSet 
)
static

Filter items by a set of rtti values

参数
plotPlot to query
rttiSetSet of rtti values to match
返回
List of items whose rtti is in the set

◆ filterByRtti() [2/2]

QwtPlotItemList QwtPlotItemInfo::filterByRtti ( const QwtPlot plot,
int  rtti 
)
static

Filter items by a single rtti value

参数
plotPlot to query
rttiRuntime type value to match
返回
List of items matching the rtti
参见
QwtPlotDict::itemList(int)

◆ isDataItem()

bool QwtPlotItemInfo::isDataItem ( const QwtPlotItem item)
static

Check whether the item holds any data series

参数
itemPlot item to check
返回
true for all QwtPlotSeriesItem subclasses
参见
isSeriesItem()

◆ isDecoratorItem()

bool QwtPlotItemInfo::isDecoratorItem ( const QwtPlotItem item)
static

Check whether the item is a decorator (non-data item)

参数
itemPlot item to check
返回
true for grid, marker, scale, legend, text label, zone, shape, graphic, arrow marker

◆ isIntervalSeriesItem()

bool QwtPlotItemInfo::isIntervalSeriesItem ( const QwtPlotItem item)
static

Check whether the item stores QwtIntervalSample data

参数
itemPlot item to check
返回
true for QwtPlotIntervalCurve and QwtPlotHistogram

◆ isSeriesItem()

bool QwtPlotItemInfo::isSeriesItem ( const QwtPlotItem item)
static

Check whether the item is a QwtPlotSeriesItem subclass

参数
itemPlot item to check, may be nullptr
返回
true if item is derived from QwtPlotSeriesItem

◆ isXYSeriesItem()

bool QwtPlotItemInfo::isXYSeriesItem ( const QwtPlotItem item)
static

Check whether the item stores QPointF data

参数
itemPlot item to check
返回
true for QwtPlotCurve and QwtPlotBarChart

◆ rttiName()

QString QwtPlotItemInfo::rttiName ( int  rtti)
static

Get a human-readable name for an rtti value

参数
rttiRuntime type value
返回
String name such as "PlotCurve", "PlotBarChart", etc.

◆ seriesItems()

QwtPlotItemList QwtPlotItemInfo::seriesItems ( const QwtPlot plot)
static

Get all QwtPlotSeriesItem instances from a plot

参数
plotPlot to query
返回
List of series items

◆ visibleItems()

QwtPlotItemList QwtPlotItemInfo::visibleItems ( const QwtPlot plot)
static

Get all currently visible items from a plot

参数
plotPlot to query
返回
List of visible items

◆ xySeriesItems()

QwtPlotItemList QwtPlotItemInfo::xySeriesItems ( const QwtPlot plot)
static

Get all QPointF-based series items from a plot

参数
plotPlot to query
返回
List of XY series items (curves and bar charts)

该类的文档由以下文件生成: