]> AND Private Git Repository - blast.git/blobdiff - ConnectionItem.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
start modifying read/write blocks and project to take into account control ifaces
[blast.git] / ConnectionItem.h
index 867e8110d145e38c72484bac002ed7e61620f701..c64839f0c69cf0628a7ee01731aab0d9139c50bf 100644 (file)
@@ -10,6 +10,7 @@
 class Dispatcher;
 class Parameters;
 class InterfaceItem;
+class GroupScene;
 
 using namespace std;
 using namespace Qt;
@@ -50,16 +51,24 @@ public:
   QPainterPath shape() const;
 
   void prepareChange();
-
+  
+  // getters
+  inline GroupScene* getScene() { return (GroupScene*)(scene()); }
   inline InterfaceItem* getToInterfaceItem(){ return toInterfaceItem; }
-  inline void setToInterfaceItem(InterfaceItem *iface){ toInterfaceItem = iface; }
   inline InterfaceItem* getFromInterfaceItem(){ return fromInterfaceItem; }
-  inline void setFromInterfaceItem(InterfaceItem* iface){ fromInterfaceItem = iface; }
   inline int getId(){ return id; }
+  
+  // setters
+  inline void setToInterfaceItem(InterfaceItem *iface){ toInterfaceItem = iface; }  
+  inline void setFromInterfaceItem(InterfaceItem* iface){ fromInterfaceItem = iface; }  
   inline void setId(int id){ this->id = id; }
-  inline bool isSelected() { return selected; }
   void setSelected(bool selected);
-
+  inline void setVisible(bool state) { visible = state; }
+  
+  // testers
+  inline bool isSelected() { return selected; }
+  
+  // others
   void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
 
   /*!
@@ -85,7 +94,14 @@ protected:
   void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
 
 private:
-
+  void computeEsse(int orientationFrom);
+  void computeStaircase(int orientationFrom);
+  void computeHookSmallEnd(int orientationFrom, int orientationTo);
+  void computeHookSmallStart(int orientationFrom, int orientationTo);
+  void computeOpenRect(int orientationFrom, int orientationTo);
+  void computeElle(int orientationFrom);
+  void computeCorner(int orientationFrom);
+  
   QPointF pointFrom;
   QPointF pointTo;
   QList<QPointF> interPoints;
@@ -104,13 +120,8 @@ private:
   bool selected;
   int id;
   int marginConn;
-  void computeEsse(int orientationFrom);
-  void computeStaircase(int orientationFrom);
-  void computeHookSmallEnd(int orientationFrom, int orientationTo);
-  void computeHookSmallStart(int orientationFrom, int orientationTo);
-  void computeOpenRect(int orientationFrom, int orientationTo);
-  void computeElle(int orientationFrom);
-  void computeCorner(int orientationFrom);
+  
+  bool visible;
 
   friend QDataStream &operator << (QDataStream &out, ConnectionItem &c);
   friend QDataStream &operator >> (QDataStream &in, ConnectionItem &c);