QWT 7.0.1
Loading...
Searching...
No Matches
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
44class QWT_EXPORT QwtIntervalSymbol
45{
46 public:
48 enum Style
49 {
51 NoSymbol = -1,
52
58
65
71 UserSymbol = 1000
72 };
73
74 public:
75 explicit QwtIntervalSymbol( Style = NoSymbol );
77
78 virtual ~QwtIntervalSymbol();
79
80 QwtIntervalSymbol& operator=( const QwtIntervalSymbol& );
81 bool operator==( const QwtIntervalSymbol& ) const;
82 bool operator!=( const QwtIntervalSymbol& ) const;
83
84 void setWidth( int );
85 int width() const;
86
87 void setBrush( const QBrush& );
88 const QBrush& brush() const;
89
90 void setPen( const QColor&, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
91 void setPen( const QPen& );
92 const QPen& pen() const;
93
94 void setStyle( Style );
95 Style style() const;
96
97 virtual void draw( QPainter*, Qt::Orientation,
98 const QPointF& from, const QPointF& to ) const;
99
100 private:
101 class PrivateData;
102 PrivateData* m_data;
103};
104
105#endif
A drawing primitive for displaying an interval like an error bar.
Definition qwt_interval_symbol.h:45
Style
Symbol style.
Definition qwt_interval_symbol.h:49
@ Bar
The symbol displays a line with caps at the beginning/end.
Definition qwt_interval_symbol.h:57
@ Box
The symbol displays a plain rectangle using pen() and brush().
Definition qwt_interval_symbol.h:64