X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=mapitem.h;fp=mapitem.h;h=0000000000000000000000000000000000000000;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=3559a363a95ec267d2a44a2d60b4c87881e55ad4;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git diff --git a/mapitem.h b/mapitem.h deleted file mode 100644 index 3559a36..0000000 --- a/mapitem.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef MAPITEM_H -#define MAPITEM_H - -#include - -#include "treeitem.h" - -class MapObj; -class LinkableMapObj; - -/*! /brief MapItem is used to store information of MapObj and inherited - classes. - - This is done even while no QGraphicsView is availabe. This is useful - if e.g. on a small device like a cellphone the full map is not used, - but just a treeview instead. -*/ - -class MapItem:public TreeItem -{ -public: - enum PositionMode {Unused,Absolute,Relative}; -protected: - QPointF pos; - PositionMode posMode; - -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&); - - /*! Used to save absolute position while map is not in QGraphicsView */ - virtual void setAbsPos(const QPointF&); - - /*! Tell object to use e.g. absolute positioning for mapcenter. - Defaulst is MapItem::Unused */ - void setPositionMode (PositionMode mode); - PositionMode getPositionMode (); - - -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 - - virtual QRectF getBBoxURLFlag();//! get bbox of url flag - virtual QRectF getBBoxFlag (const QString &fname); //! get bbox of flag - virtual void setRotation (const qreal &a); - - -protected: - MapObj *mo; - qreal angle; - -public: - /*! Returns pointer to related LinkableMapObj in QGraphicsView */ - virtual MapObj* getMO(); - virtual LinkableMapObj* getLMO(); - - /*! Initialize LinkableMapObj with data in MapItem */ - virtual void initLMO(); - -}; - - -#endif