mapeditor.cpp
changeset 741 1b4d1ea6ea8c
parent 740 6dc0a20031f7
child 742 54d44ecd6097
     1.1 --- a/mapeditor.cpp	Wed Feb 04 16:33:16 2009 +0000
     1.2 +++ b/mapeditor.cpp	Fri Mar 06 15:02:58 2009 +0000
     1.3 @@ -282,30 +282,41 @@
     1.4  
     1.5  void MapEditor::testFunction1()
     1.6  {
     1.7 +	TreeItem *cur=NULL;
     1.8 +	TreeItem *prev=NULL;
     1.9 +	int d;
    1.10 +	cout << "ME::testFunction1  starting to walk the map...\n";
    1.11 +	while (model->next (cur,prev,d) )
    1.12 +		cout << "*** " <<cur->getHeading().toStdString()<<endl;
    1.13 +
    1.14 +
    1.15  	//BranchObj *bo=model->getSelectedBranch();
    1.16  	//if (bo) model->moveAway (bo);
    1.17  	//if (bo) bo->setLinkStyle (LinkableMapObj::Line);
    1.18  	
    1.19  
    1.20 +/*
    1.21  	// Displacement and animation of all non-mainbranches
    1.22  	QPointF p;
    1.23  	QPointF q;
    1.24  	BranchObj *bo;
    1.25 -	TreeItem *ti=model->first();
    1.26 -	while (ti) 
    1.27 +	TreeItem *cur=NULL;
    1.28 +	TreeItem *prev=NULL;
    1.29 +	int d;
    1.30 +	while (cur) 
    1.31  	{
    1.32 -		bo=(BranchObj*)(ti->getLMO());
    1.33 +		bo=(BranchObj*)(cur->getLMO());
    1.34  
    1.35 -		if (ti->depth() >0 && !bo->hasScrolledParent(bo) )
    1.36 +		if (cur->depth() >0 && !bo->hasScrolledParent(bo) )
    1.37  		{
    1.38  			p=QPointF (qrand() %600-300, qrand () %600-300);
    1.39  			bo->setRelPos();
    1.40  			q=bo->getRelPos();
    1.41  			model->startAnimation (bo,p, q);
    1.42  		}
    1.43 -		ti=model->next();
    1.44 +		model->next(cur,prev,d);
    1.45  	}
    1.46 -
    1.47 +*/
    1.48  
    1.49  
    1.50  /* TODO Hide hidden stuff temporary, maybe add this as regular function somewhere