qwt_plot_svgitem.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_PLOT_SVGITEM_H
00011 #define QWT_PLOT_SVGITEM_H
00012 
00013 #include <qglobal.h>
00014 
00015 #include <qstring.h>
00016 #include "qwt_double_rect.h" 
00017 #include "qwt_plot_item.h" 
00018 
00019 #if QT_VERSION >= 0x040100
00020 class QSvgRenderer;
00021 class QByteArray;
00022 #endif
00023 
00031 class QWT_EXPORT QwtPlotSvgItem: public QwtPlotItem
00032 {
00033 public:
00034     explicit QwtPlotSvgItem(const QString& title = QString::null );
00035     explicit QwtPlotSvgItem(const QwtText& title );
00036     virtual ~QwtPlotSvgItem();
00037 
00038     bool loadFile(const QwtDoubleRect&, const QString &fileName);
00039     bool loadData(const QwtDoubleRect&, const QByteArray &);
00040 
00041     virtual QwtDoubleRect boundingRect() const;
00042 
00043     virtual void draw(QPainter *p,
00044         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00045         const QRect &rect) const;
00046 
00047     virtual int rtti() const;
00048 
00049 protected:
00050 #if QT_VERSION >= 0x040100
00051     const QSvgRenderer &renderer() const;
00052     QSvgRenderer &renderer();
00053 #endif
00054 
00055     void render(QPainter *painter,
00056         const QwtDoubleRect &viewBox, const QRect &rect) const;
00057     QwtDoubleRect viewBox(const QwtDoubleRect &area) const;
00058 
00059 private:
00060     void init();
00061 
00062     class PrivateData;
00063     PrivateData *d_data;
00064 };
00065 
00066 #endif

Generated on Mon Feb 26 21:22:38 2007 for Qwt User's Guide by  doxygen 1.4.6