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);
59 void stopAnimation (MapObj *mo);
61 QTimer *animationTimer;
64 uint animationInterval;
65 int timerId; // animation timer
66 QList <MapObj*> animObjList;// list with animated objects
68 ////////////////////////////////////////// Selection related
70 LinkableMapObj* getSelection();
71 BranchObj* getSelectedBranch();
72 bool select (const QString &s);
73 QString getSelectString (LinkableMapObj *lmo);
76 QGraphicsScene *mapScene;
78 QList <MapCenterObj*> mapCenters;
79 QString version; //!< version string saved in vym file