diff -r 7b4e73ac247e -r 1fb50e79661c mapitem.h --- a/mapitem.h Mon Jun 29 10:28:28 2009 +0000 +++ b/mapitem.h Tue Jul 07 09:34:24 2009 +0000 @@ -3,7 +3,8 @@ #include -#include "xmlobj.h" +//#include "xmlobj.h" +#include "treeitem.h" class LinkableMapObj; @@ -15,7 +16,7 @@ but just a treeview instead. */ -class MapItem:public XMLObj +class MapItem:public TreeItem { public: enum PositionMode {Unused,Absolute,Relative}; @@ -25,8 +26,13 @@ public: MapItem(); + MapItem(const QList &data, TreeItem *parent = 0); + void init(); + /*! Overloaded from TreeItem. Used to set parObj in LinkableMapObj */ + virtual void appendChild (TreeItem *item); + /*! Used to save relative position while map is not in QGraphicsView */ virtual void setRelPos(const QPointF&); @@ -37,6 +43,20 @@ Defaulst is MapItem::Unused */ void setPositionMode (PositionMode mode); + +protected: + bool hideLinkUnselected; +public: + /*! Hide link if item is not selected */ + virtual void setHideLinkUnselected(bool); + + /*! Check if link is hidden for unselected items */ + virtual bool getHideLinkUnselected(); + + virtual QString getMapAttr(); //! Get attributes for saving as XML + + + protected: LinkableMapObj *lmo; public: