mapeditor.h
author insilmaril
Wed, 20 Jun 2007 10:51:44 +0000
changeset 515 f396157bbb06
parent 514 497fab7d1404
child 517 b525fdd445c4
permissions -rw-r--r--
scripted exports (continued)
insilmaril@0
     1
#ifndef MAPEDITOR_H
insilmaril@0
     2
#define MAPEDITOR_H
insilmaril@0
     3
insilmaril@408
     4
#include <QGraphicsView>
insilmaril@0
     5
insilmaril@0
     6
#include "mapcenterobj.h"
insilmaril@175
     7
#include "file.h"
insilmaril@0
     8
#include "misc.h"
insilmaril@432
     9
#include "parser.h"
insilmaril@473
    10
#include "ornamentedobj.h"
insilmaril@366
    11
#include "selection.h"
insilmaril@366
    12
#include "settings.h"
insilmaril@0
    13
insilmaril@119
    14
insilmaril@486
    15
/*! \brief Main widget in vym to display and edit a map */
insilmaril@473
    16
insilmaril@408
    17
class MapEditor : public QGraphicsView, public xmlObj {
insilmaril@0
    18
    Q_OBJECT
insilmaril@0
    19
insilmaril@0
    20
public:
insilmaril@491
    21
    /*! \brief State of the mapeditor 
insilmaril@491
    22
		
insilmaril@491
    23
		While a heading is edited, the state has to change, so
insilmaril@491
    24
		that e.g. no other object might get selected. This is done
insilmaril@491
    25
		in Main by calling setStateEditHeading
insilmaril@491
    26
	*/
insilmaril@491
    27
	enum State {
insilmaril@491
    28
		Idle,			//!< Idle, waiting for user event
insilmaril@491
    29
		EditHeading		//!< Editing heading (dont't select another branch now)
insilmaril@491
    30
	};
insilmaril@408
    31
    MapEditor(QWidget* parent=0);
insilmaril@0
    32
	~MapEditor();
insilmaril@491
    33
    MapCenterObj* getMapCenter();		//!< Return center of map
insilmaril@408
    34
	QGraphicsScene * getScene();
insilmaril@491
    35
	State getState();					//!< Return State of MapEditor
insilmaril@491
    36
	void setStateEditHeading (bool);	//!< If set to true, State will change to EditHeading
insilmaril@491
    37
	bool isRepositionBlocked(); //!< While load or undo there is no need to update graphicsview
insilmaril@491
    38
	bool isSaveStateBlocked();			//!< block while undo/redo or while running scripts
insilmaril@491
    39
	void setSaveStateBlocked(bool);		//!< block saving the undo/redo state
insilmaril@491
    40
	bool isSelectBlocked();		//!< true, if no change of selection is possible, e.g. while editing the heading of abranch
insilmaril@0
    41
	
insilmaril@486
    42
protected:
insilmaril@491
    43
	/*! \brief Get name of object
insilmaril@491
    44
	  
insilmaril@491
    45
	  Returns heading of a branch or name of an object for use in comment
insilmaril@491
    46
	  of undo/redo history
insilmaril@491
    47
	*/ 
insilmaril@420
    48
	QString getName(const LinkableMapObj*);	// Get e.g. heading or filename
insilmaril@0
    49
	void makeTmpDirs();		// create temporary directories
insilmaril@486
    50
insilmaril@486
    51
	/*! This function saves all information of the map to disc.
insilmaril@486
    52
	    saveToDir also calls the functions for all BranchObj and other objects in the map.
insilmaril@486
    53
		The structure of the map itself is returned as QString and passed back to Main, 
insilmaril@486
    54
		where saveToDir is called initially
insilmaril@486
    55
	*/	
insilmaril@486
    56
    QString saveToDir (const QString &tmpdir, const QString &prefix, bool writeflags, const QPointF &offset, LinkableMapObj *saveSel);
insilmaril@486
    57
insilmaril@505
    58
	/*! \brief Get directory, where current step in history is save
insilmaril@505
    59
insilmaril@505
    60
		saveState creates a directory for each step in history. This function returns the
insilmaril@505
    61
		path of the current directory
insilmaril@505
    62
	*/
insilmaril@505
    63
	QString getHistoryDir();
insilmaril@486
    64
insilmaril@486
    65
	/*! \brief Save the current changes in map 
insilmaril@486
    66
insilmaril@486
    67
		Two commands and selections are saved:
insilmaril@486
    68
insilmaril@486
    69
			- undocommand and undoselection to undo the change
insilmaril@486
    70
			- redocommand and redoselection to redo the action after an undo
insilmaril@486
    71
insilmaril@486
    72
		Additionally a comment is logged. 
insilmaril@486
    73
insilmaril@486
    74
	*/	
insilmaril@486
    75
    void saveState(const SaveMode& savemode, const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment, LinkableMapObj *saveSelection);
insilmaril@486
    76
	/*! Overloaded for convenience */
insilmaril@502
    77
    void saveStateChangingPart(LinkableMapObj *undoSelection, LinkableMapObj* redoSelection, const QString &redoCommand, const QString &comment);
insilmaril@486
    78
	/*! Overloaded for convenience */
insilmaril@486
    79
    void saveStateRemovingPart(LinkableMapObj *redoSelection, const QString &comment);
insilmaril@486
    80
	/*! Overloaded for convenience */
insilmaril@502
    81
    void saveState(LinkableMapObj *undoSelection, const QString &undoCommand, LinkableMapObj *redoSelection, const QString &redoCommand, const QString &comment); 
insilmaril@486
    82
	/*! Overloaded for convenience */
insilmaril@502
    83
    void saveState(const QString &undoSelection, const QString &undoCommand, const QString &redoSelection, const QString &redoCommand, const QString &comment) ;
insilmaril@486
    84
insilmaril@393
    85
public:	
insilmaril@486
    86
insilmaril@486
    87
	/* \brief Process one command and its parameters */
insilmaril@486
    88
    void parseAtom (const QString &atom);	
insilmaril@486
    89
insilmaril@486
    90
	/* \brief Runs the script */
insilmaril@486
    91
	void runScript (QString script);
insilmaril@393
    92
private:
insilmaril@395
    93
    void addFloatImageInt(const QPixmap &img);
insilmaril@119
    94
insilmaril@0
    95
public:
insilmaril@486
    96
	bool isDefault();		//!< true, if map is still the empty default map
insilmaril@486
    97
    bool hasChanged();		//!< true, if something has changed and is not saved yet
insilmaril@486
    98
	void setChanged();		//!< called from TextEditor via LinkableMapObj
insilmaril@486
    99
	void closeMap();		//!< Closes the map
insilmaril@486
   100
insilmaril@486
   101
	/*! \brief Sets filepath, filename and mapname
insilmaril@486
   102
insilmaril@486
   103
	     If the filepath is "/home/tux/map.xml", then the filename will be set
insilmaril@486
   104
		 to map.xml. The destname is needed for vymLinks, pointing to another map. 
insilmaril@486
   105
		 The destname holds the real name of the file, after it has been compressed, e.g. "map.vym"
insilmaril@486
   106
	*/	 
insilmaril@491
   107
insilmaril@491
   108
	/*! \brief Set File path
insilmaril@491
   109
insilmaril@491
   110
	     The destname is needed to construct the references between maps
insilmaril@491
   111
	*/	 
insilmaril@486
   112
	void setFilePath (QString filepath,QString destname);	
insilmaril@486
   113
	void setFilePath (QString);	//!< Overloaded for convenience
insilmaril@486
   114
	QString getFilePath ();	//!< Full path e.g. "/home/tux/map.xml"
insilmaril@486
   115
	QString getFileName ();	//!< e.g. "map.xml"
insilmaril@486
   116
	QString getMapName ();	//!< e.g. "map"
insilmaril@486
   117
	QString getDestPath (); //!< e.g. "/home/tux/map.vym"
insilmaril@491
   118
insilmaril@491
   119
	/*! \brief Load map
insilmaril@491
   120
insilmaril@491
   121
		The data is read from file. Depending on LoadMode the current
insilmaril@491
   122
		selection gets replaced by data or the data is appended.
insilmaril@491
   123
	*/	
insilmaril@205
   124
    ErrorCode load (QString, LoadMode );	// newmap, import/replace selection
insilmaril@163
   125
public:
insilmaril@491
   126
	/*! \brief Save the map to file */
insilmaril@491
   127
    int save(const SaveMode &);	
insilmaril@491
   128
	void setZipped(bool);		//!< Set or unset compression of map with zip save map zipped
insilmaril@491
   129
	bool saveZipped();			//!< True, if file will be saved zipped
insilmaril@491
   130
    void print();				//!< Print the map
insilmaril@491
   131
	void setAntiAlias (bool);	//!< Set or unset antialiasing
insilmaril@491
   132
	void setSmoothPixmap(bool); //!< Set or unset smoothing of pixmaps
insilmaril@0
   133
private:
insilmaril@0
   134
    QPixmap getPixmap();
insilmaril@473
   135
	void setHideTmpMode (BranchObj::HideTmpMode);	// temporary hide stuff
insilmaril@473
   136
	BranchObj::HideTmpMode getHideTmpMode();		// temporary hide stuff
insilmaril@0
   137
public:
insilmaril@491
   138
	void setExportMode (bool);			//!< Set or unset temporary hiding of objects during export
insilmaril@514
   139
	void exportASCII (QString fname="",bool askForName=true);  	//!< Export as ASCII
insilmaril@514
   140
insilmaril@514
   141
	/*! Save as image */
insilmaril@514
   142
    void exportImage (QString fname="",bool askForName=true,QString format="PNG");
insilmaril@491
   143
    void exportOOPresentation(const QString &,const QString &);	//!< Export as OpenOfficeOrg presentation
insilmaril@491
   144
    void exportXML(const QString&);		//!< Export as XML to directory
insilmaril@491
   145
    void clear();						//!< Clear map
insilmaril@491
   146
    void copy();						//!< Copy to clipboard
insilmaril@491
   147
    void redo();						//!< Redo last action
insilmaril@491
   148
	bool isRedoAvailable();				//!< True, if redo is available
insilmaril@491
   149
    void undo();						//!< Undo last action
insilmaril@491
   150
	bool isUndoAvailable();				//!< True, if undo is available
insilmaril@491
   151
	void gotoHistoryStep (int);			//!< Goto a specifig step in history
insilmaril@0
   152
private:	
insilmaril@394
   153
    void addMapReplaceInt(const QString & undoSel, const QString & path);
insilmaril@394
   154
    void addMapInsertInt (const QString & path, int pos);
insilmaril@502
   155
    void pasteNoSave(const int &n);		//!< paste clipboard to branch
insilmaril@0
   156
public:	
insilmaril@491
   157
    void paste();		//!< Paste clipboard to branch and backup
insilmaril@491
   158
    void cut();			//!< Cut to clipboard (and copy)
insilmaril@491
   159
	/*! \brief Move absolutly
insilmaril@491
   160
insilmaril@491
   161
		Move absolutly to (x,y).
insilmaril@491
   162
	*/	
insilmaril@393
   163
    void move    (const int &x, const int &y);
insilmaril@491
   164
	/*! \brief Move relativly
insilmaril@491
   165
insilmaril@491
   166
		Move relativly to (x,y).
insilmaril@491
   167
	*/	
insilmaril@393
   168
    void moveRel (const int &x, const int &y);
insilmaril@491
   169
    void moveBranchUp();	//!< Move branch up
insilmaril@491
   170
    void moveBranchDown();	//!< Move branch down
insilmaril@420
   171
private:	
insilmaril@420
   172
	void linkTo(const QString &);
insilmaril@420
   173
public:	
insilmaril@491
   174
	QString getHeading (bool &ok,QPoint &p); //!< Get heading, ok if selection is branch
insilmaril@491
   175
	void setHeading(const QString &);		//!< Set heading of branch	
insilmaril@106
   176
private:
insilmaril@366
   177
	void setHeadingInt(const QString &);
insilmaril@366
   178
	void setVymLinkInt(const QString &);	// Set vymLink for selection
insilmaril@491
   179
	/*! \brief Add new branch
insilmaril@491
   180
insilmaril@491
   181
		Depending on num the new branch is created
insilmaril@491
   182
insilmaril@491
   183
		-3 above selection as child of selections parent
insilmaril@491
   184
		-2 as child of selection
insilmaril@491
   185
		-1 below selection as child of selections parent
insilmaril@491
   186
		0..n	insert at a specific position in selections parent
insilmaril@491
   187
		(needed for free relinking)
insilmaril@491
   188
	*/	
insilmaril@366
   189
    BranchObj* addNewBranchInt(int);		// pos allows to add above/below selection
insilmaril@106
   190
public:	
insilmaril@491
   191
	/*! \Add new branch
insilmaril@491
   192
		
insilmaril@491
   193
		Depending on num the new branch is created
insilmaril@491
   194
		-1 above selection
insilmaril@491
   195
		 0 as child of selection
insilmaril@491
   196
		 1 below selection
insilmaril@491
   197
	*/
insilmaril@491
   198
    BranchObj* addNewBranch(int pos);		
insilmaril@491
   199
    BranchObj* addNewBranchBefore();		//!< Insert branch between selection and its parent
insilmaril@491
   200
    void deleteSelection();					//!< Delete selection
insilmaril@491
   201
	LinkableMapObj* getSelection();			//!< Returns selection
insilmaril@442
   202
	BranchObj* getSelectedBranch();			// returns selected branch or NULL
insilmaril@442
   203
	FloatImageObj* getSelectedFloatImage();	// returns selected branch or NULL
insilmaril@442
   204
	void unselect();						// before changing current noteedit
insilmaril@442
   205
	void reselect();						// after  changing current noteedit
insilmaril@442
   206
	bool select(const QString &);			// Select by string
insilmaril@366
   207
	QString getSelectString();
insilmaril@0
   208
private:	
insilmaril@366
   209
	void selectInt(LinkableMapObj*);	
insilmaril@366
   210
	void selectNextBranchInt();		// Increment number of branch
insilmaril@366
   211
	void selectPrevBranchInt();		// Decrement number of branch
insilmaril@0
   212
public:	
insilmaril@0
   213
    void selectUpperBranch();
insilmaril@0
   214
    void selectLowerBranch();
insilmaril@0
   215
    void selectLeftBranch();
insilmaril@0
   216
    void selectRightBranch();
insilmaril@0
   217
    void selectFirstBranch();
insilmaril@0
   218
    void selectLastBranch();
insilmaril@408
   219
    void selectMapBackgroundImage();
insilmaril@408
   220
    void setMapBackgroundImage(const QString &);
insilmaril@398
   221
    void selectMapBackgroundColor();
insilmaril@398
   222
    void setMapBackgroundColor(QColor);
insilmaril@398
   223
    QColor getMapBackgroundColor();
insilmaril@395
   224
    QColor getCurrentHeadingColor();
insilmaril@395
   225
    void colorBranch(QColor);
insilmaril@417
   226
    void colorSubtree(QColor);
insilmaril@0
   227
	void toggleStandardFlag(QString);
insilmaril@0
   228
    BranchObj* findText(QString,bool);		// Find object
insilmaril@0
   229
    void findReset();						// Reset Find 
insilmaril@395
   230
	void setURL(const QString &);			// set the URL
insilmaril@0
   231
	void editURL();							// edit the URL
insilmaril@266
   232
	QString getURL();						// returns URL of selection or ""
insilmaril@366
   233
	QStringList getURLs();					// returns URLs of subtree
insilmaril@0
   234
	void editHeading2URL();					// copy heading to URL
insilmaril@0
   235
	void editBugzilla2URL();				// create URL to Bugzilla
insilmaril@175
   236
	void editFATE2URL();					// create URL to FATE
insilmaril@0
   237
	void editVymLink();						// edit link to another map
insilmaril@0
   238
	void deleteVymLink();					// delete link to another map
insilmaril@0
   239
	QString getVymLink();					// return path to map
insilmaril@366
   240
	QStringList getVymLinks();				// return paths in subtree
insilmaril@395
   241
	void setHideExport(bool);				// toggle the export flag
insilmaril@243
   242
	void toggleHideExport();				// toggle the export flag
insilmaril@395
   243
	void deleteKeepChilds();				// remove but keep childs
insilmaril@395
   244
	void deleteChilds();					// remove childs
insilmaril@0
   245
	void editMapInfo();						// dialog to enter author, ...
insilmaril@442
   246
	void ensureSelectionVisible();		
insilmaril@442
   247
	void updateSelection();					// update geometry of selection
insilmaril@0
   248
	void updateActions();					// update e.g. format buttons
insilmaril@160
   249
	void updateNoteFlag();					// when TextEditor changes
insilmaril@398
   250
	void setMapAuthor (const QString &);
insilmaril@398
   251
	void setMapComment(const QString &);
insilmaril@398
   252
	void setMapLinkStyle (const QString &);	// Set style of link
insilmaril@473
   253
	LinkableMapObj::Style getMapLinkStyle ();	// requested in LMO
insilmaril@398
   254
	void setMapDefLinkColor(QColor);		// default color of links
insilmaril@398
   255
	void setMapLinkColorHintInt();			// color of links
insilmaril@473
   256
	void setMapLinkColorHint(LinkableMapObj::ColorHint);// color of links
insilmaril@473
   257
	LinkableMapObj::ColorHint getMapLinkColorHint();
insilmaril@398
   258
	QColor getMapDefLinkColor();
insilmaril@398
   259
	void setMapDefXLinkColor(QColor);
insilmaril@398
   260
	QColor getMapDefXLinkColor();
insilmaril@398
   261
	void setMapDefXLinkWidth (int);
insilmaril@398
   262
	int getMapDefXLinkWidth();
insilmaril@398
   263
	void toggleMapLinkColorHint();			// after changing linkStyles
insilmaril@398
   264
    void selectMapLinkColor();
insilmaril@442
   265
    void selectMapSelectionColor();
insilmaril@442
   266
private:	
insilmaril@442
   267
    void setSelectionColorInt(QColor);
insilmaril@442
   268
public:	
insilmaril@442
   269
    void setSelectionColor(QColor);
insilmaril@442
   270
    QColor getSelectionColor();
insilmaril@473
   271
	bool scrollBranch(BranchObj*);
insilmaril@473
   272
	bool unscrollBranch(BranchObj*);
insilmaril@0
   273
    void toggleScroll();
insilmaril@428
   274
    void unscrollChilds();
insilmaril@432
   275
private:	
insilmaril@432
   276
	FloatImageObj* loadFloatImageInt (QString);
insilmaril@432
   277
public:	
insilmaril@0
   278
	void loadFloatImage ();
insilmaril@434
   279
private:	
insilmaril@434
   280
	void saveFloatImageInt (FloatImageObj*, const QString &, const QString &);
insilmaril@434
   281
public:	
insilmaril@366
   282
	void saveFloatImage ();
insilmaril@473
   283
	void setFrameType(const FrameObj::FrameType &);
insilmaril@445
   284
	void setFrameType(const QString &);
insilmaril@442
   285
	void setFramePenColor (const QColor &);
insilmaril@442
   286
	void setFrameBrushColor (const QColor &);
insilmaril@473
   287
	void setFramePadding (const int &);
insilmaril@473
   288
	void setFrameBorderWidth (const int &);
insilmaril@175
   289
	void setIncludeImagesVer(bool);
insilmaril@175
   290
	void setIncludeImagesHor(bool);
insilmaril@160
   291
	void setHideLinkUnselected (bool);
insilmaril@160
   292
	bool getHideLinkUnselected ();
insilmaril@0
   293
private:	
insilmaril@366
   294
    void importDirInt(BranchObj *,QDir);
insilmaril@491
   295
    void importDirInt(const QString&);
insilmaril@0
   296
public:	
insilmaril@0
   297
    void importDir();
insilmaril@95
   298
	void followXLink (int);
insilmaril@95
   299
	void editXLink (int);
insilmaril@366
   300
    void testFunction();					// just testing new stuff
insilmaril@366
   301
											// set /mainwindo/showTestMenu=true...
insilmaril@0
   302
insilmaril@0
   303
protected:
insilmaril@408
   304
	virtual void contextMenuEvent ( QContextMenuEvent *e );
insilmaril@398
   305
    virtual void keyPressEvent(QKeyEvent*);
insilmaril@398
   306
    virtual void keyReleaseEvent(QKeyEvent*);
insilmaril@408
   307
    virtual void mousePressEvent(QMouseEvent*);
insilmaril@473
   308
    virtual void mouseMoveEvent(QMouseEvent*);
insilmaril@408
   309
    virtual void mouseReleaseEvent(QMouseEvent*);
insilmaril@408
   310
    virtual void mouseDoubleClickEvent(QMouseEvent*);
insilmaril@473
   311
    virtual void resizeEvent( QResizeEvent * );
insilmaril@0
   312
insilmaril@417
   313
	void dragEnterEvent (QDragEnterEvent *);
insilmaril@417
   314
	void dragMoveEvent (QDragMoveEvent *);
insilmaril@417
   315
	void dragLeaveEvent (QDragLeaveEvent *);
insilmaril@417
   316
	void dropEvent (QDropEvent *);
insilmaril@412
   317
insilmaril@473
   318
	void timerEvent(QTimerEvent *event);
insilmaril@473
   319
insilmaril@473
   320
private slots:	
insilmaril@473
   321
	void autosave ();
insilmaril@473
   322
insilmaril@0
   323
private:
insilmaril@491
   324
	State state;				// State of MapEditor
insilmaril@408
   325
	QGraphicsScene *mapScene;
insilmaril@0
   326
    MapCenterObj* mapCenter;
insilmaril@473
   327
	QTimer *autosaveTimer;
insilmaril@0
   328
insilmaril@0
   329
	bool adjustCanvasRequested;	// collect requests until end of user event
insilmaril@0
   330
	BranchObj *editingBO;		// entering Text into BO
insilmaril@0
   331
insilmaril@97
   332
	QColor defLinkColor;		// default color for links
insilmaril@97
   333
	QColor defXLinkColor;		// default color for xlinks
insilmaril@97
   334
	int defXLinkWidth;			// default width for xlinks
insilmaril@473
   335
	LinkableMapObj::ColorHint linkcolorhint;// use heading color or own color
insilmaril@473
   336
	LinkableMapObj::Style linkstyle;		// default style for links
insilmaril@0
   337
insilmaril@398
   338
    QCursor HandOpenCursor;		// cursor while moving canvas view
insilmaril@398
   339
	QCursor PickColorCursor;	// cursor while picking color 
insilmaril@398
   340
	QCursor CopyCursor;			// cursor while picking color 
insilmaril@398
   341
	QCursor XLinkCursor;		// cursor while picking color 
insilmaril@83
   342
	bool pickingColor;
insilmaril@83
   343
	bool drawingLink;			// true while creating a link
insilmaril@93
   344
	bool copyingObj;			// true while creating a link
insilmaril@95
   345
	XLinkObj* tmpXLink;
insilmaril@366
   346
insilmaril@424
   347
	Selection xelection;	
insilmaril@0
   348
    MapObj* movingObj;				// moving a MapObj
insilmaril@83
   349
	MapObj* linkingObj_src;			// part of a link
insilmaril@408
   350
    QPointF movingObj_orgPos;		// org. pos of mouse before move
insilmaril@408
   351
    QPointF movingObj_orgRelPos;	// org. relative pos of mouse before move
insilmaril@408
   352
    QPointF movingObj_start;		// rel. pos of mouse to absPos 
insilmaril@408
   353
    QPointF movingCont_start;		// inital pos of moving Content or
insilmaril@408
   354
    QPointF movingVec;				// how far has Content moved
insilmaril@0
   355
    QPrinter* printer;				// Printing
insilmaril@0
   356
insilmaril@0
   357
    bool mapDefault;				// Flag if map is untouched
insilmaril@0
   358
    bool mapChanged;				// Flag if undo is possible
insilmaril@0
   359
	bool mapUnsaved;				// Flag if map should be saved
insilmaril@0
   360
insilmaril@432
   361
	Parser parser;				// Parser stuff for scripting
insilmaril@432
   362
insilmaril@0
   363
	bool printFrame;			// Print frame around map
insilmaril@0
   364
	bool printFooter;			// Print footer below map
insilmaril@0
   365
insilmaril@0
   366
	bool zipped;				// should map be zipped
insilmaril@393
   367
	static	int mapNum;			// unique number for Editor
insilmaril@0
   368
	QString fileName;			// short name of file (for tab)
insilmaril@0
   369
	QString filePath;			// path to file which will be saved
insilmaril@0
   370
	QString fileDir;			// dir where file is saved
insilmaril@0
   371
	QString destPath;			// path to .vym file (needed for vymlinks)
insilmaril@0
   372
	QString mapName;			// fileName without ".vym"
insilmaril@0
   373
insilmaril@377
   374
	QString tmpMapDir;			// tmp directory with undo history
insilmaril@366
   375
	QString histPath;			// Path to history file
insilmaril@502
   376
	SimpleSettings undoSet;		// undo/redo commands, saved in histPath
insilmaril@381
   377
	int stepsTotal;				// total number of steps (undos+redos) 
insilmaril@502
   378
	int curStep;				// Current step in history (ring buffer)
insilmaril@502
   379
	int curClipboard;			// number of history step, which is the current clipboard
insilmaril@502
   380
	int redosAvail;				// Available number of redo steps
insilmaril@502
   381
	int undosAvail;				// Available number of undo steps
insilmaril@139
   382
	bool blockReposition;		// block while load or undo
insilmaril@139
   383
	bool blockSaveState;		// block while load or undo
insilmaril@0
   384
insilmaril@0
   385
	BranchObj* itFind;			// next object in find process
insilmaril@0
   386
	bool EOFind;				// true, if search failed
insilmaril@0
   387
insilmaril@0
   388
	QPoint exportOffset;		// set before export, used in save
insilmaril@473
   389
	BranchObj::HideTmpMode hidemode;	// true while exporting to hide some stuff
insilmaril@473
   390
insilmaril@473
   391
	int timerId;				// animation timer
insilmaril@473
   392
	QList <MapObj*> animObjList;// list with animated objects
insilmaril@0
   393
};
insilmaril@0
   394
#endif
insilmaril@0
   395