mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-01 17:30:52 +01:00
Project embedded collection, Clean unused elements and empty directory work again
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4568 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -50,13 +50,18 @@ class XmlElementCollection : public QObject
|
||||
QDomElement directory(const QString &path) const;
|
||||
QString addElement (ElementsLocation &location);
|
||||
bool addElementDefinition (const QString &dir_path, const QString &elmt_name, const QDomElement &xml_definition);
|
||||
bool removeElement(QString path);
|
||||
ElementsLocation copy (ElementsLocation &source, ElementsLocation &destination, QString rename = QString(), bool deep_copy = true);
|
||||
bool exist (const QString &path) const;
|
||||
bool createDir (QString path, QString name, const NamesList &name_list);
|
||||
bool removeDir (QString path);
|
||||
|
||||
QList <ElementsLocation> elementsLocation (QDomElement dom_element = QDomElement(), bool childs = true) const;
|
||||
ElementsLocation domToLocation(QDomElement dom_element) const;
|
||||
|
||||
void cleanUnusedElement();
|
||||
void cleanUnusedDirectory();
|
||||
|
||||
private:
|
||||
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, QString rename = QString(), bool deep_copy = true);
|
||||
ElementsLocation copyElement(ElementsLocation &source, ElementsLocation &destination, QString rename = QString());
|
||||
@@ -74,12 +79,24 @@ class XmlElementCollection : public QObject
|
||||
* @param collection_path, the path of this element in this collection
|
||||
*/
|
||||
void elementChanged (QString collection_path);
|
||||
/**
|
||||
* @brief elementRemoved
|
||||
* This signal is emited when an element is removed to this collection
|
||||
* @param collection_path, the path of the removed element in this collection
|
||||
*/
|
||||
void elementRemoved(QString collection_path);
|
||||
/**
|
||||
* @brief directorieAdded
|
||||
* This signal is emited when a directorie is added to this collection
|
||||
* @param collection_path, the path of the new directorie
|
||||
*/
|
||||
void directorieAdded(QString collection_path);
|
||||
/**
|
||||
* @brief directoryRemoved
|
||||
* This signal is emited when a directory is removed to this collection
|
||||
* @param collection_path, the path of the removed directory
|
||||
*/
|
||||
void directoryRemoved(QString collection_path);
|
||||
|
||||
private:
|
||||
QDomDocument m_dom_document;
|
||||
|
||||
Reference in New Issue
Block a user