Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
g
i
l
m
o
p
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
w
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Properties
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Related Functions
:
a
b
c
d
e
f
g
i
m
o
q
r
s
v
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
x
z
+
Enumerations
a
b
c
d
e
f
h
i
k
l
n
o
r
t
u
v
x
+
Enumerator
b
c
d
e
f
h
i
k
l
m
n
o
p
r
t
u
v
w
x
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
3rdparty
qwt
src
qwt_plot_svgitem.cpp
Go to the documentation of this file.
1
/******************************************************************************
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
#include "
qwt_plot_svgitem.h
"
11
#include "
qwt_text.h
"
12
#include "
qwt_graphic.h
"
13
14
#include <qsvgrenderer.h>
15
20
QwtPlotSvgItem::QwtPlotSvgItem
(
const
QString& title )
21
:
QwtPlotGraphicItem
(
QwtText
( title ) )
22
{
23
}
24
29
QwtPlotSvgItem::QwtPlotSvgItem
(
const
QwtText
&
title
)
30
:
QwtPlotGraphicItem
( title )
31
{
32
}
33
35
QwtPlotSvgItem::~QwtPlotSvgItem
()
36
{
37
}
38
47
bool
QwtPlotSvgItem::loadFile
(
const
QRectF& rect,
48
const
QString& fileName )
49
{
50
QwtGraphic
graphic
;
51
52
QSvgRenderer renderer;
53
54
const
bool
ok
= renderer.load( fileName );
55
if
( ok )
56
{
57
QPainter p( &graphic );
58
renderer.render( &p );
59
}
60
61
setGraphic
( rect, graphic );
62
63
return
ok
;
64
}
65
74
bool
QwtPlotSvgItem::loadData
(
const
QRectF& rect,
75
const
QByteArray&
data
)
76
{
77
QwtGraphic
graphic
;
78
79
QSvgRenderer renderer;
80
81
const
bool
ok
= renderer.load( data );
82
if
( ok )
83
{
84
QPainter p( &graphic );
85
renderer.render( &p );
86
}
87
88
setGraphic
( rect, graphic );
89
90
return
ok
;
91
}
QwtPlotItem::title
const QwtText & title() const
Definition:
qwt_plot_item.cpp:215
QwtPlotSvgItem::QwtPlotSvgItem
QwtPlotSvgItem(const QString &title=QString())
Constructor.
Definition:
qwt_plot_svgitem.cpp:20
QwtPlotGraphicItem
A plot item, which displays a recorded sequence of QPainter commands.
Definition:
qwt_plot_graphicitem.h:29
ok
Definition:
lz4.c:1706
QwtText
A class representing a text.
Definition:
qwt_text.h:51
QwtPlotSvgItem::~QwtPlotSvgItem
virtual ~QwtPlotSvgItem()
Destructor.
Definition:
qwt_plot_svgitem.cpp:35
QwtGraphic
A paint device for scalable graphics.
Definition:
qwt_graphic.h:75
qwt_plot_svgitem.h
QwtPlotSvgItem::loadFile
bool loadFile(const QRectF &, const QString &fileName)
Definition:
qwt_plot_svgitem.cpp:47
qwt_text.h
QwtPlotGraphicItem::graphic
QwtGraphic graphic() const
Definition:
qwt_plot_graphicitem.cpp:96
QwtPlotSvgItem::loadData
bool loadData(const QRectF &, const QByteArray &)
Definition:
qwt_plot_svgitem.cpp:74
qwt_graphic.h
QwtPlotGraphicItem::setGraphic
void setGraphic(const QRectF &rect, const QwtGraphic &)
Definition:
qwt_plot_graphicitem.cpp:82
data
Definition:
format.h:895
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:39