+SourceItem *GroupScene::createSourceItem(AbstractBlock *block) {
+
+ SourceItem* item = new SourceItem(block,dispatcher,params);
+ // adding item to the scene
+ addItem(item);
+ item->setZValue(1);
+ // add item from the QList
+ sourceItems.append(item);
+ // center the new block
+ QPointF groupPos = groupItem->pos();
+ QPointF newPos(groupPos.x()-item->getTotalWidth()-50, groupPos.y());
+ newPos = newPos-item->getOriginPoint();
+ item->moveTo(newPos);
+ return item;
+}
+
+void GroupScene::addSourceItem(SourceItem* item) {
+ // add item from the QList
+ sourceItems.append(item);
+}
+
+void GroupScene::removeSourceItem(SourceItem* item) {
+ // remove item from the viewport
+ removeItem(item);
+ // remove item from the QList
+ sourceItems.removeAll(item);
+}
+