Updated documentation about macros
authorinsilmaril
Wed, 11 Apr 2007 09:21:14 +0000
changeset 450beb875135811
parent 449 5378ed53ec92
child 451 a76dcf52f15e
Updated documentation about macros
LICENSE
aboutdialog.cpp
mainwindow.cpp
mainwindow.h
mapeditor.cpp
tex/branches-flags.png
tex/branches.png
tex/color-buttons.png
tex/default-flags.png
tex/example1.png
tex/examples/macros.vym
tex/export-oo.png
tex/find-window.png
tex/flag-hideexport.png
tex/flag-url.png
tex/flag-vymlink.png
tex/formatfixedfont.png
tex/hiddenlink.png
tex/includeImages.png
tex/modmodes.png
tex/move-buttons.png
tex/noteeditor.png
tex/vym-logo-new.png
tex/vym.tex
tex/windows.png
tex/xlink.png
tex/zoom-buttons.png
version.h
     1.1 --- a/LICENSE	Tue Apr 10 13:22:55 2007 +0000
     1.2 +++ b/LICENSE	Wed Apr 11 09:21:14 2007 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4      VYM - View Your Mind
     1.5 -    Copyright (C) 2004-2005  Uwe Drechsel  
     1.6 +    Copyright (C) 2004-2007  Uwe Drechsel  
     1.7  
     1.8      This program is free software; you can redistribute it and/or modify
     1.9      it under the terms of the GNU General Public License as published by
     2.1 --- a/aboutdialog.cpp	Tue Apr 10 13:22:55 2007 +0000
     2.2 +++ b/aboutdialog.cpp	Wed Apr 11 09:21:14 2007 +0000
     2.3 @@ -56,7 +56,7 @@
     2.4      license->setText (
     2.5  	"<center>"
     2.6  	"<h3>VYM - View Your Mind</h3>"
     2.7 -    "<p>Copyright (C) 2004-2006  Uwe Drechsel</p>"  
     2.8 +    "<p>Copyright (C) 2004-2007  Uwe Drechsel</p>"  
     2.9  	"</center>"
    2.10  
    2.11      "<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p>"
     3.1 --- a/mainwindow.cpp	Tue Apr 10 13:22:55 2007 +0000
     3.2 +++ b/mainwindow.cpp	Wed Apr 11 09:21:14 2007 +0000
     3.3 @@ -1375,6 +1375,11 @@
     3.4      connect( a, SIGNAL( triggered() ), this, SLOT( settingsURL() ) );
     3.5  	settingsMenu->addAction (a);
     3.6  
     3.7 +    a = new QAction( tr( "Set path for macros","Settings action"), this);
     3.8 +    a->setStatusTip( tr( "Set path for macros"));
     3.9 +    connect( a, SIGNAL( triggered() ), this, SLOT( settingsMacroDir() ) );
    3.10 +	settingsMenu->addAction (a);
    3.11 +
    3.12  	settingsMenu->addSeparator();
    3.13      a = new QAction( tr( "Edit branch after adding it","Settings action" ), this );
    3.14      a->setStatusTip( tr( "Edit branch after adding it" ));
    3.15 @@ -2287,7 +2292,6 @@
    3.16  		if (fd->exec())
    3.17  		{
    3.18  			fl=fd->selectedFiles();
    3.19 -			qWarning ("Selected "+fl.first()+"  filter: "+fd->selectedFilter());
    3.20  			me->exportImage (fl.first(), imageIO.getType (fd->selectedFilter() ) );
    3.21  		} 
    3.22  	}
    3.23 @@ -3194,6 +3198,21 @@
    3.24  	return ok;
    3.25  }
    3.26  
    3.27 +void Main::settingsMacroDir()
    3.28 +{
    3.29 +	QDir defdir=vymBaseDir;
    3.30 +	defdir.cd("macros");
    3.31 +	if (!defdir.exists())
    3.32 +		defdir=vymBaseDir;
    3.33 +	QDir dir=QFileDialog::getExistingDirectory (
    3.34 +		this,
    3.35 +		tr ("Directory with vym macros:"), 
    3.36 +		settings.value ("/macros/macroDir",defdir.path()).toString()
    3.37 +	);
    3.38 +	if (dir.exists())
    3.39 +		settings.setValue ("/macros/macroDir",dir.path());
    3.40 +}
    3.41 +
    3.42  void Main::settingsToggleDelKey()
    3.43  {
    3.44  	if (actionSettingsUseDelKey->isOn())
     4.1 --- a/mainwindow.h	Tue Apr 10 13:22:55 2007 +0000
     4.2 +++ b/mainwindow.h	Wed Apr 11 09:21:14 2007 +0000
     4.3 @@ -161,6 +161,7 @@
     4.4  public slots:
     4.5  	bool settingsPDF();
     4.6  	bool settingsURL();
     4.7 +	void settingsMacroDir();
     4.8  	void settingsToggleDelKey();
     4.9  
    4.10  	void windowToggleNoteEditor();
     5.1 --- a/mapeditor.cpp	Tue Apr 10 13:22:55 2007 +0000
     5.2 +++ b/mapeditor.cpp	Wed Apr 11 09:21:14 2007 +0000
     5.3 @@ -536,7 +536,6 @@
     5.4  		}	
     5.5  	} else if (com=="colorSubtree")
     5.6  	{
     5.7 -		cout << "atom="<< atom.ascii()<<endl;
     5.8  		if (xelection.isEmpty())
     5.9  		{
    5.10  			parser.setError (Aborted,"Nothing selected");
    5.11 @@ -1356,7 +1355,7 @@
    5.12  QPixmap MapEditor::getPixmap()
    5.13  {
    5.14  	QRectF mapRect=mapCenter->getTotalBBox();
    5.15 -	QPixmap pix((int)mapRect.width(),(int)mapRect.height());
    5.16 +	QPixmap pix((int)mapRect.width()+2,(int)mapRect.height()+2);
    5.17  	QPainter pp (&pix);
    5.18  	
    5.19  	pp.setRenderHints(renderHints());
    5.20 @@ -1365,13 +1364,9 @@
    5.21  	xelection.unselect();
    5.22  
    5.23  	mapScene->render (	&pp, 
    5.24 -		QRectF(0,0,mapRect.width(),mapRect.height()),
    5.25 +		QRectF(0,0,mapRect.width()+2,mapRect.height()+2),
    5.26  		QRectF(mapRect.x(),mapRect.y(),mapRect.width(),mapRect.height() ));
    5.27  
    5.28 -//	mapScene->render(&pp);	// draw scene to painter
    5.29 -
    5.30 -
    5.31 -
    5.32  	// Restore selection
    5.33  	xelection.reselect();
    5.34  	
     6.1 Binary file tex/branches-flags.png has changed
     7.1 Binary file tex/branches.png has changed
     8.1 Binary file tex/color-buttons.png has changed
     9.1 Binary file tex/default-flags.png has changed
    10.1 Binary file tex/example1.png has changed
    11.1 Binary file tex/examples/macros.vym has changed
    12.1 Binary file tex/export-oo.png has changed
    13.1 Binary file tex/find-window.png has changed
    14.1 Binary file tex/flag-hideexport.png has changed
    15.1 Binary file tex/flag-url.png has changed
    16.1 Binary file tex/flag-vymlink.png has changed
    17.1 Binary file tex/formatfixedfont.png has changed
    18.1 Binary file tex/hiddenlink.png has changed
    19.1 Binary file tex/includeImages.png has changed
    20.1 Binary file tex/modmodes.png has changed
    21.1 Binary file tex/move-buttons.png has changed
    22.1 Binary file tex/noteeditor.png has changed
    23.1 Binary file tex/vym-logo-new.png has changed
    24.1 --- a/tex/vym.tex	Tue Apr 10 13:22:55 2007 +0000
    24.2 +++ b/tex/vym.tex	Wed Apr 11 09:21:14 2007 +0000
    24.3 @@ -32,9 +32,9 @@
    24.4  
    24.5  \begin{document}
    24.6  \title{
    24.7 -	\includegraphics[width=8cm]{vym-logo-new.png}
    24.8 +	\includegraphics[width=8cm]{images/vym-logo-new.png}
    24.9  	\\
   24.10 -VYM \\ -- \\View Your Mind\\ {\small Version 1.8.0}}
   24.11 +VYM \\ -- \\View Your Mind\\ {\small Version 1.8.71}}
   24.12  \author{\textcopyright Uwe Drechsel  }
   24.13  
   24.14  
   24.15 @@ -50,7 +50,7 @@
   24.16  \subsection{What is a \vym map?}
   24.17  A \vym map (in short words {\em map}) is a tree like structure:
   24.18  \begin{center}
   24.19 -	\includegraphics[width=12cm]{example1.png}
   24.20 +	\includegraphics[width=12cm]{images/example1.png}
   24.21  \end{center}
   24.22  Such maps can be drawn by hand on a paper or flip chart and help to
   24.23  structure your thoughts. While a tree like structure like above can be
   24.24 @@ -152,7 +152,7 @@
   24.25  notes, which are part of the map. Let's call them {\em mapeditor} and
   24.26  {\em noteeditor}: 
   24.27  \begin{center}
   24.28 -	\includegraphics[width=8cm]{windows.png}
   24.29 +	\includegraphics[width=8cm]{images/windows.png}
   24.30  \end{center}
   24.31  Usually you will work in the {\em mapeditor} by just adding new
   24.32  branches, moving around and reordering them. The various ways to do this
   24.33 @@ -190,7 +190,7 @@
   24.34  mapcenter has {\em branches} just like the trunk of a tree. Each branch
   24.35  in turn may have branches again.
   24.36  \begin{center}
   24.37 -	\includegraphics[width=10cm]{branches.png}
   24.38 +	\includegraphics[width=10cm]{images/branches.png}
   24.39  \end{center}
   24.40  We will call a branch directly connected to the mapcenter a {\em
   24.41  mainbranch}, because it determines the position of all its child
   24.42 @@ -203,7 +203,7 @@
   24.43  
   24.44  In the toolbar above the mapeditor you see various symbols.
   24.45  \begin{center}
   24.46 -	\includegraphics[width=8cm]{default-flags.png}
   24.47 +	\includegraphics[width=8cm]{images/default-flags.png}
   24.48  \end{center}
   24.49  These are called {\em flags} and can be used to mark branches in the
   24.50  map, e.g. if something is important or questionable. 
   24.51 @@ -215,6 +215,7 @@
   24.52  versa. You can change this default behaviour in the settings menu.
   24.53  
   24.54  %TODO add info about toolbars e.g. undo/redo, ...
   24.55 +%TODO or reference to advanced editing undo/redo
   24.56  
   24.57  \section{Mapeditor} \label {mapeditor}
   24.58  \subsection{Start a new map}
   24.59 @@ -268,7 +269,7 @@
   24.60  	\item from the menu View \ra Zoom
   24.61  	\item the toolbar buttons 
   24.62  		\begin{center}
   24.63 -			\includegraphics[width=3cm]{zoom-buttons.png}
   24.64 +			\includegraphics[width=3cm]{images/zoom-buttons.png}
   24.65  		\end{center}	
   24.66  \end{itemize}	
   24.67  The crossed magnifying lens resets the zoomed view to its original size.
   24.68 @@ -278,7 +279,7 @@
   24.69  With huge maps there is the need to have a
   24.70  find function. Choose Edit \ra Find to open the Find Window:
   24.71  \begin{center}
   24.72 -	\includegraphics[width=6cm]{find-window.png}
   24.73 +	\includegraphics[width=6cm]{images/find-window.png}
   24.74  \end{center}	
   24.75  The text you enter here will be searched in all the headings and also in
   24.76  notes. Everytime you press the "Find"-button it will look for the next
   24.77 @@ -349,7 +350,7 @@
   24.78  	\item selecting Edit \ra Move branch
   24.79  	\item clicking on the toolbar buttons:
   24.80  		\begin{center}
   24.81 -			\includegraphics[width=1.5cm]{move-buttons.png}
   24.82 +			\includegraphics[width=1.5cm]{images/move-buttons.png}
   24.83  		\end{center}	
   24.84  \end{itemize}
   24.85  %tipp
   24.86 @@ -366,7 +367,7 @@
   24.87  	\item use the menu and choose e.g Format \rq Set Color
   24.88  	\item use the toolbar
   24.89  		\begin{center}
   24.90 -			\includegraphics[width=3cm]{color-buttons.png}
   24.91 +			\includegraphics[width=3cm]{images/color-buttons.png}
   24.92  		\end{center}	
   24.93  \end{itemize}
   24.94  The first button (black in the graphic above) shows the actual color.
   24.95 @@ -391,7 +392,7 @@
   24.96  left or the right side of the window or even detach them. Just grab the
   24.97  very left "dotted" part of the toolbar with your left-mouse button.) 
   24.98  \begin{center}
   24.99 -	\includegraphics[width=8cm]{default-flags.png}
  24.100 +	\includegraphics[width=8cm]{images/default-flags.png}
  24.101  \end{center}
  24.102  If you have a branch selected, you can set any number of flags by
  24.103  clicking them in the toolbar. The toolbar buttons change their state and
  24.104 @@ -510,7 +511,7 @@
  24.105  	The browser can be changed in the Settings Menu.}
  24.106  will be started.
  24.107  \begin{center}
  24.108 -	\includegraphics[width=0.5cm]{flag-url.png}
  24.109 +	\includegraphics[width=0.5cm]{images/flag-url.png}
  24.110  \end{center}
  24.111  For more information on working with bookmarks and webbrowsers see
  24.112  section \ref{bookmarks}.
  24.113 @@ -521,7 +522,7 @@
  24.114  Enter \vym link". A file dialog opens where you can choose the map. A
  24.115  branch with a link is marked with 
  24.116  \begin{center}
  24.117 -	\includegraphics[width=0.5cm]{flag-vymlink.png}
  24.118 +	\includegraphics[width=0.5cm]{images/flag-vymlink.png}
  24.119  \end{center}
  24.120  Clicking this flag in the toolbar or in the context menu of a branch
  24.121  will open the map in another tab (see \ref{tabs} for working with
  24.122 @@ -558,7 +559,7 @@
  24.123  cooking recipe, or the whole source code of a software project, you can
  24.124  use the noteeditor. 
  24.125  \begin{center}
  24.126 -	\includegraphics[width=8cm]{noteeditor.png}
  24.127 +	\includegraphics[width=8cm]{images/noteeditor.png}
  24.128  \end{center}
  24.129  This editor displays text associated to a branch selected in the
  24.130  mapeditor. To visualize that there maybe is no text yet, the noteeditor
  24.131 @@ -577,7 +578,7 @@
  24.132  information for a particular branch, a little note flag will appear next
  24.133  to the heading of the branch. See the lower branch on the right side:
  24.134  \begin{center}
  24.135 -	\includegraphics[width=8cm]{branches-flags.png}
  24.136 +	\includegraphics[width=8cm]{images/branches-flags.png}
  24.137  \end{center}
  24.138  
  24.139  \subsection{Import and export notes}
  24.140 @@ -616,7 +617,7 @@
  24.141  Both fonts can easily switched using the following symbol from the
  24.142  toolbar:
  24.143  \begin{center}
  24.144 -	\includegraphics[width=0.5cm]{formatfixedfont.png}
  24.145 +	\includegraphics[width=0.5cm]{images/formatfixedfont.png}
  24.146  \end{center}
  24.147  In the Settings menu both fonts can be set and also which font should be
  24.148  used for default. 
  24.149 @@ -682,7 +683,7 @@
  24.150  To achieve this you can "hide" parts of the map during exports by
  24.151  setting the "hide in export" flag.
  24.152  \begin{center}
  24.153 -	\includegraphics[width=0.5cm]{flag-hideexport.png}
  24.154 +	\includegraphics[width=0.5cm]{images/flag-hideexport.png}
  24.155  \end{center}
  24.156  You can toggle this flag in the toolbar or by pressing \key{H}.
  24.157  Note that there is a global option in the settings menu to toggle the
  24.158 @@ -699,7 +700,7 @@
  24.159  you get a file dialogue where you can choose the output file and the
  24.160  file type:
  24.161  \begin{center}
  24.162 -	\includegraphics[width=12cm]{export-oo.png}
  24.163 +	\includegraphics[width=12cm]{images/export-oo.png}
  24.164  \end{center}
  24.165  The file types represent various templates, which can be created with
  24.166  some manual work from an existing Open Office document. The structure of
  24.167 @@ -804,6 +805,19 @@
  24.168  \subsection{Changing the history: Undo and Redo}
  24.169  %FIXME
  24.170  
  24.171 +\subsection{Macros} \label{macros}
  24.172 +Macros have been added to \vym in version~1.9.0. Each function key
  24.173 +\key{F1} to \key{F12} holds a macro, which is executed on the current
  24.174 +selection if the key is pressed. The default macros change the color of
  24.175 +a subtree or set the frame of a branch:
  24.176 +\begin{center}
  24.177 +	\includegraphics[width=8cm]{images/macros.png}
  24.178 +\end{center}
  24.179 +Each macro is a \vym script, which is executed when the associated key
  24.180 +is pressed. The default location of the scripts can be changed in the
  24.181 +Settings menu. More information on using scripts in \vym is found in
  24.182 +appendix~\ref{scripts}.
  24.183 +
  24.184  \subsection{How to deal with Bookmarks} \label{bookmarks}
  24.185  \subsubsection*{Open new tabs instead of new windows}
  24.186  If you use konqueror as browser, \vym will remember the konqueror which
  24.187 @@ -848,7 +862,7 @@
  24.188  The image ist still positioned relatively to its parent branch, but the
  24.189  heading and border of the branch adapt to the floating image, see below: 
  24.190  \begin{center}
  24.191 -	\includegraphics[width=11cm]{includeImages.png}
  24.192 +	\includegraphics[width=11cm]{images/includeImages.png}
  24.193  \end{center}
  24.194  
  24.195  \subsection{Modifier Modes} 
  24.196 @@ -862,7 +876,7 @@
  24.197  it. For the behaviour of the \key{Ctrl} modifier there are several
  24.198  options, which can be set from the modifier toolbar:
  24.199  \begin{center}
  24.200 -	\includegraphics[width=3cm]{modmodes.png}
  24.201 +	\includegraphics[width=3cm]{images/modmodes.png}
  24.202  \end{center}
  24.203  The default  is to copy the color from the clicked branch to the already
  24.204  selected branch. In the toolbar shown above the default modifier is
  24.205 @@ -878,8 +892,10 @@
  24.206  mapcenter. This can be used e.g. for legends or a collection of vymLinks
  24.207  pointing to other maps:
  24.208  \begin{center}
  24.209 -	\includegraphics[width=9cm]{hiddenlink.png}
  24.210 +	\includegraphics[width=9cm]{images/hiddenlink.png}
  24.211  \end{center}
  24.212 +Change hiding of the links in the property window (opened in context
  24.213 +menu or with \key{CTRL-I} on the "links"-tab.
  24.214  
  24.215  
  24.216  \subsection{XLinks} \label{xlinks}
  24.217 @@ -892,7 +908,7 @@
  24.218  can be crosslinked. In the graphics there is a link from a task (prepare
  24.219  a presentation) to general information:
  24.220  \begin{center}
  24.221 -	\includegraphics[width=12cm]{xlink.png}
  24.222 +	\includegraphics[width=12cm]{images/xlink.png}
  24.223  \end{center}
  24.224  Note that a xLink which points to a branch that is not visible (because
  24.225  it is scrolled), is just show as a little horizontal arrow. In the
  24.226 @@ -1000,18 +1016,27 @@
  24.227  \subsection{Command line options} \label{options}
  24.228  \vym has the following options:
  24.229  \begin{center}
  24.230 -\begin{tabular}{ccp{8cm}}\\ 
  24.231 -\bf Option	& \bf Comment & \bf Description \\ \hline
  24.232 -v & version & Show version ov \vym\\
  24.233 -l & local	& Use local paths to stylesheets, translations, icons, 
  24.234 -              etc. instead of system paths. Useful for testing\\
  24.235 -h & help	& Show help\\
  24.236 -q & quit	& Quit immediatly after startup. Useful for benchmarks.\\
  24.237 +\begin{tabular}{cccp{8cm}}\\ 
  24.238 +\bf Option	& \bf Comment & \bf Argument & \bf Description \\ \hline
  24.239 +v & version &			& Show version ov \vym\\
  24.240 +l & local	&			& Use local paths to stylesheets, translations, icons, 
  24.241 +                          etc. instead of system paths. Useful for testing\\
  24.242 +h & help	&			& Show help\\
  24.243 +r & run 	& filename	& Run script\\
  24.244 +q & quit	&			& Quit immediatly after startup. Useful for benchmarks.\\
  24.245  \end{tabular}
  24.246  \end{center}
  24.247  You can also give several filenames at the commandline to let \vym open
  24.248  several maps at once.
  24.249   
  24.250 +
  24.251 + \section{Scripts} \label{scripts}
  24.252 + %FIXME
  24.253 +
  24.254 +
  24.255 +
  24.256 +
  24.257 +
  24.258  \section{Contributing to \vym}
  24.259  So far I'd say I have written 98\% of the code on my own. No surprise,
  24.260  that \vym exactly fits my own needs. Nevertheless I would like to
  24.261 @@ -1099,7 +1124,7 @@
  24.262  may be omitted, if you just want to test \vym.
  24.263  
  24.264  %\subsubsection*{Compiling \vym on Macs}
  24.265 -%TODO
  24.266 +%FIXME
  24.267  
  24.268  \subsection{\vym file format} \label{fileformat}
  24.269  \vym maps usually have the postfix "{\tt .vym}" and represent a
    25.1 Binary file tex/windows.png has changed
    26.1 Binary file tex/xlink.png has changed
    27.1 Binary file tex/zoom-buttons.png has changed
    28.1 --- a/version.h	Tue Apr 10 13:22:55 2007 +0000
    28.2 +++ b/version.h	Wed Apr 11 09:21:14 2007 +0000
    28.3 @@ -4,7 +4,7 @@
    28.4  #include <QString>
    28.5  
    28.6  #define __VYM_NAME "VYM"
    28.7 -#define __VYM_VERSION "1.8.71"
    28.8 +#define __VYM_VERSION "1.8.72"
    28.9  #define __VYM_BUILD_DATE "April 10, 2007"
   28.10  
   28.11