X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/df84660fd98b39737692d57b68c8b2c2d34af0f1..4cf57e6db08da791233d75237f62e74bc88dd427:/BlockLibraryWidget.cpp?ds=inline diff --git a/BlockLibraryWidget.cpp b/BlockLibraryWidget.cpp index 544a1d1..0d2636d 100644 --- a/BlockLibraryWidget.cpp +++ b/BlockLibraryWidget.cpp @@ -50,17 +50,20 @@ void BlockLibraryWidget::addChild(BlockCategory *catParent,QTreeWidgetItem* item QList childs = catParent->getAllChilds(); foreach(BlockCategory* cat, childs){ - newItemCat = new QTreeWidgetItem(itemParent); - newItemCat->setData(0,Qt::DisplayRole, cat->getName()); - QList list = cat->getBlocks(); - for(int i=0; isetData(0,Qt::DisplayRole, list.at(i)->getName()); - newItemBlock->setData(1,Qt::DisplayRole, cat->getId()); - newItemBlock->setData(2,Qt::DisplayRole, i); - newItemBlock->setIcon(0,QIcon("icons/window_new.png")); + + if (cat->getId()<100) { + newItemCat = new QTreeWidgetItem(itemParent); + newItemCat->setData(0,Qt::DisplayRole, cat->getName()); + QList list = cat->getBlocks(); + for(int i=0; isetData(0,Qt::DisplayRole, list.at(i)->getName()); + newItemBlock->setData(1,Qt::DisplayRole, cat->getId()); + newItemBlock->setData(2,Qt::DisplayRole, i); + newItemBlock->setIcon(0,QIcon("icons/window_new.png")); + } + addChild(cat,newItemCat); } - addChild(cat,newItemCat); } /* TO DO : - getting the childs of catParent