QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt_interval_symbol.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 * Modified by ChenZongYan in 2024 <czy.t@163.com>
10 * Summary of major modifications (see ChangeLog.md for full history):
11 * 1. CMake build system & C++11 throughout.
12 * 2. Core panner/ zoomer refactored:
13 * - QwtPanner → QwtCachePanner (pixmap-cache version)
14 * - New real-time QwtPlotPanner derived from QwtPicker.
15 * 3. Zoomer supports multi-axis.
16 * 4. Parasite-plot framework:
17 * - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18 * - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19 * 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20 * 6. Raster & color-map extensions:
21 * - QwtGridRasterData (2-D table + interpolation)
22 * - QwtLinearColorMap::stopColors(), stopPos() API rename.
23 * 7. Bar-chart: expose pen/brush control.
24 * 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25 *****************************************************************************/
26
27#ifndef QWT_INTERVAL_SYMBOL_H
28#define QWT_INTERVAL_SYMBOL_H
29
30#include "qwt_global.h"
31#include <qnamespace.h>
32
33class QPainter;
34class QPen;
35class QBrush;
36class QPointF;
37class QColor;
38
49class QWT_EXPORT QwtIntervalSymbol
50{
51 public:
53 enum Style
54 {
56 NoSymbol = -1,
57
69
81
92 UserSymbol = 1000
93 };
94
95 public:
96 // Constructor
97 explicit QwtIntervalSymbol( Style = NoSymbol );
98 // Copy constructor
100
101 // Destructor
102 virtual ~QwtIntervalSymbol();
103
104 // Assignment operator
105 QwtIntervalSymbol& operator=( const QwtIntervalSymbol& );
106 // Compare two symbols
107 bool operator==( const QwtIntervalSymbol& ) const;
108 // Compare two symbols
109 bool operator!=( const QwtIntervalSymbol& ) const;
110
111 // Set the symbol width
112 void setWidth( int );
113 // Get the symbol width
114 int width() const;
115
116 // Set the brush for Box style
117 void setBrush( const QBrush& );
118 // Get the brush
119 const QBrush& brush() const;
120
121 // Build and set a pen with color, width and style
122 void setPen( const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
123 // Set the pen
124 void setPen( const QPen& );
125 // Get the pen
126 const QPen& pen() const;
127
128 // Set the symbol style
129 void setStyle( Style );
130 // Get the symbol style
131 Style style() const;
132
133 // Draw the symbol
134 virtual void draw( QPainter*, Qt::Orientation,
135 const QPointF& from, const QPointF& to ) const;
136
137 private:
138 class PrivateData;
139 PrivateData* m_data;
140};
141
142#endif
用于显示区间(如误差条)的绘图基元
Definition qwt_interval_symbol.h:50
Style
符号样式
Definition qwt_interval_symbol.h:54
@ Bar
符号显示一条线,两端有帽盖。 帽盖的大小取决于符号的宽度。
Definition qwt_interval_symbol.h:68
@ Box
符号使用 pen() 和 brush() 显示一个简单的矩形。 矩形的大小取决于转换后的区间和宽度。
Definition qwt_interval_symbol.h:80