]> AND Private Git Repository - blast.git/blobdiff - BlockLibraryWidget.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
add graph modif, progress on vhdl generation
[blast.git] / BlockLibraryWidget.cpp
index 544a1d1d33953da520fc33a606be94c5a657afca..0d2636d7db1189b88cdc4baa387267327fa88646 100644 (file)
@@ -50,17 +50,20 @@ void BlockLibraryWidget::addChild(BlockCategory *catParent,QTreeWidgetItem* item
 
   QList<BlockCategory *> childs = catParent->getAllChilds();
   foreach(BlockCategory* cat, childs){
-    newItemCat = new QTreeWidgetItem(itemParent);
-    newItemCat->setData(0,Qt::DisplayRole, cat->getName());
-    QList<ReferenceBlock*> list = cat->getBlocks();
-    for(int i=0; i<list.length(); i++){
-      newItemBlock = new QTreeWidgetItem(newItemCat);
-      newItemBlock->setData(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<ReferenceBlock*> list = cat->getBlocks();
+      for(int i=0; i<list.length(); i++){
+        newItemBlock = new QTreeWidgetItem(newItemCat);
+        newItemBlock->setData(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