mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user