diff -r 914f330b6aa8 -r 25a77484ec72 branchitem.cpp --- a/branchitem.cpp Thu Apr 02 09:57:47 2009 +0000 +++ b/branchitem.cpp Tue Apr 07 16:15:53 2009 +0000 @@ -1,7 +1,10 @@ #include "branchitem.h" #include "branchobj.h" +#include "vymmodel.h" #include +#include + using namespace std; BranchItem::BranchItem(const QList &data, TreeItem *parent):TreeItem (data,parent) @@ -122,6 +125,47 @@ return s; } +void BranchItem::updateVisibility() // FIXME-1 +{ +} + +void BranchItem::setVymLink(QString s) +{ + if (!s.isEmpty()) + { + // We need the relative (from loading) + // or absolute path (from User event) + // and build the absolute path. + // Note: If we have relative, use path of + // current map to build absolute path + QDir d(s); + if (!d.path().startsWith ("/")) + { + QString p=model->getDestPath(); + int i=p.findRev("/",-1); + d.setPath(p.left(i)+"/"+s); + d.convertToAbs(); + } + vymLink=d.path(); + //FIXME-2 systemFlags->activate("vymLink"); + } + else + { + //FIXME-2 systemFlags->deactivate("vymLink"); + vymLink=""; + } + /* FIXME-2 + calcBBoxSize(); // recalculate bbox + positionBBox(); // rearrange contents + forceReposition(); + */ +} + +QString BranchItem::getVymLink() +{ + return vymLink; +} + void BranchItem::unScroll() { if (tmpUnscrolled) resetTmpUnscroll(); @@ -147,7 +191,7 @@ branch.at(i)->setVisibility(false); */ } - /* + /* calcBBoxSize(); positionBBox(); move (absPos.x(), absPos.y() );