diff -r 920e6ed5889b -r e90f5bef70c8 mapeditor.h --- a/mapeditor.h Sun Jan 30 12:59:10 2005 +0000 +++ b/mapeditor.h Sun Jan 30 23:25:47 2005 +0000 @@ -11,6 +11,8 @@ #include "mapcenterobj.h" #include "misc.h" +enum ModifierMode {pickColorMode,linkObjectsMode}; + class MapEditor : public QCanvasView , public xmlObj { Q_OBJECT @@ -66,7 +68,6 @@ void copy(); // copy branch to clipboard private: LinkableMapObj* pasteNoSave(); // paste clipboard to branch - LinkableMapObj* pasteAtNoSave(int); // paste clipboard to branch at position i void cutNoSave(); // cut to clipboard public: void paste(); // paste clipboard to branch and backup @@ -77,7 +78,8 @@ void addNewBranch(int); // pos allows to add above/below selection void deleteSelection(); LinkableMapObj* getSelection(); // returns selection - bool select(QString ); // Select + LinkableMapObj* findObj (QString); + bool select(const QString &); // Select void unselect(); // before changing current noteedit void reselect(); // after changing current noteedit private: @@ -152,13 +154,18 @@ LinkColorHint linkcolorhint;// use heading color or own color LinkStyle linkstyle; // default style for links + ModifierMode modifierMode; // pick color or link objects? + QCursor handOpenCursor; // cursor while moving canvas view QCursor pickColorCursor; // cursor while picking color - bool pickingColor; // true while picking Color CTRL-LeftButton + bool pickingColor; + bool drawingLink; // true while creating a link + LinkObj* tmpLink; LinkableMapObj* selection; // select a LinkableMapObj LinkableMapObj* selectionLast; // last selection MapObj* movingObj; // moving a MapObj + MapObj* linkingObj_src; // part of a link QPoint movingObj_start; // rel. pos of mouse to absPos QPoint movingCont_start; // inital pos of moving Content or QPoint movingVec; // how far has Content moved