diff -r 7a96bd401351 -r 58e7594239df branchobj.h --- a/branchobj.h Sun Jan 30 12:58:47 2005 +0000 +++ b/branchobj.h Tue Aug 01 09:31:22 2006 +0000 @@ -4,18 +4,24 @@ #include "floatimageobj.h" #include "linkablemapobj.h" #include "ornamentedobj.h" +#include "xlinkobj.h" +//Added by qt3to4: +#include -class BranchObjPtrList : public QPtrList +class BranchObjPtrList : public Q3PtrList { - virtual int compareItems (QPtrCollection::Item i, QPtrCollection::Item j); + virtual int compareItems (Q3PtrCollection::Item i, Q3PtrCollection::Item j); }; +enum BranchModification {NewBranch, MovedBranch}; +enum HideTmpMode {HideNone, HideExport}; + ///////////////////////////////////////////////////////////////////////////// class BranchObj:public OrnamentedObj { public: BranchObj (); - BranchObj (QCanvas*); - BranchObj (QCanvas*, LinkableMapObj* parent); + BranchObj (Q3Canvas*); + BranchObj (Q3Canvas*, LinkableMapObj* parent); ~BranchObj (); bool operator< ( const BranchObj & ); bool operator== ( const BranchObj & ); @@ -27,6 +33,7 @@ virtual int getFloatImageNum(FloatImageObj*); virtual int countBranches(); virtual int countFloatImages(); + virtual int countXLinks(); virtual void setParObjTmp (LinkableMapObj*,QPoint,int);// Only for moving Obj around virtual void unsetParObjTmp(); // reuse original ParObj @@ -40,27 +47,40 @@ virtual void setVisibility(bool,int); // set visibility virtual void setVisibility(bool); // set vis. for w virtual void setLinkColor(); // set the color of link - virtual void setColor(QColor,bool); // set the color of heading - + virtual void setColorChilds(QColor); // set the color of heading BranchObj* first (); // set Iterator to first LMO BranchObj* next (); // find next LMO after given one BranchObj* getLastIterator(); // to interrupt and resume next iteration void setLastIterator (BranchObj*); // needed by next() + virtual void positionContents(); virtual void move (double x,double y); virtual void move (QPoint); virtual void moveBy (double x,double y); virtual void moveBy (QPoint); virtual void positionBBox(); virtual void calcBBoxSize(); + virtual void setDockPos(); virtual LinkableMapObj* findMapObj(QPoint,LinkableMapObj*); // find MapObj virtual void setHeading (QString); - virtual void setURL (QString); - virtual QString getURL (); - virtual void setVymLink (QString); - virtual QString getVymLink (); + + virtual void setHideTmp (HideTmpMode); + virtual bool hasHiddenExportParent (BranchObj*); + virtual QString saveToDir (const QString&,const QString&, const QPoint&);// Save data recursivly to tempdir + virtual void addXLink (XLinkObj*); + virtual void removeXLinkRef (XLinkObj*);// Remove ref in list + virtual void deleteXLink (XLinkObj*); // remove references and delete XLinkObj + virtual void deleteXLinkAt (int); // remove references and delete XLinkObj + virtual XLinkObj* XLinkAt (int); // return reference of XLinkObj + virtual int countXLink (); + virtual BranchObj* XLinkTargetAt (int); + void setIncludeImagesVer(bool); + bool getIncludeImagesVer(); + void setIncludeImagesHor(bool); + bool getIncludeImagesHor(); + QString getIncludeImageAttr(); virtual LinkableMapObj* addFloatImage(); virtual LinkableMapObj* addFloatImage(FloatImageObj*); virtual void removeFloatImage(FloatImageObj*); @@ -68,21 +88,29 @@ virtual FloatImageObj* getLastFloatImage(); virtual FloatImageObj* getFloatImageNum(const uint &); protected: - virtual void savePosInAngle(); // write pos in angle for resorting + virtual void savePosInAngle(); // write pos in angle for resorting + virtual void setDefAttr (BranchModification); // set default attributes (font, size, ...) public: virtual BranchObj* addBranch(); virtual BranchObj* addBranch(BranchObj*); // makes deep copy of BranchObj + virtual BranchObj* addBranchPtr(BranchObj*); // just adds pointer virtual BranchObj* insertBranch(int); virtual BranchObj* insertBranch(BranchObj*,int); + virtual BranchObj* insertBranchPtr (BranchObj*,int); + virtual void removeBranchHere(BranchObj*); + virtual void removeChilds(); virtual void removeBranch(BranchObj*); + virtual void removeBranchPtr (BranchObj*); virtual void setLastSelectedBranch(BranchObj*); virtual BranchObj* getLastSelectedBranch(); virtual BranchObj* getFirstBranch(); virtual BranchObj* getLastBranch(); virtual BranchObj* getBranchNum(const uint &); + virtual bool canMoveBranchUp(); virtual BranchObj* moveBranchUp(BranchObj*); + virtual bool canMoveBranchDown(); virtual BranchObj* moveBranchDown(BranchObj*); - + virtual BranchObj* moveBranchTo (BranchObj*, int); virtual void alignRelativeTo(const QPoint ); virtual void reposition(); @@ -97,15 +125,17 @@ protected: static BranchObj* itLast; // iterator for first(), next() BranchObjPtrList branch; // all child branches - QPtrList floatimage; // child images + Q3PtrList floatimage; // child images + Q3PtrList xlink; // xlinks to other branches public: float angle; // used in mainbranch to reorder mainbranches protected: int lastSelectedBranch; // for going deeper into tree bool scrolled; // true if all childs are scrolled and thus invisible bool tmpUnscrolled; // can only be true (temporary) for a scrolled subtree - QString url; // url to external doc - QString vymLink; // path to another map + bool includeImagesVer; // include floatimages in bbox vertically + bool includeImagesHor; // include floatimages in bbox horizontally + };