1.6.7
authorinsilmaril
Mon, 30 May 2005 05:39:10 +0000
changeset 104270593ab83b2
parent 103 c810a11d11d9
child 105 67a91e28b30f
1.6.7
demos/todo.vym
floatimageobj.cpp
icons/flag-vymlink.xpm
icons/flags.xcf
linkablemapobj.cpp
mainwindow.cpp
mapeditor.cpp
misc.cpp
tex/vym.tex
version.h
xlinkobj.cpp
xml.cpp
     1.1 Binary file demos/todo.vym has changed
     2.1 --- a/floatimageobj.cpp	Mon May 23 15:28:20 2005 +0000
     2.2 +++ b/floatimageobj.cpp	Mon May 30 05:39:10 2005 +0000
     2.3 @@ -1,6 +1,5 @@
     2.4  #include "floatimageobj.h"
     2.5  #include "branchobj.h"
     2.6 -#include <math.h>
     2.7  
     2.8  
     2.9  /////////////////////////////////////////////////////////////////
    2.10 @@ -67,7 +66,7 @@
    2.11  
    2.12  int FloatImageObj::z ()
    2.13  {
    2.14 -	return lrint (icon->z());
    2.15 +	return qRound (icon->z());
    2.16  }
    2.17  
    2.18  bool FloatImageObj::load (const QString &fn)
     3.1 --- a/icons/flag-vymlink.xpm	Mon May 23 15:28:20 2005 +0000
     3.2 +++ b/icons/flag-vymlink.xpm	Mon May 30 05:39:10 2005 +0000
     3.3 @@ -1,36 +1,33 @@
     3.4  /* XPM */
     3.5 -static const char *flag_vymlink_xpm[] = {
     3.6 -/* columns rows colors chars-per-pixel */
     3.7 +static char * flag_vymlink_xpm[] = {
     3.8  "22 22 8 1",
     3.9 -"  c Gray100",
    3.10 -". c #848284",
    3.11 -"X c #000084",
    3.12 -"o c Gray0",
    3.13 -"O c None",
    3.14 -"+ c Gray0",
    3.15 -"@ c Gray0",
    3.16 -"# c Gray0",
    3.17 -/* pixels */
    3.18 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.19 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.20 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.21 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.22 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.23 -"OOOO.XXXXXXOOOOOOOOOOO",
    3.24 -"OOOXXXXXXXXXXOOOOOOXOO",
    3.25 -"OO.XXOOOOOOXXXXOOOXXOO",
    3.26 -"OOXXOOOOOOOOOXXXOXXXOO",
    3.27 -"OOXXOOOOOOOOOOXXXXXXOO",
    3.28 -"OOXXOOOOOOOOOOOXXXXXOO",
    3.29 -"OOXXOOOOOOOOOOXXXXXXOO",
    3.30 -"OOXXOOOOOOOOOXXXXXXXOO",
    3.31 -"OO.XXOOOOOOOXXXXXXXXOO",
    3.32 -"OOOXXX.OOOOOOOOOOOOOOO",
    3.33 -"OOOOXXXOOOOOOOOOOOOOOO",
    3.34 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.35 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.36 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.37 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.38 -"OOOOOOOOOOOOOOOOOOOOOO",
    3.39 -"OOOOOOOOOOOOOOOOOOOOOO"
    3.40 -};
    3.41 +" 	c None",
    3.42 +".	c #848284",
    3.43 +"+	c #000084",
    3.44 +"@	c #0026FF",
    3.45 +"#	c #CC0833",
    3.46 +"$	c #FF0000",
    3.47 +"%	c #1C22E3",
    3.48 +"&	c #8E1171",
    3.49 +"  .++++++             ",
    3.50 +" ++++++++++      +    ",
    3.51 +".++      ++++   ++    ",
    3.52 +"++         +++ +++    ",
    3.53 +"++          ++++++    ",
    3.54 +"++           +++++    ",
    3.55 +"++          ++++++    ",
    3.56 +"++         +++++++    ",
    3.57 +".++       ++++++++    ",
    3.58 +" +++.                 ",
    3.59 +"  +++          @@@#   ",
    3.60 +"          $$$$$$%$$$  ",
    3.61 +"             @@@$$@@  ",
    3.62 +"             @@$$%@@  ",
    3.63 +"          $$$@@$@$$$$ ",
    3.64 +"            $$$$@@@@  ",
    3.65 +"          $$$&@@@@@@  ",
    3.66 +"              @@@@@@  ",
    3.67 +"              @@@@@   ",
    3.68 +"              @@@@@   ",
    3.69 +"               @@@@   ",
    3.70 +"               @@@@   "};
     4.1 Binary file icons/flags.xcf has changed
     5.1 --- a/linkablemapobj.cpp	Mon May 23 15:28:20 2005 +0000
     5.2 +++ b/linkablemapobj.cpp	Mon May 30 05:39:10 2005 +0000
     5.3 @@ -1,5 +1,3 @@
     5.4 -#include <cmath>
     5.5 -
     5.6  #include "linkablemapobj.h"
     5.7  #include "branchobj.h"
     5.8  #include "mapeditor.h"
     5.9 @@ -449,10 +447,10 @@
    5.10  	double vy=p2y - p1y;
    5.11  
    5.12  	// Draw the horizontal line below heading (from ChildPos to ParPos)
    5.13 -	bottomline->setPoints (lrint(childPos.x()),
    5.14 -		lrint(childPos.y()),
    5.15 -		lrint(p1x),
    5.16 -		lrint(p1y) );
    5.17 +	bottomline->setPoints (qRound(childPos.x()),
    5.18 +		qRound(childPos.y()),
    5.19 +		qRound(p1x),
    5.20 +		qRound(p1y) );
    5.21  
    5.22  	double a;	// angle
    5.23  	if (vx > -0.000001 && vx < 0.000001)
    5.24 @@ -460,7 +458,7 @@
    5.25  	else
    5.26  		a=atan( vy / vx );
    5.27  	// "turning point" for drawing polygonal links
    5.28 -	QPoint tp (-lrint(sin (a)*thickness_start), lrint(cos (a)*thickness_start));	
    5.29 +	QPoint tp (-qRound(sin (a)*thickness_start), qRound(cos (a)*thickness_start));	
    5.30  	
    5.31  	QCanvasLine *cl;
    5.32  
    5.33 @@ -470,10 +468,10 @@
    5.34  	switch (style)
    5.35  	{
    5.36  		case StyleLine:
    5.37 -			l->setPoints( lrint (parPos.x()),
    5.38 -				lrint(parPos.y()),
    5.39 -				lrint(p2x),
    5.40 -				lrint(p2y) );
    5.41 +			l->setPoints( qRound (parPos.x()),
    5.42 +				qRound(parPos.y()),
    5.43 +				qRound(p2x),
    5.44 +				qRound(p2y) );
    5.45  			break;	
    5.46  		case StyleParabel:	
    5.47  			parabel (pa0, p1x,p1y,p2x,p2y);
    5.48 @@ -485,15 +483,15 @@
    5.49  			}
    5.50  			break;
    5.51  		case StylePolyLine:
    5.52 -			pa0[0]=QPoint (lrint(p2x+tp.x()), lrint(p2y+tp.y()));
    5.53 -			pa0[1]=QPoint (lrint(p2x-tp.x()), lrint(p2y-tp.y()));
    5.54 -			pa0[2]=QPoint (lrint (parPos.x()), lrint(parPos.y()) );
    5.55 +			pa0[0]=QPoint (qRound(p2x+tp.x()), qRound(p2y+tp.y()));
    5.56 +			pa0[1]=QPoint (qRound(p2x-tp.x()), qRound(p2y-tp.y()));
    5.57 +			pa0[2]=QPoint (qRound (parPos.x()), qRound(parPos.y()) );
    5.58  			p->setPoints (pa0);
    5.59  			// here too, draw line to avoid missing pixels
    5.60 -			l->setPoints( lrint (parPos.x()),
    5.61 -				lrint(parPos.y()),
    5.62 -				lrint(p2x),
    5.63 -				lrint(p2y) );
    5.64 +			l->setPoints( qRound (parPos.x()),
    5.65 +				qRound(parPos.y()),
    5.66 +				qRound(p2x),
    5.67 +				qRound(p2y) );
    5.68  			break;
    5.69  		case StylePolyParabel:	
    5.70  			parabel (pa1, p1x,p1y,p2x+tp.x(),p2y+tp.y());
    5.71 @@ -709,12 +707,12 @@
    5.72  		m=(vy / (vx*vx));
    5.73  	dx=vx/(arcsegs);
    5.74  	int i;
    5.75 -	ya.setPoint (0,QPoint (lrint(p1x),lrint(p1y)));
    5.76 +	ya.setPoint (0,QPoint (qRound(p1x),qRound(p1y)));
    5.77  	for (i=1;i<=arcsegs;i++)
    5.78  	{	
    5.79  		pnx=p1x+dx;
    5.80  		pny=m*(pnx-parPos.x())*(pnx-parPos.x())+parPos.y();
    5.81 -		ya.setPoint (i,QPoint (lrint(pnx),lrint(pny)));
    5.82 +		ya.setPoint (i,QPoint (qRound(pnx),qRound(pny)));
    5.83  		p1x=pnx;
    5.84  		p1y=pny;
    5.85  	}	
     6.1 --- a/mainwindow.cpp	Mon May 23 15:28:20 2005 +0000
     6.2 +++ b/mainwindow.cpp	Mon May 30 05:39:10 2005 +0000
     6.3 @@ -179,7 +179,7 @@
     6.4  			s=settings.readEntry (p,"konqueror");
     6.5  		#else
     6.6  			#if defined(Q_OS_MACX)
     6.7 -				s=settings.readEntry (p,"/Applications/Safari.app/Contents/MacOS/Safari");
     6.8 +				s=settings.readEntry (p,"/usr/bin/open");
     6.9  			#else
    6.10  				s=settings.readEntry (p,"mozilla");
    6.11  			#endif
    6.12 @@ -192,7 +192,7 @@
    6.13  			s=settings.readEntry (p,"acroread");
    6.14  		#else
    6.15  			#if defined(Q_OS_MACX)
    6.16 -				s=settings.readEntry (p,"/Applications/Safari.app/Contents/MacOS/Safari");
    6.17 +				s=settings.readEntry (p,"/usr/bin/open");
    6.18  			#else
    6.19  				s=settings.readEntry (p,"acroread");
    6.20  			#endif
    6.21 @@ -761,24 +761,21 @@
    6.22      QAction *a;
    6.23  	actionGroupModModes=new QActionGroup ( this, "formatLinkStyles");
    6.24  	actionGroupModModes->setExclusive (true);
    6.25 -	//FIXME Linkstyle line???
    6.26 -    a= new QAction( tr( "Use modifier to color branches" ), QPixmap(modecolor_xpm), tr( "Linkstyle Line" ), Key_K, actionGroupModModes, "modModeColor" );
    6.27 +    a= new QAction( tr( "Use modifier to color branches" ), QPixmap(modecolor_xpm), tr( "Linkstyle Line" ), Key_J, actionGroupModModes, "modModeColor" );
    6.28  	a->setToggleAction(true);
    6.29  	a->addTo (tb);
    6.30  	a->setOn(true);
    6.31  	actionModModeColor=a;
    6.32 +	
    6.33 +    a= new QAction( tr( "Use modifier to copy" ), QPixmap(modecopy_xpm), tr( "Linkstyle Line" ), Key_K, actionGroupModModes, "modModeCopy" );
    6.34 +	a->setToggleAction(true);
    6.35 +	a->addTo (tb);
    6.36 +	actionModModeCopy=a;
    6.37 +
    6.38      a= new QAction( tr( "Use modifier to draw links" ), QPixmap(modelink_xpm), tr( "Linkstyle Line" ), Key_L, actionGroupModModes, "modModeLink" );
    6.39 -	//FIXME Linkstyle line???
    6.40 -
    6.41  	a->setToggleAction(true);
    6.42  	a->addTo (tb);
    6.43  	actionModModeLink=a;
    6.44 -    a= new QAction( tr( "Use modifier to copy" ), QPixmap(modecopy_xpm), tr( "Linkstyle Line" ), Key_C, actionGroupModModes, "modModeCopy" );
    6.45 -	//FIXME Linkstyle line???
    6.46 -
    6.47 -	a->setToggleAction(true);
    6.48 -	a->addTo (tb);
    6.49 -	actionModModeCopy=a;
    6.50  }
    6.51  
    6.52  // Flag Actions
     7.1 --- a/mapeditor.cpp	Mon May 23 15:28:20 2005 +0000
     7.2 +++ b/mapeditor.cpp	Mon May 30 05:39:10 2005 +0000
     7.3 @@ -2258,7 +2258,7 @@
     7.4  		bo=bo->next();
     7.5  	}
     7.6      stats+=QString ("%1 branches\n").arg (b-1,6);
     7.7 -    stats+=QString ("%1 xLinks \n").arg (xl-1,6);
     7.8 +    stats+=QString ("%1 xLinks \n").arg (xl,6);
     7.9      stats+=QString ("%1 notes\n").arg (n,6);
    7.10      stats+=QString ("%1 images\n").arg (f,6);
    7.11  	dia.setStats (stats);
    7.12 @@ -2951,8 +2951,7 @@
    7.13  					unselect();
    7.14  					selection=mapCenter->getLastBranch();
    7.15  					selection->select();
    7.16 -					selection->setParObjTmp ((BranchObj*)(selection),p,1); 
    7.17 -					selection->updateLink();
    7.18 +					mapCenter->reposition();
    7.19  				}
    7.20  			}	else
    7.21  			{
     8.1 --- a/misc.cpp	Mon May 23 15:28:20 2005 +0000
     8.2 +++ b/misc.cpp	Mon May 30 05:39:10 2005 +0000
     8.3 @@ -1,8 +1,6 @@
     8.4  #include <qregexp.h>
     8.5  #include <qpoint.h>
     8.6  
     8.7 -#include <cmath>
     8.8 -
     8.9  #include "misc.h"
    8.10  
    8.11  
    8.12 @@ -223,13 +221,13 @@
    8.13  		if (pix.width()>max_w)
    8.14  		{
    8.15  			r=max_w / pix.width();
    8.16 -			pix.resize(lrint(pix.width()*r), lrint(pix.height()*r));
    8.17 +			pix.resize(qRound(pix.width()*r), qRound(pix.height()*r));
    8.18  			// TODO not a resize, but a shrink/enlarge is needed here...
    8.19  		}
    8.20  		if (pix.height()>max_h)
    8.21  		{
    8.22  			r=max_h / pix.height();
    8.23 -			pix.resize(lrint(pix.width()*r), lrint(pix.height()*r));
    8.24 +			pix.resize(qRound(pix.width()*r), qRound(pix.height()*r));
    8.25  			// TODO not a resize, but a shrink/enlarge is needed here...
    8.26  		}
    8.27          setPixmap( pix );
     9.1 --- a/tex/vym.tex	Mon May 23 15:28:20 2005 +0000
     9.2 +++ b/tex/vym.tex	Mon May 30 05:39:10 2005 +0000
     9.3 @@ -160,6 +160,10 @@
     9.4  There are also more flags set by \vym automatically to show additional
     9.5  information, e.g. when a  exists for a  particular branch.
     9.6  
     9.7 +By default some of these flags are set exclusively e.g. when the \lq
     9.8 +thumb-up\rq flag is set, then the \lq thumb down\rq is unset and vice
     9.9 +versa. You can change this default behaviour in the settings menu.
    9.10 +
    9.11  \section{Mapeditor} \label {mapeditor}
    9.12  \subsection{Start a new map}
    9.13  After \vym is started two windows will open: the mapeditor and the
    9.14 @@ -179,7 +183,10 @@
    9.15  branch. Finish adding the new branch by pressing \key{Enter}.
    9.16  %tipp
    9.17  Sometimes it comes handy to add a new branch above or below the current
    9.18 -one. Use \key{Ins} together with \key{Shift} or \key{Ctrl}. 
    9.19 +one. Use \key{Ins} together with \key{Shift} or \key{Ctrl}. It is also
    9.20 +possible to add a branch in such a way, that the current selection
    9.21 +becomes the child of the new branch, which is like inserting it {\em
    9.22 +before} the selection. This can be done using the context menu.
    9.23  
    9.24  \subsection{Navigate through a map}
    9.25  \subsubsection*{Select branches}
    9.26 @@ -714,6 +721,10 @@
    9.27  \begin{longtable}{|lcp{8cm}l|} \hline
    9.28  Version	&	&	Comment								& Date	\\ \hline \hline \endhead
    9.29  	\hline \endfoot
    9.30 +1.6.7	& - &	Changed default pdf-reader for Mac OSX & 2005-05-27 \\ 
    9.31 +		& - &	Bugfix: xLinks stopped working in 1.6.6			&\\
    9.32 +		& - &	Bugfix: drawing error when using modModeCopy    &\\
    9.33 +		& - &	Bugfix: replaced lrint by qRound for BSD ports	&\\
    9.34  1.6.6	& -	&	Exclusive standard flags			& 2005-05-23 \\
    9.35  1.6.5	& -	&	removing a branch and keeping its childs	& 2005-05-19 \\
    9.36          & -	&	removing childs of a branch			& \\
    9.37 @@ -947,6 +958,10 @@
    9.38  % reorder
    9.39  % scroll
    9.40  % fold
    9.41 +% vymlink
    9.42 +% xlink
    9.43 +% context menu
    9.44 +% Mac OS X
    9.45  
    9.46  
    9.47  
    10.1 --- a/version.h	Mon May 23 15:28:20 2005 +0000
    10.2 +++ b/version.h	Mon May 30 05:39:10 2005 +0000
    10.3 @@ -1,7 +1,7 @@
    10.4  #ifndef VERSION_H 
    10.5  #define VERSION_H
    10.6  
    10.7 -#define __VYM_VERSION__ "1.6.6"
    10.8 -#define __BUILD_DATE__ "May 23, 2005"
    10.9 +#define __VYM_VERSION__ "1.6.7"
   10.10 +#define __BUILD_DATE__ "May 27, 2005"
   10.11  
   10.12  #endif
    11.1 --- a/xlinkobj.cpp	Mon May 23 15:28:20 2005 +0000
    11.2 +++ b/xlinkobj.cpp	Mon May 30 05:39:10 2005 +0000
    11.3 @@ -88,7 +88,6 @@
    11.4  
    11.5  int XLinkObj::getWidth()
    11.6  {
    11.7 -	cout << "XLO  w="<<width<<endl;
    11.8  	return width;
    11.9  }
   11.10  
   11.11 @@ -113,11 +112,7 @@
   11.12  {
   11.13  	if (beginBranch && endBranch)
   11.14  	{
   11.15 -		if (beginBranch==endBranch)
   11.16 -		{	//FIXME debugging
   11.17 -			cout << "XLO::activate  b=e="<<beginBranch->getHeading()<<endl;
   11.18 -			return false;
   11.19 -		}
   11.20 +		if (beginBranch==endBranch) return false;
   11.21  		xLinkState=activeXLink;
   11.22  		beginBranch->addXLink (this);
   11.23  		endBranch->addXLink (this);
   11.24 @@ -291,8 +286,6 @@
   11.25  			s+=endElement ("xlink");
   11.26  		}
   11.27  	}
   11.28 -	//FIXME testing
   11.29 -	//cout << s<<endl;
   11.30  	return s;
   11.31  }
   11.32  
    12.1 --- a/xml.cpp	Mon May 23 15:28:20 2005 +0000
    12.2 +++ b/xml.cpp	Mon May 30 05:39:10 2005 +0000
    12.3 @@ -554,7 +554,7 @@
    12.4  			success=true; // Not all branches there yet, no error
    12.5  		}           
    12.6  	}	
    12.7 -	delete (xlo);
    12.8 +	if (!success) delete (xlo);
    12.9  	return success;
   12.10  }
   12.11