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>
|
---|
14 |
|
---|
15 | class QwtPolarPlot;
|
---|
16 | class QSizeF;
|
---|
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;
|
---|
54 | void renderTo( QwtPolarPlot *, QPaintDevice &p ) const;
|
---|
55 |
|
---|
56 | virtual void render( QwtPolarPlot *,
|
---|
57 | QPainter *, const QRectF &rect ) const;
|
---|
58 |
|
---|
59 | protected:
|
---|
60 | virtual void renderTitle( QPainter *, const QRectF & ) const;
|
---|
61 | virtual void renderLegend( QPainter *, const QRectF & ) const;
|
---|
62 |
|
---|
63 | virtual void renderLegendItem( QPainter *,
|
---|
64 | const QWidget *, const QRectF & ) const;
|
---|
65 |
|
---|
66 | private:
|
---|
67 | class PrivateData;
|
---|
68 | PrivateData *d_data;
|
---|
69 | };
|
---|
70 |
|
---|
71 | #endif
|
---|