QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions | Variables
qetxml.h File Reference
#include <QDomElement>
#include <QPen>
Include dependency graph for qetxml.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  QETXML
 

Enumerations

enum  QETXML::PropertyFlags { QETXML::Success = 0 , QETXML::NotFound = 1 , QETXML::NoValidConversion = 2 }
 

Functions

QDomElement QETXML::penToXml (QDomDocument &parent_document, const QPen &pen)
 QETXML::penToXml Write attribute of a QPen in xml element.
 
QPen QETXML::penFromXml (const QDomElement &element)
 QETXML::penFromXml Build a QPen from a xml description.
 
QDomElement QETXML::brushToXml (QDomDocument &parent_document, const QBrush &brush)
 QETXML::brushToXml Write attribute of a QBrush in xml element.
 
QBrush QETXML::brushFromXml (const QDomElement &element)
 QETXML::brushFromXml Build a QBrush from a xml description.
 
QDomElement QETXML::fileSystemDirToXmlCollectionDir (QDomDocument &document, const QDir &dir, const QString &rename=QString())
 
QDomElement QETXML::fileSystemElementToXmlCollectionElement (QDomDocument &document, QFile &file, const QString &rename=QString())
 
bool QETXML::writeXmlFile (const QDomDocument &xml_document, const QString &file_path, QString *error_message=nullptr)
 QETXML::writeXmlFile Export an XML document to an UTF-8 text file indented with 4 spaces, with LF end of lines and no BOM.
 
QDomElement QETXML::textToDomElement (QDomDocument &document, const QString &tag_name, const QString &value)
 QETXML::textToDomElement Return a QDomElement, created from document, with tag name tag_name and text value.
 
QVector< QDomElement > QETXML::directChild (const QDomElement &element, const QString &tag_name)
 QETXML::directChild.
 
QVector< QDomElement > QETXML::subChild (const QDomElement &element, const QString parent_tag_name, const QString &children_tag_name)
 QETXML::subChild.
 
QDomElement QETXML::marginsToXml (QDomDocument &parent_document, const QMargins &margins)
 QETXML::marginsToXml Save a QMargins to xml. the xml tag name is 'margins'.
 
QMargins QETXML::marginsFromXml (const QDomElement &element)
 QETXML::marginsFromXml.
 
QDomElement QETXML::modelHeaderDataToXml (QDomDocument &parent_document, const QAbstractItemModel *model, QHash< int, QList< int > > horizontal_section_role, QHash< int, QList< int > > vertical_section_role)
 QETXML::modelHeaderDataToXml Save to xml element all header data specified by horizontal_section_role and vertical_section_role.
 
void QETXML::modelHeaderDataFromXml (const QDomElement &element, QAbstractItemModel *model)
 QETXML::modelHeaderDataFromXml Restore from xml modele header data.
 
QVector< QDomElement > QETXML::findInDomElement (const QDomElement &dom_elmt, const QString &tag_name)
 QETXML::findInDomElement.
 
QDomElement QETXML::qGraphicsItemPosToXml (QGraphicsItem *item, QDomDocument &document)
 qGraphicsItemPosToXml Save the pos of a QGraphicsItem into an xml element. The tag name of the xml element is pos and there is 3 attributes: x, y, z.
 
bool QETXML::qGraphicsItemPosFromXml (QGraphicsItem *item, const QDomElement &xml_elmt)
 
QString QETXML::boolToString (bool value)
 boolToString
 
bool QETXML::boolFromString (const QString &value, bool default_value, bool *conv_ok)
 boolFromString return value converted to bool
 
QDomElement QETXML::createXmlProperty (const QString &name, const QString value)
 Use this functions to add properties to the xml document.
 
QDomElement QETXML::createXmlProperty (const QString &name, const char *value)
 
QDomElement QETXML::createXmlProperty (const QString &name, const int value)
 propertyInteger Reads an integer from the XML element.
 
QDomElement QETXML::createXmlProperty (const QString &name, const double value)
 
QDomElement QETXML::createXmlProperty (const QString &name, const bool value)
 
QDomElement QETXML::createXmlProperty (const QString &name, const QUuid value)
 
QDomElement QETXML::createXmlProperty (const QString &name, const QColor value)
 
PropertyFlags QETXML::propertyInteger (const QString &value, int *entier)
 
PropertyFlags QETXML::propertyInteger (const QDomElement &e, const QString &attribute_name, int *entier)
 PropertiesInterface::propertyInteger Reads an integer from the XML element.
 
PropertyFlags QETXML::propertyDouble (const QString &value, double *reel)
 
PropertyFlags QETXML::propertyDouble (const QDomElement &e, const QString &attribute_name, double *reel)
 
PropertyFlags QETXML::propertyString (const QDomElement &e, const QString &attribute_name, QString *string)
 
PropertyFlags QETXML::propertyBool (const QString &value, bool *boolean)
 
PropertyFlags QETXML::propertyBool (const QDomElement &e, const QString &attribute_name, bool *boolean)
 
PropertyFlags QETXML::propertyUuid (const QString &value, QUuid *uuid)
 
PropertyFlags QETXML::propertyUuid (const QDomElement &e, const QString &attribute_name, QUuid *uuid)
 
PropertyFlags QETXML::propertyColor (const QString &value, QColor *color)
 
PropertyFlags QETXML::propertyColor (const QDomElement &e, const QString &attribute_name, QColor *color)
 
QDomElement QETXML::property (const QDomElement &e, const QString &name)
 
bool QETXML::attribute (const QDomElement &e, const QString &attribute_name, const QString &type, QString *attr)
 PropertiesInterface::attribute Returns the property with the name attribute_name and type type.
 
bool QETXML::validXmlProperty (const QDomElement &e)
 PropertiesInterface::validXmlProperty Check if the Xml element contains the needed fields.
 

Variables

const QString QETXML::integerS = "int"
 
const QString QETXML::doubleS = "double"
 
const QString QETXML::boolS = "bool"
 
const QString QETXML::stringS = "string"
 
const QString QETXML::uuidS = "uuid"
 
const QString QETXML::colorS = "color"