QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
qetsvg.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2026 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef QETSVG_H
19#define QETSVG_H
20
21#include <QDomElement>
22
23class QDomDocument;
24class QPointF;
25class QRectF;
26
33namespace QETSVG
34{
35 QDomElement rectToElmt(const QRectF &rect, QDomDocument &parent_document);
36 QRectF rectFromElmt(const QDomElement &xml_element);
37
38 void yToAttribute(const qreal &y, QDomElement &xml_element);
39 qreal yFromAttribute(const QDomElement &xml_element, const qreal &def_value=0);
40
41 void heightToAttribute(const qreal &height, QDomElement &xml_element);
42 qreal heightFromAttribute(const QDomElement &xml_element, const qreal &def_value=10);
43
44 void rToAttribute(const qreal &r, QDomElement &xml_element);
45 qreal rFromAttribute(const QDomElement &xml_element, const qreal &def_value=1);
46
47 void pointsToAttribute(const QVector<QPointF> &points, QDomElement &xml_element);
48 QVector<QPointF> pointsFromAttribute (const QDomElement &xml_element);
49}
50
51#endif // QETSVG_H
the QETSVG namespace provide function read and write svg. Some function work on xml element (ex rect)...
void yToAttribute(const qreal &y, QDomElement &xml_element)
QETSVG::yToAttribute.
Definition qetsvg.cpp:67
void rToAttribute(const qreal &r, QDomElement &xml_element)
Definition qetsvg.cpp:102
qreal yFromAttribute(const QDomElement &xml_element, const qreal &def_value=0)
QETSVG::yFromAttribute.
Definition qetsvg.cpp:77
QDomElement rectToElmt(const QRectF &rect, QDomDocument &parent_document)
QETSVG::rectToElmt Write a QRect as a svg rect element.
Definition qetsvg.cpp:32
void pointsToAttribute(const QVector< QPointF > &points, QDomElement &xml_element)
Definition qetsvg.cpp:115
void heightToAttribute(const qreal &height, QDomElement &xml_element)
QETSVG::heightToAttribute.
Definition qetsvg.cpp:90
QVector< QPointF > pointsFromAttribute(const QDomElement &xml_element)
QETSVG::pointsFromAttribute.
Definition qetsvg.cpp:133
QRectF rectFromElmt(const QDomElement &xml_element)
QETSVG::rectFromElmt.
Definition qetsvg.cpp:50
qreal rFromAttribute(const QDomElement &xml_element, const qreal &def_value=1)
Definition qetsvg.cpp:106
qreal heightFromAttribute(const QDomElement &xml_element, const qreal &def_value=10)
Definition qetsvg.cpp:94