11 /*! /brief MapItem is used to store information of MapObj and inherited
14 This is done even while no QGraphicsView is availabe. This is useful
15 if e.g. on a small device like a cellphone te full map is not used,
16 but just a treeview instead.
19 class MapItem:public TreeItem
22 enum PositionMode {Unused,Absolute,Relative};
29 MapItem(const QList<QVariant> &data, TreeItem *parent = 0);
33 /*! Overloaded from TreeItem. Used to set parObj in LinkableMapObj */
34 virtual void appendChild (TreeItem *item);
36 /*! Used to save relative position while map is not in QGraphicsView */
37 virtual void setRelPos(const QPointF&);
39 /*! Used to save absolute position while map is not in QGraphicsView */
40 virtual void setAbsPos(const QPointF&);
42 /*! Tell object to use e.g. absolute positioning for mapcenter.
43 Defaulst is MapItem::Unused */
44 void setPositionMode (PositionMode mode);
48 bool hideLinkUnselected;
50 /*! Hide link if item is not selected */
51 virtual void setHideLinkUnselected(bool);
53 /*! Check if link is hidden for unselected items */
54 virtual bool getHideLinkUnselected();
56 virtual QString getMapAttr(); //! Get attributes for saving as XML
63 /*! Returns pointer to related LinkableMapObj in QGraphicsView */
64 virtual LinkableMapObj* getLMO();
66 /*! Set pointer to related LinkableMapObj in QGraphicsView */
67 virtual void setLMO (LinkableMapObj*);
69 /*! Initialize LinkableMapObj with data in MapItem */
70 virtual void initLMO();