X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/cfe8322b50c9ef08ffbc3e52b0849bca4cd1d0bf..2019e5afdaf7fd0ad21607848710348bbc3be256:/BoxItem.cpp diff --git a/BoxItem.cpp b/BoxItem.cpp index 92f89b8..c473e6f 100644 --- a/BoxItem.cpp +++ b/BoxItem.cpp @@ -504,6 +504,7 @@ void BoxItem::contextMenuEvent(QGraphicsSceneContextMenuEvent * event) { QAction* showRstClkIface = NULL; QAction* showWishboneIface = NULL; QAction* showParameters = NULL; + QAction* showPatterns = NULL; InterfaceItem* ifaceItem = getInterfaceItemFromCursor(event->pos().x(), event->pos().y()); // menu for interface @@ -550,6 +551,9 @@ void BoxItem::contextMenuEvent(QGraphicsSceneContextMenuEvent * event) { } } } + if ((iface->getAssociatedIface() != NULL) && (iface->getDirection() == AbstractInterface::Output)) { + showPatterns = menu.addAction("Show patterns"); + } } // menu for blocks (group or func) else { @@ -624,9 +628,12 @@ void BoxItem::contextMenuEvent(QGraphicsSceneContextMenuEvent * event) { else if(selectedAction == showWishboneIface) { dispatcher->showWishboneIface(this); } - else if(selectedAction == showParameters){ + else if(selectedAction == showParameters) { new ParametersWindow(refBlock, params, NULL); - } + } + else if(selectedAction == showPatterns) { + dispatcher->showPatterns(ifaceItem); + } } void BoxItem::loadFunctional(QDomElement funcElement) throw(Exception) { @@ -822,7 +829,7 @@ void BoxItem::save(QXmlStreamWriter &writer) { writer.writeAttribute("id",QString::number(id)); writer.writeAttribute("inside_group",QString::number(childGroupItem->getId())); - QString attrPos = QString::number(pos().x()).append(",").append(QString::number(pos().y())); + QString attrPos = QString::number((int)(pos().x())).append(",").append(QString::number((int)(pos().y()))); writer.writeAttribute("position",attrPos); QString attrDim = QString::number(getWidth()).append(",").append(QString::number(getHeight())); writer.writeAttribute("dimension",attrDim);