X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..9bfa0c13066918f440ac2b5461fb3f8847f43fd6:/BlockCategory.cpp?ds=inline diff --git a/BlockCategory.cpp b/BlockCategory.cpp index 0de4d86..1e70385 100644 --- a/BlockCategory.cpp +++ b/BlockCategory.cpp @@ -34,7 +34,7 @@ QList BlockCategory::getAllChilds() return childs; } -ReferenceBlock *BlockCategory::getBlock(int index) { +ReferenceBlock *BlockCategory::getBlockById(int index) { if ((index >=0) && (index < blocks.size()) ) { return blocks.at(index); } @@ -42,6 +42,14 @@ ReferenceBlock *BlockCategory::getBlock(int index) { return NULL; } +ReferenceBlock *BlockCategory::getBlockByName(QString name) { + foreach(ReferenceBlock* block, blocks) { + if (block->getName() == name) return block; + } + cout << "block null!" << endl; + return NULL; +} + QDomElement BlockCategory::save(QDomDocument &doc) { }