branchobj.cpp
changeset 421 5522d1da7e37
parent 417 1cc7bbf75f0b
child 425 7014be3ac7d0
     1.1 --- a/branchobj.cpp	Wed Jan 10 13:26:12 2007 +0000
     1.2 +++ b/branchobj.cpp	Tue Jan 23 11:50:53 2007 +0000
     1.3 @@ -16,6 +16,11 @@
     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 @@ -744,12 +749,6 @@
    1.16  	else
    1.17  		scrolledAttr="";
    1.18  
    1.19 -	QString frameAttr;
    1.20 -	if (frame->getFrameType()!=NoFrame)
    1.21 -		frameAttr=attribut ("frameType",frame->getFrameTypeName());
    1.22 -	else
    1.23 -		frameAttr="";
    1.24 -
    1.25  	// save area, if not scrolled
    1.26  	QString areaAttr;
    1.27  	if (!((BranchObj*)(parObj))->isScrolled() )
    1.28 @@ -773,21 +772,19 @@
    1.29      s=beginElement ("branch" 
    1.30  		+getOrnAttr() 
    1.31  		+scrolledAttr 
    1.32 -		+frameAttr 
    1.33  		+areaAttr 
    1.34  		+idAttr 
    1.35  		+getIncludeImageAttr() );
    1.36      incIndent();
    1.37  
    1.38 -	/* Testing
    1.39 -	for (int i=1; i<depth;i++) cout << "  ";
    1.40 -	cout <<getHeading().ascii()<<endl;
    1.41 -	*/
    1.42 -
    1.43  	// save heading
    1.44      s+=valueElement("heading", getHeading(),
    1.45  		attribut ("textColor",QColor(heading->getColor()).name()));
    1.46  
    1.47 +	// Save frame
    1.48 +	if (frame->getFrameType()!=NoFrame) 
    1.49 +		s+=frame->saveToDir ();
    1.50 +
    1.51  	// save names of flags set
    1.52  	s+=standardFlags->saveToDir(tmpdir,prefix,0);
    1.53  	
    1.54 @@ -1082,7 +1079,7 @@
    1.55  	int pos=borem->getNum();
    1.56  	while (bo)
    1.57  	{
    1.58 -		bo->moveBranchTo (this,pos+1);
    1.59 +		bo->linkTo (this,pos+1);
    1.60  		bo=borem->getLastBranch();
    1.61  	}	
    1.62  	removeBranch (borem);
    1.63 @@ -1210,7 +1207,7 @@
    1.64  		return NULL;
    1.65  }
    1.66  
    1.67 -BranchObj* BranchObj::moveBranchTo (BranchObj* dst, int pos)
    1.68 +BranchObj* BranchObj::linkTo (BranchObj* dst, int pos)
    1.69  {
    1.70  	// Find current parent and 
    1.71  	// remove pointer to myself there