source: ntrip/trunk/BNC/qwtpolar/qwt_polar_renderer.h@ 4440

Last change on this file since 4440 was 4272, checked in by mervart, 12 years ago
File size: 1.9 KB
Line 
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
15class QwtPolarPlot;
16class QSizeF;
17class QRectF;
18class QPainter;
19class QPrinter;
20class QPaintDevice;
21#ifndef QWT_NO_POLAR_SVG
22#ifdef QT_SVG_LIB
23class 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*/
31class QWT_POLAR_EXPORT QwtPolarRenderer: public QObject
32{
33 Q_OBJECT
34
35public:
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
59protected:
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
66private:
67 class PrivateData;
68 PrivateData *d_data;
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.