qwt_plot_intervalcurve.h
Go to the documentation of this file.
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_PLOT_INTERVAL_CURVE_H
00011 #define QWT_PLOT_INTERVAL_CURVE_H
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_plot_seriesitem.h"
00015 #include "qwt_series_data.h"
00016 
00017 class QwtIntervalSymbol;
00018 
00027 class QWT_EXPORT QwtPlotIntervalCurve: 
00028     public QwtPlotSeriesItem, public QwtSeriesStore<QwtIntervalSample>
00029 {
00030 public:
00037     enum CurveStyle
00038     {
00042         NoCurve,
00043 
00049         Tube,
00050 
00056         UserCurve = 100
00057     };
00058 
00063     enum PaintAttribute
00064     {
00070         ClipPolygons = 0x01,
00071 
00073         ClipSymbol   = 0x02
00074     };
00075 
00077     typedef QFlags<PaintAttribute> PaintAttributes;
00078 
00079     explicit QwtPlotIntervalCurve( const QString &title = QString::null );
00080     explicit QwtPlotIntervalCurve( const QwtText &title );
00081 
00082     virtual ~QwtPlotIntervalCurve();
00083 
00084     virtual int rtti() const;
00085 
00086     void setPaintAttribute( PaintAttribute, bool on = true );
00087     bool testPaintAttribute( PaintAttribute ) const;
00088 
00089     void setSamples( const QVector<QwtIntervalSample> & );
00090     void setSamples( QwtSeriesData<QwtIntervalSample> * );
00091 
00092     void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
00093     void setPen( const QPen & );
00094     const QPen &pen() const;
00095 
00096     void setBrush( const QBrush & );
00097     const QBrush &brush() const;
00098 
00099     void setStyle( CurveStyle style );
00100     CurveStyle style() const;
00101 
00102     void setSymbol( const QwtIntervalSymbol * );
00103     const QwtIntervalSymbol *symbol() const;
00104 
00105     virtual void drawSeries( QPainter *p,
00106         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00107         const QRectF &canvasRect, int from, int to ) const;
00108 
00109     virtual QRectF boundingRect() const;
00110 
00111     virtual QwtGraphic legendIcon( int index, const QSizeF & ) const;
00112 
00113 protected:
00114 
00115     void init();
00116 
00117     virtual void drawTube( QPainter *,
00118         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00119         const QRectF &canvasRect, int from, int to ) const;
00120 
00121     virtual void drawSymbols( QPainter *, const QwtIntervalSymbol &,
00122         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00123         const QRectF &canvasRect, int from, int to ) const;
00124 
00125 private:
00126     class PrivateData;
00127     PrivateData *d_data;
00128 };
00129 
00130 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotIntervalCurve::PaintAttributes )
00131 
00132 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56