mapeditor.h
changeset 83 e90f5bef70c8
parent 0 7a96bd401351
child 89 9db3eaa21237
     1.1 --- a/mapeditor.h	Sun Jan 30 12:59:10 2005 +0000
     1.2 +++ b/mapeditor.h	Sun Jan 30 23:25:47 2005 +0000
     1.3 @@ -11,6 +11,8 @@
     1.4  #include "mapcenterobj.h"
     1.5  #include "misc.h"
     1.6  
     1.7 +enum ModifierMode {pickColorMode,linkObjectsMode};
     1.8 +
     1.9  class MapEditor : public QCanvasView , public xmlObj {
    1.10      Q_OBJECT
    1.11  
    1.12 @@ -66,7 +68,6 @@
    1.13      void copy();		// copy branch to clipboard
    1.14  private:	
    1.15      LinkableMapObj* pasteNoSave();		// paste clipboard to branch
    1.16 -    LinkableMapObj* pasteAtNoSave(int);	// paste clipboard to branch at position i
    1.17      void cutNoSave();	// cut to clipboard
    1.18  public:	
    1.19      void paste();		// paste clipboard to branch and backup
    1.20 @@ -77,7 +78,8 @@
    1.21      void addNewBranch(int);			// pos allows to add above/below selection
    1.22      void deleteSelection();
    1.23  	LinkableMapObj* getSelection();	// returns selection
    1.24 -	bool select(QString );			// Select 
    1.25 +	LinkableMapObj* findObj (QString);
    1.26 +	bool select(const QString &);	// Select 
    1.27  	void unselect();				// before changing current noteedit
    1.28  	void reselect();				// after  changing current noteedit
    1.29  private:	
    1.30 @@ -152,13 +154,18 @@
    1.31  	LinkColorHint linkcolorhint;// use heading color or own color
    1.32  	LinkStyle linkstyle;		// default style for links
    1.33  
    1.34 +	ModifierMode modifierMode;	// pick color or link objects?
    1.35 +
    1.36      QCursor handOpenCursor;		// cursor while moving canvas view
    1.37  	QCursor pickColorCursor;	// cursor while picking color 
    1.38 -	bool pickingColor;			// true while picking Color CTRL-LeftButton
    1.39 +	bool pickingColor;
    1.40 +	bool drawingLink;			// true while creating a link
    1.41 +	LinkObj* tmpLink;
    1.42  	
    1.43      LinkableMapObj* selection;		// select a LinkableMapObj
    1.44      LinkableMapObj* selectionLast;	// last selection 
    1.45      MapObj* movingObj;				// moving a MapObj
    1.46 +	MapObj* linkingObj_src;			// part of a link
    1.47      QPoint movingObj_start;			// rel. pos of mouse to absPos 
    1.48      QPoint movingCont_start;		// inital pos of moving Content or
    1.49      QPoint movingVec;				// how far has Content moved