mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Element panel : elements can be searched by their name but also with by all their informations.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5698 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -681,6 +681,23 @@ QString ElementsLocation::fileName() const
|
||||
else return qsl.last();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementsLocation::elementInformations
|
||||
* @return the element information of the element represented by this location.
|
||||
* If the location is a directory, the returned diagram context is empty
|
||||
*/
|
||||
DiagramContext ElementsLocation::elementInformations() const
|
||||
{
|
||||
DiagramContext context;
|
||||
if (isDirectory()) {
|
||||
return context;
|
||||
}
|
||||
|
||||
QDomElement dom = this->xml().firstChildElement("elementInformations");
|
||||
context.fromXml(dom, "elementInformation");
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
@param location A standard element location
|
||||
@return a hash identifying this location
|
||||
|
||||
Reference in New Issue
Block a user