mapitem.cpp
changeset 762 ffb95cd03156
parent 760 59614eaf5fbb
child 775 6e4b586aa88a
     1.1 --- a/mapitem.cpp	Wed Apr 29 21:40:37 2009 +0000
     1.2 +++ b/mapitem.cpp	Thu Apr 30 11:52:49 2009 +0000
     1.3 @@ -56,3 +56,25 @@
     1.4  	}
     1.5  }
     1.6  
     1.7 +QString MapItem::getAttr()
     1.8 +{
     1.9 +	switch (posMode)
    1.10 +	{
    1.11 +		case Relative:	
    1.12 +			if (lmo) pos=lmo->getRelPos();
    1.13 +			return
    1.14 +				attribut("relPosX",QString().setNum(pos.x())) +
    1.15 +				attribut("relPosY",QString().setNum(pos.y())); 
    1.16 +			break;
    1.17 +		case Absolute:	
    1.18 +			if (lmo) pos=lmo->getAbsPos();
    1.19 +			return
    1.20 +				attribut("absPosX",QString().setNum(pos.x())) +
    1.21 +				attribut("absPosY",QString().setNum(pos.y())); 
    1.22 +			break;
    1.23 +		default:
    1.24 +			return QString();
    1.25 +			break;
    1.26 +	}
    1.27 +}
    1.28 +