[qet] [1488] Implemented TitleBlockTemplatesCollection::templatesLocations() to ease templates collections usage.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1488
Author:   xavier
Date:     2012-02-05 20:33:11 +0100 (Sun, 05 Feb 2012)
Log Message:
-----------
Implemented TitleBlockTemplatesCollection::templatesLocations() to ease templates collections usage.

Modified Paths:
--------------
    branches/0.3/sources/titleblock/templatescollection.cpp
    branches/0.3/sources/titleblock/templatescollection.h

Modified: branches/0.3/sources/titleblock/templatescollection.cpp
===================================================================
--- branches/0.3/sources/titleblock/templatescollection.cpp	2012-02-05 19:24:42 UTC (rev 1487)
+++ branches/0.3/sources/titleblock/templatescollection.cpp	2012-02-05 19:33:11 UTC (rev 1488)
@@ -75,6 +75,19 @@
 }
 
 /**
+	@return the templates contained within this collection, as a list of location
+	objects.
+	@see templates()
+*/
+QList<TitleBlockTemplateLocation> TitleBlockTemplatesCollection::templatesLocations() {
+	QList<TitleBlockTemplateLocation> locations;
+	foreach (QString template_name, templates()) {
+		locations << location(template_name);
+	}
+	return(locations);
+}
+
+/**
 	Constructor
 	@param project Parent project
 	@param parent Parent QObject

Modified: branches/0.3/sources/titleblock/templatescollection.h
===================================================================
--- branches/0.3/sources/titleblock/templatescollection.h	2012-02-05 19:24:42 UTC (rev 1487)
+++ branches/0.3/sources/titleblock/templatescollection.h	2012-02-05 19:33:11 UTC (rev 1488)
@@ -54,6 +54,7 @@
 	virtual QString protocol() const;
 	virtual void setProtocol(const QString &);
 	virtual QETProject *parentProject();
+	virtual QList<TitleBlockTemplateLocation> templatesLocations();
 	
 	signals:
 	void changed(TitleBlockTemplatesCollection *, const QString & = QString());


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/