diff -r 0301e6109702 -r ffb95cd03156 mapitem.cpp --- a/mapitem.cpp Wed Apr 29 21:40:37 2009 +0000 +++ b/mapitem.cpp Thu Apr 30 11:52:49 2009 +0000 @@ -56,3 +56,25 @@ } } +QString MapItem::getAttr() +{ + switch (posMode) + { + case Relative: + if (lmo) pos=lmo->getRelPos(); + return + attribut("relPosX",QString().setNum(pos.x())) + + attribut("relPosY",QString().setNum(pos.y())); + break; + case Absolute: + if (lmo) pos=lmo->getAbsPos(); + return + attribut("absPosX",QString().setNum(pos.x())) + + attribut("absPosY",QString().setNum(pos.y())); + break; + default: + return QString(); + break; + } +} +