mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
xmlElementCollection : collection can add new item.
elementsCollectionModel : Up to date the content when a new item is added to the embedded collection of a project. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4312 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -227,8 +227,23 @@ bool ElementLocation::isDirectory() const {
|
||||
* @brief ElementLocation::collectionPath
|
||||
* @return the colletion relative to the collection
|
||||
*/
|
||||
QString ElementLocation::collectionPath() const {
|
||||
return m_collection_path;
|
||||
/**
|
||||
* @brief ElementLocation::collectionPath
|
||||
* Return the path of the represented element relative to collection
|
||||
* if @protocol is true the path is prepended by the collection type (common://, custom:// or embed://)
|
||||
* else if false, only the collection path is returned without the collection type.
|
||||
* @param protocol
|
||||
* @return the path
|
||||
*/
|
||||
QString ElementLocation::collectionPath(bool protocol) const
|
||||
{
|
||||
if (protocol)
|
||||
return m_collection_path;
|
||||
else
|
||||
{
|
||||
QString path = m_collection_path;
|
||||
return path.remove(QRegularExpression("common://|custom://|embed://"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user