mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
New element panel : drag and drop an item from a project collection to a files system collection work.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4375 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -177,6 +177,26 @@ QList<QDomElement> XmlElementCollection::directories(const QDomElement &parent_e
|
||||
return directory_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XmlElementCollection::directoriesNames
|
||||
* @param parent_element
|
||||
* @return a list of names for every child directories of @parent_element
|
||||
*/
|
||||
QStringList XmlElementCollection::directoriesNames(const QDomElement &parent_element)
|
||||
{
|
||||
QList <QDomElement> childs = directories(parent_element);
|
||||
QStringList names;
|
||||
|
||||
foreach (QDomElement child, childs)
|
||||
{
|
||||
QString name = child.attribute("name");
|
||||
if (!name.isEmpty())
|
||||
names.append(name);
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XmlElementCollection::elements
|
||||
* @param parent_element
|
||||
@@ -198,6 +218,26 @@ QList<QDomElement> XmlElementCollection::elements(const QDomElement &parent_elem
|
||||
return element_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XmlElementCollection::elementsNames
|
||||
* @param parent_element
|
||||
* @return A list of names fr every childs element of @parent_element
|
||||
*/
|
||||
QStringList XmlElementCollection::elementsNames(const QDomElement &parent_element)
|
||||
{
|
||||
QList <QDomElement> childs = elements(parent_element);
|
||||
QStringList names;
|
||||
|
||||
foreach (QDomElement child, childs)
|
||||
{
|
||||
QString name = child.attribute("name");
|
||||
if (!name.isEmpty())
|
||||
names.append(name);
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief XmlElementCollection::element
|
||||
* @param path : path of element : the path must start by "import/",
|
||||
|
||||
Reference in New Issue
Block a user