Added french manual by Claude
authorinsilmaril
Mon Jan 14 16:27:00 2008 +0000 (2008-01-14)
changeset 647bef71af3f6ab
parent 646 371945eb6d31
child 648 e4435f252e44
Added french manual by Claude
demos/vym-projectplan.vym
tex/vym.changelog
xml-freemind.cpp
xml-vym.cpp
     1.1 Binary file demos/vym-projectplan.vym has changed
     2.1 --- a/tex/vym.changelog	Mon Jan 14 16:26:59 2008 +0000
     2.2 +++ b/tex/vym.changelog	Mon Jan 14 16:27:00 2008 +0000
     2.3 @@ -1,3 +1,9 @@
     2.4 +-------------------------------------------------------------------
     2.5 +Tue Jan  8 22:20:29 CET 2008 - uwedr@suse.de
     2.6 +
     2.7 +- Version: 1.11.5
     2.8 +- Feature: Started to implement multiple MapCenters in one map 
     2.9 +
    2.10  -------------------------------------------------------------------
    2.11  Mon Jan  7 14:59:56 CET 2008 - uwedr@suse.de
    2.12  
     3.1 --- a/xml-freemind.cpp	Mon Jan 14 16:26:59 2008 +0000
     3.2 +++ b/xml-freemind.cpp	Mon Jan 14 16:27:00 2008 +0000
     3.3 @@ -68,15 +68,15 @@
     3.4  				   "saved using freemind " +atts.value("version")+". "
     3.5  				   "The version of this vym can parse freemind " + v +"."); 
     3.6  		}
     3.7 -		mc->addBranch();
     3.8 -		lastBranch=mc->getLastBranch();
     3.9 +		model->first()->addBranch();
    3.10 +		lastBranch=model->first()->getLastBranch();
    3.11  		lastBranch->move2RelPos (200,0);
    3.12  		lastBranch->setHeading ("  ");
    3.13 -		mc->addBranch();
    3.14 -		lastBranch=mc->getLastBranch();
    3.15 +		model->first()->addBranch();
    3.16 +		lastBranch=model->first()->getLastBranch();
    3.17  		lastBranch->move2RelPos (-200,0);
    3.18  		lastBranch->setHeading ("  ");
    3.19 -		lastBranch=mc;
    3.20 +		lastBranch=model->first();
    3.21  
    3.22  	} else if ( eName == "node" &&  (state == StateMap || state == StateNode )) 
    3.23  	{
    3.24 @@ -84,8 +84,8 @@
    3.25  		{
    3.26  			if (atts.value ("POSITION")=="left")
    3.27  			{
    3.28 -				me->select ("bo:1");
    3.29 -				lastBranch=me->getSelectedBranch();
    3.30 +				model->select ("bo:1");
    3.31 +				lastBranch=model->getSelectedBranch();
    3.32  				if (lastBranch)
    3.33  				{
    3.34  					lastBranch->addBranch();
    3.35 @@ -94,8 +94,8 @@
    3.36  				}	
    3.37  			} else if (atts.value ("POSITION")=="right")
    3.38  			{
    3.39 -				me->select ("bo:0");
    3.40 -				lastBranch=me->getSelectedBranch();
    3.41 +				model->select ("bo:0");
    3.42 +				lastBranch=model->getSelectedBranch();
    3.43  				if (lastBranch)
    3.44  				{
    3.45  					lastBranch->addBranch();
     4.1 --- a/xml-vym.cpp	Mon Jan 14 16:26:59 2008 +0000
     4.2 +++ b/xml-vym.cpp	Mon Jan 14 16:27:00 2008 +0000
     4.3 @@ -68,6 +68,8 @@
     4.4      if ( state == StateInit && (eName == "vymmap")  ) 
     4.5  	{
     4.6          state = StateMap;
     4.7 +
     4.8 +		// Check version
     4.9  		if (!atts.value( "version").isEmpty() ) 
    4.10  		{
    4.11  			if (!checkVersion(atts.value("version")))
    4.12 @@ -79,55 +81,51 @@
    4.13  				   ". If you run into problems after pressing "
    4.14  				   "the ok-button below, updating vym should help.");
    4.15  			else	   
    4.16 -				mc->setVersion(atts.value( "version" ));
    4.17 +				model->setVersion(atts.value( "version" ));
    4.18  
    4.19  		}
    4.20 -		if (loadMode==NewMap || 
    4.21 -			(loadMode==ImportReplace && me->getSelection()==mc))
    4.22 +
    4.23 +		if (loadMode==NewMap )
    4.24  		{
    4.25 +			// Create mapCenter
    4.26 +			model->clear();
    4.27 +			lastBranch=model->first();	// avoid empty pointer
    4.28 +
    4.29  			if (!atts.value( "author").isEmpty() )
    4.30 -			{
    4.31 -				mc->setAuthor(atts.value( "author" ) );
    4.32 -			}
    4.33 +				model->setAuthor(atts.value( "author" ) );
    4.34  			if (!atts.value( "comment").isEmpty() )
    4.35 -			{
    4.36 -				mc->setComment (atts.value( "comment" ) );
    4.37 -			}
    4.38 +				model->setComment (atts.value( "comment" ) );
    4.39  			if (!atts.value( "backgroundColor").isEmpty() )
    4.40  			{
    4.41  				col.setNamedColor(atts.value("backgroundColor"));
    4.42 -				mc->getScene()->setBackgroundBrush(col);
    4.43 +				model->getScene()->setBackgroundBrush(col);
    4.44  			}	    
    4.45  			if (!atts.value( "selectionColor").isEmpty() )
    4.46  			{
    4.47  				col.setNamedColor(atts.value("selectionColor"));
    4.48 -				me->setSelectionColor(col);
    4.49 +				model->getMapEditor()->setSelectionColor(col);
    4.50  			}	    
    4.51  			if (!atts.value( "linkColorHint").isEmpty() ) 
    4.52  			{
    4.53  				if (atts.value("linkColorHint")=="HeadingColor")
    4.54 -					me->setMapLinkColorHint(LinkableMapObj::HeadingColor);
    4.55 +					model->getMapEditor()->setMapLinkColorHint(LinkableMapObj::HeadingColor);
    4.56  				else
    4.57 -					me->setMapLinkColorHint(LinkableMapObj::DefaultColor);
    4.58 +					model->getMapEditor()->setMapLinkColorHint(LinkableMapObj::DefaultColor);
    4.59  			}
    4.60  			if (!atts.value( "linkStyle").isEmpty() ) 
    4.61 -			{
    4.62 -				me->setMapLinkStyle(atts.value("linkStyle"));
    4.63 -			}	
    4.64 +				model->getMapEditor()->setMapLinkStyle(atts.value("linkStyle"));
    4.65  			if (!atts.value( "linkColor").isEmpty() ) 
    4.66  			{
    4.67  				col.setNamedColor(atts.value("linkColor"));
    4.68 -				me->setMapDefLinkColor(col);
    4.69 +				model->getMapEditor()->setMapDefLinkColor(col);
    4.70  			}	
    4.71  			if (!atts.value( "defXLinkColor").isEmpty() ) 
    4.72  			{
    4.73  				col.setNamedColor(atts.value("defXLinkColor"));
    4.74 -				me->setMapDefXLinkColor(col);
    4.75 +				model->getMapEditor()->setMapDefXLinkColor(col);
    4.76  			}	
    4.77  			if (!atts.value( "defXLinkWidth").isEmpty() ) 
    4.78 -			{
    4.79 -				me->setMapDefXLinkWidth(atts.value("defXLinkWidth").toInt ());
    4.80 -			}	
    4.81 +				model->getMapEditor()->setMapDefXLinkWidth(atts.value("defXLinkWidth").toInt ());
    4.82  		}	
    4.83  	} else if ( eName == "select" && state == StateMap ) 
    4.84  	{
    4.85 @@ -143,12 +141,15 @@
    4.86  		if (loadMode==NewMap)
    4.87  		{	
    4.88  			// Really use the found mapcenter as MCO in a new map
    4.89 -			lastBranch=mc;	// avoid empty pointer
    4.90 +
    4.91 +			// FIXME not working for multiple mapCenters yet:
    4.92 +			lastBranch=model->addMapCenter();
    4.93 +			//lastBranch=model->first();	// avoid empty pointer
    4.94  		} else
    4.95  		{
    4.96  			// Treat the found mapcenter as a branch 
    4.97  			// in an existing map
    4.98 -			LinkableMapObj* lmo=me->getSelection();
    4.99 +			LinkableMapObj* lmo=model->getSelection();
   4.100  			if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
   4.101  			        || (typeid(*lmo) == typeid(MapCenterObj) ) )
   4.102  			{
   4.103 @@ -197,14 +198,14 @@
   4.104  	{
   4.105  		// This is used in vymparts, which have no mapcenter!
   4.106  		isVymPart=true;
   4.107 -		LinkableMapObj* lmo=me->getSelection();
   4.108 +		LinkableMapObj* lmo=model->getSelection();
   4.109  		if (!lmo)
   4.110  		{
   4.111  			// If a vym part is _loaded_ (not imported), 
   4.112  			// selection==lmo==NULL
   4.113  			// Treat it like ImportAdd then...
   4.114  			loadMode=ImportAdd;
   4.115 -			lmo=mc;
   4.116 +			lmo=model->first();		// FIXME this used to be lmo=mc before
   4.117  		}	
   4.118  		if (lmo && (typeid(*lmo) == typeid(BranchObj) ) 
   4.119  				|| (typeid(*lmo) == typeid(MapCenterObj) ) )
   4.120 @@ -320,7 +321,7 @@
   4.121          case StateInit: break;
   4.122          case StateMap: break; 
   4.123  		case StateMapSelect:
   4.124 -			me->select(ch_simplified);
   4.125 +			model->select(ch_simplified);
   4.126  			break;
   4.127  		case StateMapSetting:break;
   4.128          case StateMapCenter: break;
   4.129 @@ -539,7 +540,7 @@
   4.130  				{
   4.131  					lastFloat->setRelPos (QPointF (x,y) );
   4.132  					// make sure floats in mapcenter are repositioned to relative pos
   4.133 -					if (mc==lastBranch) mc->positionContents();
   4.134 +					if (lastBranch->getDepth()==0) lastBranch->positionContents();
   4.135  				}
   4.136  			else
   4.137  				// Couldn't read relPos
   4.138 @@ -561,7 +562,7 @@
   4.139  	QColor col;
   4.140  	bool okx;
   4.141  	bool success=false;
   4.142 -	XLinkObj *xlo=new XLinkObj (mc->getScene());
   4.143 +	XLinkObj *xlo=new XLinkObj (model->getScene());
   4.144  	if (!a.value( "color").isEmpty() ) 
   4.145  	{
   4.146  		col.setNamedColor(a.value("color"));
   4.147 @@ -578,11 +579,11 @@
   4.148  	{ 
   4.149  		if (!a.value( "endBranch").isEmpty() ) 
   4.150  		{
   4.151 -			LinkableMapObj *lmo=mc->findObjBySelect (a.value( "beginBranch"));
   4.152 +			LinkableMapObj *lmo=model->findObjBySelect (a.value( "beginBranch"));
   4.153  			if (lmo && typeid (*lmo)==typeid (BranchObj))
   4.154  			{
   4.155  				xlo->setBegin ((BranchObj*)lmo);
   4.156 -				lmo=mc->findObjBySelect (a.value( "endBranch"));
   4.157 +				lmo=model->findObjBySelect (a.value( "endBranch"));
   4.158  				if (lmo && typeid (*lmo)==typeid (BranchObj))
   4.159  				{
   4.160  					xlo->setEnd ((BranchObj*)(lmo));
   4.161 @@ -598,11 +599,11 @@
   4.162  	{ 
   4.163  		if (!a.value( "endID").isEmpty() ) 
   4.164  		{
   4.165 -			LinkableMapObj *lmo=mc->findID (a.value( "beginID"));
   4.166 +			LinkableMapObj *lmo=model->findID (a.value( "beginID"));
   4.167  			if (lmo && typeid (*lmo)==typeid (BranchObj))
   4.168  			{
   4.169  				xlo->setBegin ((BranchObj*)lmo);
   4.170 -				lmo=mc->findID (a.value( "endID"));
   4.171 +				lmo=model->findID (a.value( "endID"));
   4.172  				if (lmo && typeid (*lmo)==typeid (BranchObj))
   4.173  				{
   4.174  					xlo->setEnd ((BranchObj*)(lmo));
   4.175 @@ -628,7 +629,7 @@
   4.176  	if (!a.value( "key").isEmpty() ) 
   4.177  	{
   4.178  		if (!a.value( "value").isEmpty() ) 
   4.179 -			settings.setLocalEntry (me->getDestPath(), a.value ("key"), a.value ("value"));
   4.180 +			settings.setLocalEntry (model->getMapEditor()->getDestPath(), a.value ("key"), a.value ("value"));
   4.181  		else
   4.182  			return false;
   4.183