4 #include <QGraphicsScene>
6 #include "mapcenterobj.h"
10 /*! \brief This will later be divided into Model/View
13 class VymModel : public QObject{
21 void setMapEditor(MapEditor *me); // FIXME should not be necessary in Model/View
22 MapEditor* getMapEditor();
23 void setVersion(const QString &);
24 void setAuthor (const QString &);
26 void setComment (const QString &);
27 QString getComment ();
29 void setScene(QGraphicsScene *s);
30 QGraphicsScene *getScene();
31 MapCenterObj* addMapCenter();
32 MapCenterObj* addMapCenter(QPointF absPos);
33 MapCenterObj* removeMapCenter(MapCenterObj *mco);
35 BranchObj* first(); // FIXME replaced by ModelIndex later
36 BranchObj* next(BranchObj *bo); // FIXME replaced by ModelIndex later
38 LinkableMapObj* findMapObj(QPointF,LinkableMapObj*); // find MapObj
39 LinkableMapObj* findObjBySelect (const QString &s); // find MapObj by select string
40 LinkableMapObj* findID (const QString &s); // find MapObj by previously set ID
41 QString saveToDir (const QString&,const QString&,int, const QPointF&);// Save data recursivly to tempdir
44 ////////////////////////////////////////// View related
45 // void updateLink(); FIXME needed?
46 void updateRelPositions();
48 QRectF getTotalBBox();
49 void reposition(); //!< Call reposition for all MCOs
50 void setHideTmp (HideTmpMode mode);
51 QPolygonF shape(BranchObj *bo); //!< Returns arbitrary shape of subtree
52 void moveAway (LinkableMapObj *lmo);//!< Autolayout: Move all out of the way
54 // Animation **experimental**
56 void animate(); //!< Called by timer to animate stuff
58 void startAnimation(const QPointF &start, const QPointF &dest);
60 QTimer *animationTimer;
63 uint animationInterval;
64 int timerId; // animation timer
65 QList <MapObj*> animObjList;// list with animated objects
67 ////////////////////////////////////////// Selection related
69 LinkableMapObj* getSelection();
70 BranchObj* getSelectedBranch();
71 bool select (const QString &s);
72 QString getSelectString (LinkableMapObj *lmo);
75 QGraphicsScene *mapScene;
77 QList <MapCenterObj*> mapCenters;
78 QString version; //!< version string saved in vym file