- 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);