mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
Added count() method to ElementsCollectionItem class and its subclasses.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1216 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -378,6 +378,15 @@ bool ElementsCollection::isEmpty() {
|
||||
return(root_category -> isEmpty());
|
||||
}
|
||||
|
||||
/**
|
||||
@return the count of categories and elements within this collection
|
||||
*/
|
||||
int ElementsCollection::count() {
|
||||
ElementsCategory *root_category = rootCategory();
|
||||
if (!root_category) return(0);
|
||||
return(root_category -> count());
|
||||
}
|
||||
|
||||
/**
|
||||
@param item_path chemin d'un item sous la forme d'une adresse
|
||||
virtuelle comme common://cat1/cat2/cat3
|
||||
@@ -404,3 +413,4 @@ ElementsCollectionItem *ElementsCollection::item(const QString &item_path, bool
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user