Qwt User's Guide 6.0.2

- Main Page
- Related Pages
- Classes

qwt_interval_symbol.h
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
17 class QPainter;
18 class QRect;
19 class QPointF;
20
26 class QWT_EXPORT QwtIntervalSymbol
27 {
28 public:
30 enum Style
31 {
33 NoSymbol = -1,
34
39 Bar,
40
46 Box,
47
53 UserSymbol = 1000
54 };
55
56 public:
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 QPen & );
72 const QPen& pen() const;
73
74 void setStyle( Style );
75 Style style() const;
76
77 virtual void draw( QPainter *, Qt::Orientation,
78 const QPointF& from, const QPointF& to ) const;
79
80 private:
81
82 class PrivateData;
83 PrivateData* d_data;
84 };
85
86 #endif