X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..e40a5399ec7887c2606f18575c809b0d05b09278:/InterfaceItem.h?ds=inline diff --git a/InterfaceItem.h b/InterfaceItem.h index ce65b9e..26f9dd9 100644 --- a/InterfaceItem.h +++ b/InterfaceItem.h @@ -23,14 +23,14 @@ public: int _orientation, ConnectedInterface* _refInter, AbstractBoxItem* _owner, - Parameters* _params); + Parameters* _params, bool forceVisible = false); InterfaceItem(); QRectF boundingRect() const; void paint(QPainter *painter); // getters inline int getId() { return id; } - inline QString getName() { return name; } + QString getName(); inline double getPositionRatio() { return positionRatio; } inline double getPosition() { return position; } inline int getOrientation() { return orientation; } @@ -38,23 +38,21 @@ public: inline int getNameWidth() { return nameWidth; } inline int getNameHeight() { return nameHeight; } QString getStrOrientation(); - static int getIntOrientation(QString str); - QPointF getEndPointInGroup(); + static int getIntOrientation(QString str); + QPointF getEndPosition(); + QPointF getStartPosition(); // setters void setOriginPoint(); - inline void setId(int id){ this->id = id; } - inline void setName(QString name){ this->name = name; } + inline void setId(int id){ this->id = id; } inline void setPositionRatio(double ratio) { positionRatio = ratio; } inline void setOrientation(int _orientation){ orientation = _orientation; } // others void addConnectionItem(ConnectionItem* item); - void removeConnectionItem(ConnectionItem* item); - bool canConnectWith(InterfaceItem* iface); - bool connectWith(InterfaceItem* iface); - void unconnectTo(InterfaceItem *iface); + void removeConnectionItem(ConnectionItem* item); void updatePosition(); + void updateName(QString name); AbstractBoxItem* owner; ConnectedInterface* refInter; @@ -68,8 +66,7 @@ public: private: - int id; - QString name; + int id; double positionRatio; int position; // position in pixels on the "orientation side" of the owner int orientation; // north, south, east, west