[4272] | 1 | /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
|
---|
| 2 | * QwtPolar Widget Library
|
---|
| 3 | * Copyright (C) 2008 Uwe Rathmann
|
---|
| 4 | *
|
---|
| 5 | * This library is free software; you can redistribute it and/or
|
---|
| 6 | * modify it under the terms of the Qwt License, Version 1.0
|
---|
| 7 | *****************************************************************************/
|
---|
| 8 |
|
---|
| 9 | #ifndef QWT_POLAR_RENDERER_H
|
---|
| 10 | #define QWT_POLAR_RENDERER_H 1
|
---|
| 11 |
|
---|
| 12 | #include "qwt_polar_global.h"
|
---|
| 13 | #include <qobject.h>
|
---|
[8127] | 14 | #include <qsize.h>
|
---|
[4272] | 15 |
|
---|
| 16 | class QwtPolarPlot;
|
---|
| 17 | class QRectF;
|
---|
| 18 | class QPainter;
|
---|
| 19 | class QPrinter;
|
---|
| 20 | class QPaintDevice;
|
---|
| 21 | #ifndef QWT_NO_POLAR_SVG
|
---|
| 22 | #ifdef QT_SVG_LIB
|
---|
| 23 | class QSvgGenerator;
|
---|
| 24 | #endif
|
---|
| 25 | #endif
|
---|
| 26 |
|
---|
| 27 | /*!
|
---|
| 28 | \brief Renderer for exporting a polar plot to a document, a printer
|
---|
| 29 | or anything else, that is supported by QPainter/QPaintDevice
|
---|
| 30 | */
|
---|
| 31 | class QWT_POLAR_EXPORT QwtPolarRenderer: public QObject
|
---|
| 32 | {
|
---|
| 33 | Q_OBJECT
|
---|
| 34 |
|
---|
| 35 | public:
|
---|
| 36 | explicit QwtPolarRenderer( QObject *parent = NULL );
|
---|
| 37 | virtual ~QwtPolarRenderer();
|
---|
| 38 |
|
---|
| 39 | void renderDocument( QwtPolarPlot *, const QString &format,
|
---|
| 40 | const QSizeF &sizeMM, int resolution = 85 );
|
---|
| 41 |
|
---|
| 42 | void renderDocument( QwtPolarPlot *,
|
---|
| 43 | const QString &title, const QString &format,
|
---|
| 44 | const QSizeF &sizeMM, int resolution = 85 );
|
---|
| 45 |
|
---|
| 46 | #ifndef QWT_NO_POLAR_SVG
|
---|
| 47 | #ifdef QT_SVG_LIB
|
---|
| 48 | #if QT_VERSION >= 0x040500
|
---|
| 49 | void renderTo( QwtPolarPlot *, QSvgGenerator & ) const;
|
---|
| 50 | #endif
|
---|
| 51 | #endif
|
---|
| 52 | #endif
|
---|
| 53 | void renderTo( QwtPolarPlot *, QPrinter & ) const;
|
---|
[8127] | 54 | void renderTo( QwtPolarPlot *, QPaintDevice & ) const;
|
---|
[4272] | 55 |
|
---|
| 56 | virtual void render( QwtPolarPlot *,
|
---|
| 57 | QPainter *, const QRectF &rect ) const;
|
---|
| 58 |
|
---|
[8127] | 59 | bool exportTo( QwtPolarPlot *, const QString &documentName,
|
---|
| 60 | const QSizeF &sizeMM = QSizeF( 200, 200 ), int resolution = 85 );
|
---|
| 61 |
|
---|
[4272] | 62 | virtual void renderTitle( QPainter *, const QRectF & ) const;
|
---|
| 63 |
|
---|
[8127] | 64 | virtual void renderLegend(
|
---|
| 65 | const QwtPolarPlot *, QPainter *, const QRectF & ) const;
|
---|
[4272] | 66 |
|
---|
| 67 | private:
|
---|
| 68 | class PrivateData;
|
---|
| 69 | PrivateData *d_data;
|
---|
| 70 | };
|
---|
| 71 |
|
---|
| 72 | #endif
|
---|