X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..dd016ff4a3d4c5d4f90277637f86cdc31a7a91f8:/AbstractBoxItem.h?ds=sidebyside diff --git a/AbstractBoxItem.h b/AbstractBoxItem.h index 6eeb46c..375e9dc 100644 --- a/AbstractBoxItem.h +++ b/AbstractBoxItem.h @@ -58,7 +58,28 @@ public: void addInterface(InterfaceItem* i, bool resetPosition = false); void removeInterface(InterfaceItem* i); void resetInterfacesPosition(); - void deplaceInterface(QPointF pos); + /*! + * \brief moveInterfaceTo + * \param pos the new position (in scene) of the interface + * + * This method is called when user moves an InterfaceItem. + * see BoxItem::mouseMoveEvent() and GroupItem::mouseMoveEvent() + */ + void moveInterfaceTo(QPointF pos); + /*! + * \brief updateInterfacesAndConnections + * + * This method allows to recompute the absolute position of the interfaces of this box + * taking into account their relative position (see positionRatio atribute) in the width/height + * of the box border they are located on. It allows update the shape of all ConnectionItem + * connected to this box. + * + * CAUTION: this method supposes that before its call, a call to prepareGeometryChange() hase been + * done for the BoxItem that owns this InterfaceItem, so that the scene will readraw automatically + * the BoxItem. For the connections, the call to prepareGeometryChange() is done within setPath() + * that is called in this method. Thus, there is no need to call update() after the termination of + * this method. + */ void updateInterfacesAndConnections(); InterfaceItem *searchInterfaceByName(QString name);