12 /*! /brief MapItem is used to store information of MapObj and inherited
15 This is done even while no QGraphicsView is availabe. This is useful
16 if e.g. on a small device like a cellphone te full map is not used,
17 but just a treeview instead.
20 class MapItem:public TreeItem, public XMLObj
23 enum PositionMode {Unused,Absolute,Relative};
30 MapItem (const QList<QVariant> &data, TreeItem *parent = 0);
33 /*! Used to save relative position while map is not in QGraphicsView */
34 virtual void setRelPos(const QPointF&);
36 /*! Used to save absolute position while map is not in QGraphicsView */
37 virtual void setAbsPos(const QPointF&);
39 /*! Tell object to use e.g. absolute positioning for mapcenter.
40 Defaulst is MapItem::Unused */
41 void setPositionMode (PositionMode mode);
46 /*! Returns pointer to related LinkableMapObj in QGraphicsView */
47 virtual LinkableMapObj* getLMO();
49 /*! Set pointer to related LinkableMapObj in QGraphicsView */
50 virtual void setLMO (LinkableMapObj*);
52 /*! Initialize LinkableMapObj with data in MapItem */
53 virtual void initLMO();
55 /*! Return data as attributes for saving in XML */
56 virtual QString getAttr();