QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt_plot_item_info.h
1/******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10#ifndef QWT_PLOT_ITEM_INFO_H
11#define QWT_PLOT_ITEM_INFO_H
12
13#include "qwt_global.h"
14#include "qwt_plot_dict.h"
15
16#include <qrect.h>
17#include <qset.h>
18#include <qstring.h>
19
20class QwtPlot;
21class QwtPlotItem;
22
41class QWT_EXPORT QwtPlotItemInfo
42{
43public:
44 // Check if item is a QwtPlotSeriesItem subclass
45 static bool isSeriesItem(const QwtPlotItem* item);
46
47 // Check if item stores QPointF data (curve, bar chart)
48 static bool isXYSeriesItem(const QwtPlotItem* item);
49
50 // Check if item stores QwtIntervalSample data (interval curve, histogram)
51 static bool isIntervalSeriesItem(const QwtPlotItem* item);
52
53 // Check if item is a decorator (grid, marker, scale, text label, etc.)
54 static bool isDecoratorItem(const QwtPlotItem* item);
55
56 // Check if item holds any data series
57 static bool isDataItem(const QwtPlotItem* item);
58
59 // Get all QwtPlotSeriesItem instances from a plot
60 static QwtPlotItemList seriesItems(const QwtPlot* plot);
61
62 // Get all QPointF-based series items from a plot
63 static QwtPlotItemList xySeriesItems(const QwtPlot* plot);
64
65 // Filter items by a single rtti value
66 static QwtPlotItemList filterByRtti(const QwtPlot* plot, int rtti);
67
68 // Filter items by a set of rtti values
69 static QwtPlotItemList filterByRtti(const QwtPlot* plot, const QSet< int >& rttiSet);
70
71 // Get all currently visible items
72 static QwtPlotItemList visibleItems(const QwtPlot* plot);
73
74 // Get the number of data samples, or -1 if not a data item
75 static int dataSize(const QwtPlotItem* item);
76
77 // Get the bounding rectangle of the data, or an invalid rect if not a data item
78 static QRectF dataRect(const QwtPlotItem* item);
79
80 // Get a human-readable name for an rtti value
81 static QString rttiName(int rtti);
82};
83
84#endif // QWT_PLOT_ITEM_INFO_H
Utility class for querying QwtPlotItem types and filtering plot items
Definition qwt_plot_item_info.h:42
Base class for items on the plot canvas
Definition qwt_plot_item.h:85
A 2-D plotting widget
Definition qwt_plot.h:99