18 #ifndef XMLELEMENTCOLLECTION_H 19 #define XMLELEMENTCOLLECTION_H 22 #include <QDomElement> 40 QDomElement
root()
const;
42 QDomNodeList
childs(
const QDomElement &parent_element)
const;
43 QDomElement
child(
const QDomElement &parent_element,
const QString &child_name)
const;
44 QDomElement
child(
const QString &path)
const;
45 QList<QDomElement>
directories(
const QDomElement &parent_element)
const;
47 QList<QDomElement>
elements(
const QDomElement &parent_element)
const;
48 QStringList
elementsNames(
const QDomElement &parent_element)
const;
49 QDomElement
element(
const QString &path)
const;
50 QDomElement
directory(
const QString &path)
const;
52 bool addElementDefinition (
const QString &dir_path,
const QString &elmt_name,
const QDomElement &xml_definition);
55 bool exist (
const QString &path)
const;
59 QList <ElementsLocation>
elementsLocation (QDomElement dom_element = QDomElement(),
bool childs =
true)
const;
106 #endif // XMLELEMENTCOLLECTION_H
QStringList directoriesNames(const QDomElement &parent_element) const
XmlElementCollection::directoriesNames.
bool removeDir(const QString &path)
XmlElementCollection::removeDir Remove the directory at path .
ElementsLocation copy(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString(), bool deep_copy=true)
XmlElementCollection::copy Copy the content represented by source (an element or a directory) to dest...
void directorieAdded(QString collection_path)
directorieAdded This signal is emited when a directorie is added to this collection ...
bool createDir(const QString &path, const QString &name, const NamesList &name_list)
ElementsLocation domToLocation(QDomElement dom_element) const
XmlElementCollection::domToLocation Return the element location who represent the xml element : dom_e...
QDomElement child(const QDomElement &parent_element, const QString &child_name) const
XmlElementCollection::child If parent_element have child element with an attribute name = ...
void elementAdded(QString collection_path)
elementAdded This signal is emited when a element is added to this collection
QDomDocument m_dom_document
QDomElement root() const
XmlElementCollection::root The root is the first DOM-Element the xml collection, the tag name of the ...
void cleanUnusedDirectory()
XmlElementCollection::cleanUnusedDirectory Remove the empty directories of this collection.
QStringList elementsNames(const QDomElement &parent_element) const
XmlElementCollection::elementsNames.
QDomElement element(const QString &path) const
XmlElementCollection::element.
bool exist(const QString &path) const
XmlElementCollection::exist Return true if the path exist in this collection.
QList< QDomElement > directories(const QDomElement &parent_element) const
XmlElementCollection::directories.
QList< ElementsLocation > elementsLocation(QDomElement dom_element=QDomElement(), bool childs=true) const
XmlElementCollection::elementsLocation Return all locations stored in dom_element (element and direct...
QList< QDomElement > elements(const QDomElement &parent_element) const
XmlElementCollection::elements.
void elementChanged(QString collection_path)
elementChanged This signal is emited when the defintion of the element at path was changed ...
ElementsLocation copyElement(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString())
XmlElementCollection::copyElement Copy the element represented by source to destination (must be a di...
QDomElement directory(const QString &path) const
XmlElementCollection::directory.
void elementRemoved(QString collection_path)
elementRemoved This signal is emited when an element is removed to this collection ...
void cleanUnusedElement()
XmlElementCollection::cleanUnusedElement Remove elements in this collection which is not used in the ...
bool removeElement(const QString &path)
XmlElementCollection::removeElement Remove the element at path .
QString addElement(ElementsLocation &location)
XmlElementCollection::addElement Add the element at location to this collection. The element is copie...
void directoryRemoved(QString collection_path)
directoryRemoved This signal is emited when a directory is removed to this collection ...
bool addElementDefinition(const QString &dir_path, const QString &elmt_name, const QDomElement &xml_definition)
XmlElementCollection::addElementDefinition Add the élément defintion in the directory at path with ...
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString(), bool deep_copy=true)
XmlElementCollection::copyDirectory Copy the directory represented by source to destination. if destination have a directory with the same name as source, then this directory is removed.
QDomNodeList childs(const QDomElement &parent_element) const
XmlElementCollection::childs.
The XmlElementCollection class This class represent a collection of elements stored to xml...
XmlElementCollection(QETProject *project)
XmlElementCollection::XmlElementCollection Build an empty collection. The collection start by : <coll...
QDomElement importCategory() const
XmlElementCollection::importCategory.