Qwt User's Guide svn
qwt_interval_symbol.h
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef QWT_INTERVAL_SYMBOL_H
00011 #define QWT_INTERVAL_SYMBOL_H
00012 
00013 #include "qwt_global.h"
00014 #include <qpen.h>
00015 #include <qsize.h>
00016 
00017 class QPainter;
00018 class QRect;
00019 class QPointF;
00020 
00026 class QWT_EXPORT QwtIntervalSymbol
00027 {
00028 public:
00030     enum Style
00031     {
00033         NoSymbol = -1,
00034 
00039         Bar,
00040 
00046         Box,
00047 
00053         UserSymbol = 1000
00054     };
00055 
00056 public:
00057     QwtIntervalSymbol( Style = NoSymbol );
00058     QwtIntervalSymbol( const QwtIntervalSymbol & );
00059     virtual ~QwtIntervalSymbol();
00060 
00061     QwtIntervalSymbol &operator=( const QwtIntervalSymbol & );
00062     bool operator==( const QwtIntervalSymbol & ) const;
00063     bool operator!=( const QwtIntervalSymbol & ) const;
00064 
00065     void setWidth( int );
00066     int width() const;
00067 
00068     void setBrush( const QBrush& b );
00069     const QBrush& brush() const;
00070 
00071     void setPen( const QPen & );
00072     const QPen& pen() const;
00073 
00074     void setStyle( Style );
00075     Style style() const;
00076 
00077     virtual void draw( QPainter *, Qt::Orientation,
00078         const QPointF& from, const QPointF& to ) const;
00079 
00080 private:
00081 
00082     class PrivateData;
00083     PrivateData* d_data;
00084 };
00085 
00086 #endif
qmi style