diff -r 699f28529079 -r 41c3d7f9f532 mapeditor.h --- a/mapeditor.h Tue Aug 15 12:01:14 2006 +0000 +++ b/mapeditor.h Tue Aug 29 08:31:42 2006 +0000 @@ -2,23 +2,24 @@ #define MAPEDITOR_H #include -#include -#include -#include -#include -#include +#include +//#include +#include +//#include #include -//Added by qt3to4: +#include #include #include +#include +#include +#include #include -#include -#include -#include #include "mapcenterobj.h" #include "file.h" #include "misc.h" +#include "selection.h" +#include "settings.h" #include "showtextdialog.h" class Q3NetworkOperation; @@ -41,17 +42,16 @@ QString getName(LinkableMapObj*); // Get e.g. heading or filename void makeTmpDirs(); // create temporary directories QString saveToDir(const QString&,const QString &,bool, const QPoint &,LinkableMapObj*); - void saveState(const QString &); // save actual state to backup - void saveState(LinkableMapObj *, const QString &); - void saveState(const QString &, const QString &, const QString &); - void saveState(const QString &, LinkableMapObj *, const QString &); + void saveStateComplete (const QString &); + void saveStatePart (LinkableMapObj *, const QString &); + void saveStateConstSelection (const QString &, const QString &, const QString &); + void saveStateX (LinkableMapObj *, const QString &, const QString &); void saveState(const SaveMode&, const QString &, LinkableMapObj *, const QString &, LinkableMapObj *, const QString &); void parseAtom(const QString &); void addFloatImage(const QPixmap &img); private slots: - void finishedLineEdit(); void fetchImage(const QString &img); void imageDataFetched(const QByteArray &, Q3NetworkOperation *); void imageDataFinished(Q3NetworkOperation *); @@ -99,11 +99,13 @@ void move(const int &,const int&); void moveBranchUp(); void moveBranchDown(); - void editHeading(); // Start editing heading + void editHeading(); // Start editing heading + QString getHeading (bool &,QPoint &); // Get heading, ok if selection is branch + void setHeading(const QString &); private: - void setHeading(const QString &); // Just set the heading for selection - void setURL(const QString &); // Just set the URL for selection - void setVymLink(const QString &); // Set vymLink for selection + void setHeadingInt(const QString &); + void setURLInt(const QString &); // Just set the URL for selection + void setVymLinkInt(const QString &); // Set vymLink for selection public: void addNewBranch(int); // pos allows to add above/below selection void addNewBranchHere(); // insert and make selection its @@ -113,9 +115,9 @@ void reselect(); // after changing current noteedit bool select(const QString &); // Select private: - void select(LinkableMapObj*); - void selectNextBranch(); // Increment number of branch - void selectPrevBranch(); // Decrement number of branch + void selectInt(LinkableMapObj*); + void selectNextBranchInt(); // Increment number of branch + void selectPrevBranchInt(); // Decrement number of branch public: void selectUpperBranch(); void selectLowerBranch(); @@ -170,7 +172,7 @@ void setHideLinkUnselected (bool); bool getHideLinkUnselected (); private: - void importDir(BranchObj *,QDir); + void importDirInt(BranchObj *,QDir); public: void importDir(); void followXLink (int); @@ -194,7 +196,6 @@ bool adjustCanvasRequested; // collect requests until end of user event BranchObj *editingBO; // entering Text into BO - QLineEdit* lineedit; QColor actColor; // actual color QColor defLinkColor; // default color for links @@ -209,7 +210,8 @@ bool drawingLink; // true while creating a link bool copyingObj; // true while creating a link XLinkObj* tmpXLink; - + + Selection xelection; LinkableMapObj* selection; // select a LinkableMapObj LinkableMapObj* selectionLast; // last selection MapObj* movingObj; // moving a MapObj @@ -238,9 +240,9 @@ bool isInteractive; // non interactive don't need tmpdirs QString tmpMapDir; // tmp directory with data for undo/redo + QString histPath; // Path to history file int undosTotal; // total number of undos - int undoNum; // current number of bakMapDir to be used - int undosAvail; // how many actions can currently be undone + SimpleSettings undoSet; // undo/redo commands bool blockReposition; // block while load or undo bool blockSaveState; // block while load or undo