diff -r d7d0708b1c60 -r e4435f252e44 mapeditor.h --- a/mapeditor.h Tue Dec 04 12:32:59 2007 +0000 +++ b/mapeditor.h Mon Jan 14 16:27:00 2008 +0000 @@ -6,13 +6,15 @@ #include "attribute.h" #include "file.h" -#include "mapcenterobj.h" #include "misc.h" #include "parser.h" #include "ornamentedobj.h" #include "selection.h" #include "settings.h" +#include "vymmodel.h" +class VymModel; +class Selection; /*! \brief Main widget in vym to display and edit a map */ @@ -41,7 +43,7 @@ }; MapEditor(QWidget* parent=0); ~MapEditor(); - MapCenterObj* getMapCenter(); //!< Return center of map + VymModel* getModel(); QGraphicsScene * getScene(); State getState(); //!< Return State of MapEditor void setStateEditHeading (bool); //!< If set to true, State will change to EditHeading @@ -83,15 +85,42 @@ Additionally a comment is logged. */ - void saveState(const SaveMode& savemode, const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment, LinkableMapObj *saveSelection); + void saveState( + const SaveMode& savemode, + const QString &undoSelection, + const QString &undoCommand, + const QString &redoSelection, + const QString &redoCommand, + const QString &comment, + LinkableMapObj *saveSelection); /*! Overloaded for convenience */ - void saveStateChangingPart(LinkableMapObj *undoSelection, LinkableMapObj* redoSelection, const QString &redoCommand, const QString &comment); + void saveStateChangingPart( + LinkableMapObj *undoSelection, + LinkableMapObj* redoSelection, + const QString &redoCommand, + const QString &comment); /*! Overloaded for convenience */ - void saveStateRemovingPart(LinkableMapObj *redoSelection, const QString &comment); + void saveStateRemovingPart( + LinkableMapObj *redoSelection, + const QString &comment); /*! Overloaded for convenience */ - void saveState(LinkableMapObj *undoSelection, const QString &undoCommand, LinkableMapObj *redoSelection, const QString &redoCommand, const QString &comment); + void saveState( + LinkableMapObj *undoSelection, + const QString &undoCommand, + LinkableMapObj *redoSelection, + const QString &redoCommand, + const QString &comment); /*! Overloaded for convenience */ - void saveState(const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment) ; + void saveState( + const QString &undoSelection, + const QString &undoCommand, + const QString &redoSelection, + const QString &redoCommand, + const QString &comment) ; + void saveState( + const QString &undoCommand, + const QString &redoCommand, + const QString &comment) ; public: @@ -361,7 +390,7 @@ private: State state; // State of MapEditor QGraphicsScene *mapScene; - MapCenterObj* mapCenter; + VymModel *model; // Vym Map, includding several mapCenters QTimer *autosaveTimer; bool adjustCanvasRequested; // collect requests until end of user event