source: ntrip/trunk/BNC/qwt/qwt_interval_symbol.h@ 8154

Last change on this file since 8154 was 8127, checked in by stoecker, 7 years ago

update qwt and qwtpolar, many QT5 fixes (unfinished)

File size: 2.2 KB
Line 
1/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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_INTERVAL_SYMBOL_H
11#define QWT_INTERVAL_SYMBOL_H
12
13#include "qwt_global.h"
14#include <qpen.h>
15#include <qsize.h>
16
17class QPainter;
18class QRect;
19class QPointF;
20
21/*!
22 \brief A drawing primitive for displaying an interval like an error bar
23
24 \sa QwtPlotIntervalCurve
25*/
26class QWT_EXPORT QwtIntervalSymbol
27{
28public:
29 //! Symbol style
30 enum Style
31 {
32 //! No Style. The symbol cannot be drawn.
33 NoSymbol = -1,
34
35 /*!
36 The symbol displays a line with caps at the beginning/end.
37 The size of the caps depends on the symbol width().
38 */
39 Bar,
40
41 /*!
42 The symbol displays a plain rectangle using pen() and brush().
43 The size of the rectangle depends on the translated interval and
44 the width(),
45 */
46 Box,
47
48 /*!
49 Styles >= UserSymbol are reserved for derived
50 classes of QwtIntervalSymbol that overload draw() with
51 additional application specific symbol types.
52 */
53 UserSymbol = 1000
54 };
55
56public:
57 QwtIntervalSymbol( Style = NoSymbol );
58 QwtIntervalSymbol( const QwtIntervalSymbol & );
59 virtual ~QwtIntervalSymbol();
60
61 QwtIntervalSymbol &operator=( const QwtIntervalSymbol & );
62 bool operator==( const QwtIntervalSymbol & ) const;
63 bool operator!=( const QwtIntervalSymbol & ) const;
64
65 void setWidth( int );
66 int width() const;
67
68 void setBrush( const QBrush& b );
69 const QBrush& brush() const;
70
71 void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
72 void setPen( const QPen & );
73 const QPen& pen() const;
74
75 void setStyle( Style );
76 Style style() const;
77
78 virtual void draw( QPainter *, Qt::Orientation,
79 const QPointF& from, const QPointF& to ) const;
80
81private:
82
83 class PrivateData;
84 PrivateData* d_data;
85};
86
87#endif
Note: See TracBrowser for help on using the repository browser.