10 /*! /brief MapItem is used to store information of MapObj and inherited
13 This is done even while no QGraphicsView is availabe. This is useful
14 if e.g. on a small device like a cellphone the full map is not used,
15 but just a treeview instead.
18 class MapItem:public TreeItem
21 enum PositionMode {Unused,Absolute,Relative};
28 MapItem(const QList<QVariant> &data, TreeItem *parent = 0);
32 /*! Overloaded from TreeItem. Used to set parObj in LinkableMapObj */
33 virtual void appendChild (TreeItem *item);
35 /*! Used to save relative position while map is not in QGraphicsView */
36 virtual void setRelPos(const QPointF&);
38 /*! Used to save absolute position while map is not in QGraphicsView */
39 virtual void setAbsPos(const QPointF&);
41 /*! Tell object to use e.g. absolute positioning for mapcenter.
42 Defaulst is MapItem::Unused */
43 void setPositionMode (PositionMode mode);
44 PositionMode getPositionMode ();
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
58 virtual QRectF getBBoxURLFlag();//! get bbox of url flag
59 virtual QRectF getBBoxFlag (const QString &fname); //! get bbox of flag
65 /*! Returns pointer to related LinkableMapObj in QGraphicsView */
66 virtual LinkableMapObj* getLMO();
68 /*! Set pointer to related LinkableMapObj in QGraphicsView */
69 virtual void setLMO (LinkableMapObj*);
71 /*! Initialize LinkableMapObj with data in MapItem */
72 virtual void initLMO();