QElectroTech
0.8-dev
|
Functions | |
QDomElement | penToXml (QDomDocument &parent_document, const QPen &pen) |
QETXML::penToXml Write attribute of a QPen in xml element. More... | |
QPen | penFromXml (const QDomElement &element) |
QETXML::penFromXml Build a QPen from a xml description. More... | |
QDomElement | brushToXml (QDomDocument &parent_document, const QBrush &brush) |
QETXML::brushToXml Write attribute of a QBrush in xml element. More... | |
QBrush | brushFromXml (const QDomElement &element) |
QETXML::brushFromXml Build a QBrush from a xml description. More... | |
QDomElement | fileSystemDirToXmlCollectionDir (QDomDocument &document, const QDir &dir, const QString &rename=QString()) |
QDomElement | fileSystemElementToXmlCollectionElement (QDomDocument &document, QFile &file, const QString &rename=QString()) |
bool | 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. More... | |
QDomElement | 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. More... | |
QVector< QDomElement > | directChild (const QDomElement &element, const QString &tag_name) |
QETXML::directChild. More... | |
QVector< QDomElement > | subChild (const QDomElement &element, const QString parent_tag_name, const QString &children_tag_name) |
QETXML::subChild. More... | |
QDomElement | marginsToXml (QDomDocument &parent_document, const QMargins &margins) |
QETXML::marginsToXml Save a QMargins to xml. the xml tag name is 'margins'. More... | |
QMargins | marginsFromXml (const QDomElement &element) |
QETXML::marginsFromXml. More... | |
QDomElement | 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. More... | |
void | modelHeaderDataFromXml (const QDomElement &element, QAbstractItemModel *model) |
QETXML::modelHeaderDataFromXml Restore from xml modele header data. More... | |
This namespace contain some function to use xml with QET.
QBrush QETXML::brushFromXml | ( | const QDomElement & | element | ) |
QETXML::brushFromXml Build a QBrush from a xml description.
element | : the QDomElement that describe the pen |
QDomElement QETXML::brushToXml | ( | QDomDocument & | parent_document, |
const QBrush & | brush | ||
) |
QETXML::brushToXml Write attribute of a QBrush in xml element.
parent_document | : parent document for create the QDomElement |
brush | : the brush to store |
QVector< QDomElement > QETXML::directChild | ( | const QDomElement & | element, |
const QString & | tag_name | ||
) |
element | |
tag_name |
QDomElement QETXML::fileSystemDirToXmlCollectionDir | ( | QDomDocument & | document, |
const QDir & | dir, | ||
const QString & | rename = QString() |
||
) |
QDomElement QETXML::fileSystemElementToXmlCollectionElement | ( | QDomDocument & | document, |
QFile & | file, | ||
const QString & | rename = QString() |
||
) |
QMargins QETXML::marginsFromXml | ( | const QDomElement & | element | ) |
element |
QDomElement QETXML::marginsToXml | ( | QDomDocument & | parent_document, |
const QMargins & | margins | ||
) |
QETXML::marginsToXml Save a QMargins to xml. the xml tag name is 'margins'.
parent_document | |
margins |
void QETXML::modelHeaderDataFromXml | ( | const QDomElement & | element, |
QAbstractItemModel * | model | ||
) |
QETXML::modelHeaderDataFromXml Restore from xml modele header data.
element | |
model |
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.
parent_document | |
model | |
horizontal_section_role | : key as header section and value as list of roles to save in xml |
vertical_section_role | :key as header section and value as list of roles to save in xml |
QPen QETXML::penFromXml | ( | const QDomElement & | element | ) |
QETXML::penFromXml Build a QPen from a xml description.
element | : The QDomElement that describe the pen |
QDomElement QETXML::penToXml | ( | QDomDocument & | parent_document, |
const QPen & | pen | ||
) |
QETXML::penToXml Write attribute of a QPen in xml element.
parent_document | : parent document for create the QDomElement |
pen | : the pen to store |
QVector< QDomElement > QETXML::subChild | ( | const QDomElement & | element, |
const QString | parent_tag_name, | ||
const QString & | children_tag_name | ||
) |
element | |
parent_tag_name | |
children_tag_name |
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.
document | |
tag_name | |
value |
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.
xml_document | : An XML document to be exported |
file_path | : Path to the file to be written |
error_message | : If non-zero, will contain an error message explaining what happened when this function returns false. |