source: pacpusframework/branches/2.0-beta1/include/extlib/qwt-5.2.1/qwt_plot_svgitem.h@ 89

Last change on this file since 89 was 89, checked in by morasjul, 11 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10#ifndef QWT_PLOT_SVGITEM_H
11#define QWT_PLOT_SVGITEM_H
12
13#include <qglobal.h>
14
15#include <qstring.h>
16#include "qwt_double_rect.h"
17#include "qwt_plot_item.h"
18
19#if QT_VERSION >= 0x040100
20class QSvgRenderer;
21class QByteArray;
22#endif
23
24/*!
25 \brief A plot item, which displays
26 data in Scalable Vector Graphics (SVG) format.
27
28 SVG images are often used to display maps
29*/
30
31class QWT_EXPORT QwtPlotSvgItem: public QwtPlotItem
32{
33public:
34 explicit QwtPlotSvgItem(const QString& title = QString::null );
35 explicit QwtPlotSvgItem(const QwtText& title );
36 virtual ~QwtPlotSvgItem();
37
38 bool loadFile(const QwtDoubleRect&, const QString &fileName);
39 bool loadData(const QwtDoubleRect&, const QByteArray &);
40
41 virtual QwtDoubleRect boundingRect() const;
42
43 virtual void draw(QPainter *p,
44 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
45 const QRect &rect) const;
46
47 virtual int rtti() const;
48
49protected:
50#if QT_VERSION >= 0x040100
51 const QSvgRenderer &renderer() const;
52 QSvgRenderer &renderer();
53#endif
54
55 void render(QPainter *painter,
56 const QwtDoubleRect &viewBox, const QRect &rect) const;
57 QwtDoubleRect viewBox(const QwtDoubleRect &area) const;
58
59private:
60 void init();
61
62 class PrivateData;
63 PrivateData *d_data;
64};
65
66#endif
Note: See TracBrowser for help on using the repository browser.