Folio report are save/load in .qet file

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2688 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2013-12-31 14:39:34 +00:00
parent b7186468d0
commit 5ad42fb491
8 changed files with 84 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "elementprovider.h"
#include "QUuid"
/**
* @brief ElementProvider::ElementProvider Constructor
@@ -52,3 +53,22 @@ QList <Element *> ElementProvider::FreeElement(const int filter) const{
}
return (free_elmt);
}
/**
* @brief ElementProvider::fromUuids
* @param uuid_list list of uuid must be found
* @return all elements with uuid corresponding to uuid in @uuid_list
*/
QList <Element *> ElementProvider::fromUuids(QList<QUuid> uuid_list) const {
QList <Element *> found_element;
foreach (Diagram *d, diag_list) {
foreach(Element *elmt, d->elements()) {
if (uuid_list.contains(elmt->uuid())) {
found_element << elmt;
uuid_list.removeAll(elmt->uuid());
}
}
}
return found_element;
}