mapitem.h
changeset 779 1fb50e79661c
parent 777 8acac4fade1b
child 791 f1006de05c54
     1.1 --- a/mapitem.h	Mon Jun 29 10:28:28 2009 +0000
     1.2 +++ b/mapitem.h	Tue Jul 07 09:34:24 2009 +0000
     1.3 @@ -3,7 +3,8 @@
     1.4  
     1.5  #include <QPointF>
     1.6  
     1.7 -#include "xmlobj.h"
     1.8 +//#include "xmlobj.h"
     1.9 +#include "treeitem.h"
    1.10  
    1.11  class LinkableMapObj;
    1.12  
    1.13 @@ -15,7 +16,7 @@
    1.14  	but just a treeview instead.
    1.15  */
    1.16  
    1.17 -class MapItem:public XMLObj
    1.18 +class MapItem:public TreeItem
    1.19  {
    1.20  public:
    1.21  	enum PositionMode {Unused,Absolute,Relative};
    1.22 @@ -25,8 +26,13 @@
    1.23  
    1.24  public:
    1.25  	MapItem();
    1.26 +	MapItem(const QList<QVariant> &data, TreeItem *parent = 0);
    1.27 +
    1.28  	void init();
    1.29  
    1.30 +	/*! Overloaded from TreeItem. Used to set parObj in LinkableMapObj */
    1.31 +	virtual void appendChild (TreeItem *item);
    1.32 +
    1.33  	/*! Used to save relative position while map is not in QGraphicsView */
    1.34  	virtual void setRelPos(const QPointF&);	
    1.35  
    1.36 @@ -37,6 +43,20 @@
    1.37  	    Defaulst is MapItem::Unused */
    1.38  	void setPositionMode (PositionMode mode);
    1.39  
    1.40 +
    1.41 +protected:
    1.42 +	bool hideLinkUnselected;
    1.43 +public:
    1.44 +	/*! Hide link if item is not selected */
    1.45 +	virtual void setHideLinkUnselected(bool);
    1.46 +
    1.47 +	/*! Check if link is hidden for unselected items */
    1.48 +	virtual bool getHideLinkUnselected();
    1.49 +
    1.50 +	virtual QString getMapAttr();	//! Get attributes for saving as XML
    1.51 +
    1.52 +
    1.53 +
    1.54  protected:
    1.55  	LinkableMapObj *lmo;
    1.56  public: