branchobj.cpp
changeset 463 694f5e35e87c
parent 440 c6a8651e6bbc
child 529 ce2abdbd0b65
     1.1 --- a/branchobj.cpp	Sat Mar 31 09:28:27 2007 +0000
     1.2 +++ b/branchobj.cpp	Wed Apr 25 16:02:54 2007 +0000
     1.3 @@ -16,11 +16,6 @@
     1.4  BranchObj* BranchObj::itFirst=NULL;
     1.5  
     1.6  
     1.7 -HeadingObj* BranchObj::getHO()  //FIXME testing only
     1.8 -{
     1.9 -	return heading;
    1.10 -}
    1.11 -
    1.12  BranchObj::BranchObj () :OrnamentedObj()
    1.13  {
    1.14  //    cout << "Const BranchObj ()\n";
    1.15 @@ -232,7 +227,7 @@
    1.16  				// Don't try to find that branch, guess 12 pixels
    1.17  				y=o->getChildPos().y()  -height() + 12; 
    1.18  		}	
    1.19 -		if (o->getOrientation()==OrientLeftOfCenter)
    1.20 +		if (o->getOrientation()==LinkableMapObj::LeftOfCenter)
    1.21  			move ( o->getChildPos().x() - linkwidth, y );
    1.22  		else	
    1.23  			move (o->getChildPos().x() + linkwidth, y );
    1.24 @@ -627,7 +622,7 @@
    1.25  				}		
    1.26  				if (includeImagesHor)
    1.27  				{
    1.28 -					if (orientation==OrientRightOfCenter)
    1.29 +					if (orientation==LinkableMapObj::RightOfCenter)
    1.30  					{
    1.31  						if (-rp.x()-w > 0) 
    1.32  							leftPad=max (leftPad,-rp.x()-w);
    1.33 @@ -648,8 +643,8 @@
    1.34  	}
    1.35  
    1.36  	// Frame thickness
    1.37 -    w+=frame->getBorder();
    1.38 -    h+=frame->getBorder();
    1.39 +    w+=frame->getPadding();
    1.40 +    h+=frame->getPadding();
    1.41  	
    1.42  	// Finally set size
    1.43      bbox.setSize (QSizeF (w,h));
    1.44 @@ -658,7 +653,7 @@
    1.45  void BranchObj::setDockPos()
    1.46  {
    1.47  	// Sets childpos and parpos depending on orientation
    1.48 -	if (getOrientation()==OrientLeftOfCenter )
    1.49 +	if (getOrientation()==LinkableMapObj::LeftOfCenter )
    1.50      {
    1.51  		childPos=QPointF (
    1.52  			ornamentsBBox.bottomLeft().x(), 
    1.53 @@ -791,7 +786,7 @@
    1.54  		attribut ("textColor",QColor(heading->getColor()).name()));
    1.55  
    1.56  	// Save frame
    1.57 -	if (frame->getFrameType()!=NoFrame) 
    1.58 +	if (frame->getFrameType()!=FrameObj::NoFrame) 
    1.59  		s+=frame->saveToDir ();
    1.60  
    1.61  	// save names of flags set
    1.62 @@ -1288,14 +1283,14 @@
    1.63      {
    1.64  		// Align myself depending on orientation and parent, but
    1.65  		// only if I am not a mainbranch or mapcenter itself
    1.66 -		LinkOrient o;
    1.67 +		LinkableMapObj::Orientation o;
    1.68  		o=parObj->getOrientation();
    1.69  		switch (orientation) 
    1.70  		{
    1.71 -			case OrientLeftOfCenter:
    1.72 +			case LinkableMapObj::LeftOfCenter:
    1.73  				move (ref.x() - bbox.width(), ref.y() + (th-bbox.height())/2 );
    1.74  			break;
    1.75 -			case OrientRightOfCenter:	
    1.76 +			case LinkableMapObj::RightOfCenter:	
    1.77  				move (ref.x() , ref.y() + (th-bbox.height())/2  );
    1.78  			break;
    1.79  			default:
    1.80 @@ -1308,7 +1303,7 @@
    1.81  
    1.82      // Set reference point for alignment of childs
    1.83      QPointF ref2;
    1.84 -    if (orientation==OrientLeftOfCenter)
    1.85 +    if (orientation==LinkableMapObj::LeftOfCenter)
    1.86  		ref2.setX(bbox.topLeft().x() - linkwidth);
    1.87      else	
    1.88  		ref2.setX(bbox.topRight().x() + linkwidth);
    1.89 @@ -1526,3 +1521,10 @@
    1.90  	return s;
    1.91  }
    1.92  
    1.93 +
    1.94 +void BranchObj::animate()
    1.95 +{
    1.96 +	//relPos.animate();
    1.97 +	cout << "BO::animate  x,y="<<relPos.x()<<","<<relPos.y()<<endl;
    1.98 +}
    1.99 +