From 6b8506c61ef15a9e79ffc10473ef622cf94a662d Mon Sep 17 00:00:00 2001 From: xavier Date: Sun, 5 Feb 2012 19:33:11 +0000 Subject: [PATCH] Implemented TitleBlockTemplatesCollection::templatesLocations() to ease templates collections usage. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1488 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/titleblock/templatescollection.cpp | 13 +++++++++++++ sources/titleblock/templatescollection.h | 1 + 2 files changed, 14 insertions(+) diff --git a/sources/titleblock/templatescollection.cpp b/sources/titleblock/templatescollection.cpp index e038e0d92..d2ccb5c1f 100644 --- a/sources/titleblock/templatescollection.cpp +++ b/sources/titleblock/templatescollection.cpp @@ -74,6 +74,19 @@ QETProject *TitleBlockTemplatesCollection::parentProject() { return(0); } +/** + @return the templates contained within this collection, as a list of location + objects. + @see templates() +*/ +QList TitleBlockTemplatesCollection::templatesLocations() { + QList locations; + foreach (QString template_name, templates()) { + locations << location(template_name); + } + return(locations); +} + /** Constructor @param project Parent project diff --git a/sources/titleblock/templatescollection.h b/sources/titleblock/templatescollection.h index 26e10d704..4009814b8 100644 --- a/sources/titleblock/templatescollection.h +++ b/sources/titleblock/templatescollection.h @@ -54,6 +54,7 @@ class TitleBlockTemplatesCollection : public QObject { virtual QString protocol() const; virtual void setProtocol(const QString &); virtual QETProject *parentProject(); + virtual QList templatesLocations(); signals: void changed(TitleBlockTemplatesCollection *, const QString & = QString());