]> git.sven.stormbind.net Git - sven/vym.git/blobdiff - xlinkitem.cpp
New upstream version 2.9.22
[sven/vym.git] / xlinkitem.cpp
diff --git a/xlinkitem.cpp b/xlinkitem.cpp
deleted file mode 100644 (file)
index 1836342..0000000
+++ /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;
-}
-