mapeditor.h
changeset 659 b582bba9e312
parent 628 d7d0708b1c60
child 676 3dabc6424d73
     1.1 --- a/mapeditor.h	Tue Dec 04 12:32:59 2007 +0000
     1.2 +++ b/mapeditor.h	Wed Jan 16 15:45:19 2008 +0000
     1.3 @@ -6,13 +6,15 @@
     1.4  
     1.5  #include "attribute.h"
     1.6  #include "file.h"
     1.7 -#include "mapcenterobj.h"
     1.8  #include "misc.h"
     1.9  #include "parser.h"
    1.10  #include "ornamentedobj.h"
    1.11  #include "selection.h"
    1.12  #include "settings.h"
    1.13 +#include "vymmodel.h"
    1.14  
    1.15 +class VymModel;
    1.16 +class Selection;
    1.17  
    1.18  /*! \brief Main widget in vym to display and edit a map */
    1.19  
    1.20 @@ -41,7 +43,7 @@
    1.21  	};
    1.22      MapEditor(QWidget* parent=0);
    1.23  	~MapEditor();
    1.24 -    MapCenterObj* getMapCenter();		//!< Return center of map
    1.25 +	VymModel* getModel();
    1.26  	QGraphicsScene * getScene();
    1.27  	State getState();					//!< Return State of MapEditor
    1.28  	void setStateEditHeading (bool);	//!< If set to true, State will change to EditHeading
    1.29 @@ -83,15 +85,42 @@
    1.30  		Additionally a comment is logged. 
    1.31  
    1.32  	*/	
    1.33 -    void saveState(const SaveMode& savemode, const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment, LinkableMapObj *saveSelection);
    1.34 +    void saveState(
    1.35 +		const SaveMode& savemode, 
    1.36 +		const QString &undoSelection, 
    1.37 +		const QString &undoCommand, 
    1.38 +		const QString &redoSelection, 
    1.39 +		const QString &redoCommand, 
    1.40 +		const QString &comment, 
    1.41 +		LinkableMapObj *saveSelection);
    1.42  	/*! Overloaded for convenience */
    1.43 -    void saveStateChangingPart(LinkableMapObj *undoSelection, LinkableMapObj* redoSelection, const QString &redoCommand, const QString &comment);
    1.44 +    void saveStateChangingPart(
    1.45 +		LinkableMapObj *undoSelection, 
    1.46 +		LinkableMapObj* redoSelection, 
    1.47 +		const QString &redoCommand, 
    1.48 +		const QString &comment);
    1.49  	/*! Overloaded for convenience */
    1.50 -    void saveStateRemovingPart(LinkableMapObj *redoSelection, const QString &comment);
    1.51 +    void saveStateRemovingPart(
    1.52 +		LinkableMapObj *redoSelection, 
    1.53 +		const QString &comment);
    1.54  	/*! Overloaded for convenience */
    1.55 -    void saveState(LinkableMapObj *undoSelection, const QString &undoCommand, LinkableMapObj *redoSelection, const QString &redoCommand, const QString &comment); 
    1.56 +    void saveState(
    1.57 +		LinkableMapObj *undoSelection, 
    1.58 +		const QString &undoCommand, 
    1.59 +		LinkableMapObj *redoSelection, 
    1.60 +		const QString &redoCommand, 
    1.61 +		const QString &comment); 
    1.62  	/*! Overloaded for convenience */
    1.63 -    void saveState(const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment) ;
    1.64 +    void saveState(
    1.65 +		const QString &undoSelection, 
    1.66 +		const QString &undoCommand, 
    1.67 +		const QString &redoSelection, 
    1.68 +		const QString &redoCommand, 
    1.69 +		const QString &comment) ;
    1.70 +    void saveState(
    1.71 +		const QString &undoCommand, 
    1.72 +		const QString &redoCommand, 
    1.73 +		const QString &comment) ;
    1.74  
    1.75  public:	
    1.76  
    1.77 @@ -361,7 +390,7 @@
    1.78  private:
    1.79  	State state;				// State of MapEditor
    1.80  	QGraphicsScene *mapScene;
    1.81 -    MapCenterObj* mapCenter;
    1.82 +	VymModel *model;					// Vym Map, includding several mapCenters
    1.83  	QTimer *autosaveTimer;
    1.84  
    1.85  	bool adjustCanvasRequested;	// collect requests until end of user event