X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=xlinkitem.cpp;fp=xlinkitem.cpp;h=0000000000000000000000000000000000000000;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=1836342ff207ba2e0cfe6142613384e39339dbc7;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git

diff --git a/xlinkitem.cpp b/xlinkitem.cpp
deleted file mode 100644
index 1836342..0000000
--- a/xlinkitem.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-#include <QGraphicsScene>
-#include "xlinkitem.h"
-
-#include "branchitem.h"
-#include "linkablemapobj.h"
-#include "vymmodel.h"
-#include "xlinkobj.h"
-
-/////////////////////////////////////////////////////////////////
-// XLinkItem
-/////////////////////////////////////////////////////////////////
-
-XLinkItem::XLinkItem (const QList<QVariant> &data, TreeItem *parent):MapItem (data,parent)
-
-{
-    //qDebug() << "Const XLinkItem () "<<this;
-    init();
-}
-
-XLinkItem::~XLinkItem ()
-{
- //   qDebug() << "Destr XLinkItem begin "<<this<<"  pI="<<parentItem<<"  link="<<link;
-    if (link)
-    {
-	XLinkItem *xli=link->getOtherEnd (this);
-	if (xli) model->deleteLater (xli->getID());
-	model->deleteLink (link);
-    }	
-//    qDebug() << "Destr XLinkItem end";
-}
-
-
-void XLinkItem::init () 
-{
-    setType (XLink);
-    link=NULL;
-}
-
-void XLinkItem::clear() 
-{
-}
-
-void XLinkItem::setLink (Link *l)
-{
-    link=l;
-}
-
-Link* XLinkItem::getLink ()
-{
-    return link;
-}
-
-void XLinkItem::updateXLink()
-{
-    if (link)
-	link->updateLink();
-}
-
-MapObj* XLinkItem::getMO()
-{
-    if (link)
-	return link->getMO();
-    return NULL;	
-}
-
-void XLinkItem::setSelection()
-{
-    if (link)
-    {
-	XLinkObj* xlo=(XLinkObj*)getMO();
-	if (xlo) 
-	{
-	    if (parentItem==link->getBeginBranch() )
-		xlo->setSelection(XLinkObj::C0);
-	    else if (parentItem==link->getEndBranch() )
-		xlo->setSelection(XLinkObj::C1);
-	}
-    }
-}
-
-BranchItem* XLinkItem::getPartnerBranch()
-{
-    if (link && link->getBeginBranch() && link->getEndBranch())
-    {
-	if (parentItem==link->getBeginBranch())
-	    return link->getEndBranch();
-	else	
-	    return link->getBeginBranch();
-    }
-    return NULL;
-}
-