qwt_plot_shapeitem.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_SHAPE_ITEM_H
00011 #define QWT_PLOT_SHAPE_ITEM_H
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_plot_item.h"
00015 #include <qpainterpath.h>
00016 
00031 class QWT_EXPORT QwtPlotShapeItem: public QwtPlotItem
00032 {
00033 public:
00040     enum PaintAttribute
00041     {
00051         ClipPolygons = 0x01,
00052     };
00053 
00055     typedef QFlags<PaintAttribute> PaintAttributes;
00056 
00058     enum LegendMode
00059     {
00061         LegendShape,
00062 
00064         LegendColor
00065     };
00066 
00067     explicit QwtPlotShapeItem( const QString &title = QString::null );
00068     explicit QwtPlotShapeItem( const QwtText &title );
00069 
00070     virtual ~QwtPlotShapeItem();
00071 
00072     void setPaintAttribute( PaintAttribute, bool on = true );
00073     bool testPaintAttribute( PaintAttribute ) const;
00074 
00075     void setLegendMode( LegendMode );
00076     LegendMode legendMode() const;
00077 
00078     void setRect( const QRectF & );
00079     void setPolygon( const QPolygonF & );
00080 
00081     void setShape( const QPainterPath & );
00082     QPainterPath shape() const;
00083 
00084     void setPen( const QColor &, qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
00085     void setPen( const QPen & );
00086     QPen pen() const;
00087 
00088     void setBrush( const QBrush & );
00089     QBrush brush() const;
00090 
00091     void setRenderTolerance( double );
00092     double renderTolerance() const;
00093 
00094     virtual QRectF boundingRect() const;
00095 
00096     virtual void draw( QPainter *p,
00097         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00098         const QRectF &rect ) const;
00099 
00100     virtual QwtGraphic legendIcon( int index, const QSizeF & ) const;
00101 
00102     virtual int rtti() const;
00103 
00104 private:
00105     void init();
00106 
00107     class PrivateData;
00108     PrivateData *d_data;
00109 };
00110 
00111 #endif


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