Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_PLOT_SVGITEM_H
00011 #define QWT_PLOT_SVGITEM_H
00012
00013 #include "qwt_global.h"
00014 #include "qwt_plot_item.h"
00015 #include <qstring.h>
00016
00017 class QSvgRenderer;
00018 class QByteArray;
00019
00027 class QWT_EXPORT QwtPlotSvgItem: public QwtPlotItem
00028 {
00029 public:
00030 explicit QwtPlotSvgItem( const QString& title = QString() );
00031 explicit QwtPlotSvgItem( const QwtText& title );
00032 virtual ~QwtPlotSvgItem();
00033
00034 bool loadFile( const QRectF&, const QString &fileName );
00035 bool loadData( const QRectF&, const QByteArray & );
00036
00037 virtual QRectF boundingRect() const;
00038
00039 virtual void draw( QPainter *p,
00040 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00041 const QRectF &rect ) const;
00042
00043 virtual int rtti() const;
00044
00045 protected:
00046 const QSvgRenderer &renderer() const;
00047 QSvgRenderer &renderer();
00048
00049 void render( QPainter *painter,
00050 const QRectF &viewBox, const QRectF &rect ) const;
00051
00052 QRectF viewBox( const QRectF &area ) const;
00053
00054 private:
00055 void init();
00056
00057 class PrivateData;
00058 PrivateData *d_data;
00059 };
00060
00061 #endif