xlinkobj.h
author insilmaril
Thu, 03 Sep 2009 08:52:00 +0000
changeset 790 133e2ed6b9c5
parent 621 c60984c46f9f
child 791 f1006de05c54
permissions -rw-r--r--
More work on xLinks
     1 #ifndef XLINKOBJ_H
     2 #define XLINKOBJ_H
     3 
     4 #include "mapobj.h"
     5 
     6 class BranchObj;
     7 class BranchItem;
     8 
     9 /*! \brief xlinks are used to draw arbitrary connections between branches (BranchObj) in the map. */
    10 
    11 /////////////////////////////////////////////////////////////////////////////
    12 class XLinkObj:public MapObj {
    13 public:
    14     XLinkObj (QGraphicsScene* scene, TreeItem* ti);
    15     ~XLinkObj ();
    16     virtual void init ();
    17 	virtual void setEnd (QPointF);
    18 	void updateXLink();
    19 	void positionBBox();
    20 	void calcBBoxSize();
    21 	void setVisibility (bool);
    22 	void setVisibility ();
    23 
    24 private:
    25 	static int arrowSize;
    26 	QPen pen;
    27 	QGraphicsLineItem *line;
    28 	QGraphicsPolygonItem *poly;
    29 	QPointF beginPos;
    30 	QPointF   endPos;
    31 
    32 	BranchItem *visBranch;	// the "visible" part of a partially scrolled li
    33 };
    34 
    35 #endif