Bugfix: Serious bug related to autosave fixed.
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);
34 MapCenterObj* getMapCenterNum (int i);
35 int countMapCenters ();
37 BranchObj* first(); // FIXME replaced by ModelIndex later
38 BranchObj* next(BranchObj *bo); // FIXME replaced by ModelIndex later
40 LinkableMapObj* findMapObj(QPointF,LinkableMapObj*); // find MapObj
41 LinkableMapObj* findObjBySelect (const QString &s); // find MapObj by select string
42 LinkableMapObj* findID (const QString &s); // find MapObj by previously set ID
43 QString saveToDir (const QString&,const QString&,int, const QPointF&);// Save data recursivly to tempdir
46 ////////////////////////////////////////// View related
47 // void updateLink(); FIXME needed?
48 void updateRelPositions();
50 QRectF getTotalBBox();
51 void reposition(); //!< Call reposition for all MCOs
52 void setHideTmp (HideTmpMode mode);
53 QPolygonF shape(BranchObj *bo); //!< Returns arbitrary shape of subtree
54 void moveAway (LinkableMapObj *lmo);//!< Autolayout: Move all out of the way
56 // Animation **experimental**
58 void animate(); //!< Called by timer to animate stuff
60 void startAnimation (const QPointF &start, const QPointF &dest);
61 void stopAnimation (MapObj *mo);
63 QTimer *animationTimer;
66 uint animationInterval;
67 int timerId; // animation timer
68 QList <MapObj*> animObjList;// list with animated objects
70 ////////////////////////////////////////// Selection related
72 LinkableMapObj* getSelection();
73 BranchObj* getSelectedBranch();
74 bool select (const QString &s);
75 QString getSelectString (LinkableMapObj *lmo);
78 QGraphicsScene *mapScene;
80 QList <MapCenterObj*> mapCenters;
81 QString version; //!< version string saved in vym file