QWT API (中文) 7.3.0
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
43class QWT_EXPORT QwtIntervalSymbol
44{
45public:
47 enum Style
48 {
50 NoSymbol = -1,
51
57
63
68 UserSymbol = 1000
69 };
70
71public:
72 // Constructor
73 explicit QwtIntervalSymbol(Style = NoSymbol);
74 // Copy constructor
76
77 // Destructor
78 virtual ~QwtIntervalSymbol();
79
80 // Assignment operator
81 QwtIntervalSymbol& operator=(const QwtIntervalSymbol&);
82 // Compare two symbols
83 bool operator==(const QwtIntervalSymbol&) const;
84 // Compare two symbols
85 bool operator!=(const QwtIntervalSymbol&) const;
86
87 // Set the symbol width
88 void setWidth(int);
89 // Get the symbol width
90 int width() const;
91
92 // Set the brush for Box style
93 void setBrush(const QBrush&);
94 // Get the brush
95 const QBrush& brush() const;
96
97 // Build and set a pen with color, width and style
98 void setPen(const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine);
99 // Set the pen
100 void setPen(const QPen&);
101 // Get the pen
102 const QPen& pen() const;
103
104 // Set the symbol style
105 void setStyle(Style);
106 // Get the symbol style
107 Style style() const;
108
109 // Draw the symbol
110 virtual void draw(QPainter*, Qt::Orientation, const QPointF& from, const QPointF& to) const;
111
112private:
113 QWT_DECLARE_PRIVATE(QwtIntervalSymbol)
114};
115
116#endif
A drawing primitive for displaying an interval like an error bar
Definition qwt_interval_symbol.h:44
Style
Symbol style
Definition qwt_interval_symbol.h:48
@ Bar
The symbol displays a line with caps at the beginning/end.
Definition qwt_interval_symbol.h:56
@ Box
The symbol displays a plain rectangle using pen() and brush().
Definition qwt_interval_symbol.h:62