1.1 --- a/linkablemapobj.cpp Thu Mar 23 12:38:54 2006 +0000
1.2 +++ b/linkablemapobj.cpp Thu Mar 23 12:38:55 2006 +0000
1.3 @@ -403,6 +403,8 @@
1.4 QCanvasLine* cl;
1.5 MapObj::setVisibility (v);
1.6 bool visnow=visible;
1.7 +
1.8 + // We can hide the link, while object is not selected
1.9 if (hideLinkUnselected && !selected)
1.10 visnow=false;
1.11
1.12 @@ -787,7 +789,8 @@
1.13 setSelBox();
1.14 selected=true;
1.15 selbox->show();
1.16 - setVisibility (visible);
1.17 +// FIXME not needed?
1.18 +// setVisibility (visible);
1.19 }
1.20
1.21
1.22 @@ -795,7 +798,8 @@
1.23 {
1.24 selected=false;
1.25 selbox->hide();
1.26 - setVisibility (visible);
1.27 +// FIXME not needed?
1.28 +// setVisibility (visible);
1.29 }
1.30
1.31 void LinkableMapObj::parabel (QPointArray &ya, double p1x, double p1y, double p2x, double p2y)
2.1 --- a/main.cpp Thu Mar 23 12:38:54 2006 +0000
2.2 +++ b/main.cpp Thu Mar 23 12:38:55 2006 +0000
2.3 @@ -103,6 +103,7 @@
2.4 QAction *actionSettingsAutoedit;
2.5 QAction *actionSettingsUseDelKey;
2.6 QAction *actionSettingsUseFlagGroups;
2.7 +QAction *actionSettingsUseHideExport;
2.8
2.9 QPopupMenu *branchContextMenu;
2.10 QPopupMenu *branchAddContextMenu;
3.1 --- a/mainwindow.cpp Thu Mar 23 12:38:54 2006 +0000
3.2 +++ b/mainwindow.cpp Thu Mar 23 12:38:55 2006 +0000
3.3 @@ -160,6 +160,7 @@
3.4 extern QAction* actionSettingsPasteNewHeading;
3.5 extern QAction* actionSettingsUseDelKey;
3.6 extern QAction* actionSettingsUseFlagGroups;
3.7 +extern QAction* actionSettingsUseHideExport;
3.8
3.9 extern QPopupMenu* branchContextMenu;
3.10 extern QPopupMenu* branchAddContextMenu;
3.11 @@ -298,6 +299,7 @@
3.12 settings.writeEntry( "/vym/mapeditor/editmode/autoedit",actionSettingsAutoedit->isOn() );
3.13 settings.writeEntry( "/vym/mapeditor/editmode/useDelKey",actionSettingsUseDelKey->isOn() );
3.14 settings.writeEntry( "/vym/mapeditor/editmode/useFlagGroups",actionSettingsUseFlagGroups->isOn() );
3.15 + settings.writeEntry( "/vym/export/useHideExport",actionSettingsUseHideExport->isOn() );
3.16
3.17 QString s;
3.18 int maps=lastMaps.count();
3.19 @@ -1057,6 +1059,12 @@
3.20 a->setOn ( settings.readBoolEntry ("/vym/mapeditor/editmode/useFlagGroups",true) );
3.21 a->addTo( menu );
3.22 actionSettingsUseFlagGroups=a;
3.23 +
3.24 + a= new QAction( tr( "Use hide flag during exports " ), QPixmap(), tr( "Use hide flags" ), 0, this, "hideexport" );
3.25 + a->setToggleAction(true);
3.26 + a->setOn ( settings.readBoolEntry ("/vym/export/useHideExport",true) );
3.27 + a->addTo( menu );
3.28 + actionSettingsUseHideExport=a;
3.29 }
3.30
3.31 // Test Actions
3.32 @@ -1863,7 +1871,8 @@
3.33
3.34 void Main::fileExportHTML()
3.35 {
3.36 - if (currentMapEditor())
3.37 + MapEditor *me=currentMapEditor();
3.38 + if (me)
3.39 {
3.40 ExportHTMLDialog dia(this);
3.41
3.42 @@ -1872,8 +1881,10 @@
3.43 QString dir=dia.getDir();
3.44 if (reallyWriteDirectory(dir) )
3.45 {
3.46 - currentMapEditor()->exportXML (dia.getDir() );
3.47 - dia.doExport(currentMapEditor()->getMapName() );
3.48 + me->setExportMode (true);
3.49 + me->exportXML (dia.getDir() );
3.50 + dia.doExport(me->getMapName() );
3.51 + me->setExportMode (false);
3.52 }
3.53 }
3.54 }
3.55 @@ -1881,12 +1892,13 @@
3.56
3.57 void Main::fileExportXHTML()
3.58 {
3.59 + MapEditor *me=currentMapEditor();
3.60 QString dir;
3.61 - if (currentMapEditor())
3.62 + if (me)
3.63 {
3.64 ExportXHTMLDialog dia(this);
3.65 - dia.setFilePath (currentMapEditor()->getFilePath() );
3.66 - dia.setMapName (currentMapEditor()->getMapName() );
3.67 + dia.setFilePath (me->getFilePath() );
3.68 + dia.setMapName (me->getMapName() );
3.69 dia.readSettings();
3.70
3.71 if (dia.exec()==QDialog::Accepted)
3.72 @@ -1902,10 +1914,10 @@
3.73
3.74 if (ok)
3.75 {
3.76 - currentMapEditor()->exportXML (dia.getDir() );
3.77 - dia.doExport(currentMapEditor()->getMapName() );
3.78 + me->exportXML (dia.getDir() );
3.79 + dia.doExport(me->getMapName() );
3.80 if (dia.hasChanged())
3.81 - currentMapEditor()->setChanged();
3.82 + me->setChanged();
3.83 }
3.84 }
3.85 }
3.86 @@ -1913,12 +1925,13 @@
3.87
3.88 void Main::fileExportImage(int item)
3.89 {
3.90 - if (currentMapEditor())
3.91 + MapEditor *me=currentMapEditor();
3.92 + if (me)
3.93 {
3.94 QString fn = QFileDialog::getSaveFileName( QString::null, "Image (*.bmp *.jpg *.pbm *.pgm *.png *.ppm *xbm *.xpm)",
3.95 this );
3.96 if ( !fn.isEmpty() )
3.97 - currentMapEditor()->exportImage(fn,item);
3.98 + me->exportImage(fn,item);
3.99 else
3.100 statusBar()->message( tr("Couldn't save %1").arg(fn), statusbarTime );
3.101
3.102 @@ -1927,34 +1940,47 @@
3.103
3.104 void Main::fileExportASCII()
3.105 {
3.106 - if (currentMapEditor())
3.107 + MapEditor *me=currentMapEditor();
3.108 + if (me)
3.109 {
3.110 ExportASCII ex;
3.111 - ex.setMapCenter(currentMapEditor()->getMapCenter());
3.112 + ex.setMapCenter(me->getMapCenter());
3.113 ex.addFilter ("TXT (*.txt)");
3.114 ex.setCaption(__VYM " -" +tr("Export as ASCII")+" "+tr("(still experimental)"));
3.115 - if (ex.execDialog() ) ex.doExport();
3.116 + if (ex.execDialog() )
3.117 + {
3.118 + me->setExportMode(true);
3.119 + ex.doExport();
3.120 + me->setExportMode(false);
3.121 + }
3.122 }
3.123 }
3.124
3.125 void Main::fileExportLaTeX()
3.126 {
3.127 - if (currentMapEditor())
3.128 + MapEditor *me=currentMapEditor();
3.129 + if (me)
3.130 {
3.131 ExportLaTeX ex;
3.132 - ex.setMapCenter(currentMapEditor()->getMapCenter());
3.133 + ex.setMapCenter(me->getMapCenter());
3.134 ex.addFilter ("Tex (*.tex)");
3.135 ex.setCaption(__VYM " -" +tr("Export as LaTeX")+" "+tr("(still experimental)"));
3.136 - if (ex.execDialog() ) ex.doExport();
3.137 + if (ex.execDialog() )
3.138 + {
3.139 + me->setExportMode(true);
3.140 + ex.doExport();
3.141 + me->setExportMode(false);
3.142 + }
3.143 }
3.144 }
3.145
3.146 void Main::fileExportKDEBookmarks()
3.147 {
3.148 ExportKDEBookmarks ex;
3.149 - if (currentMapEditor())
3.150 + MapEditor *me=currentMapEditor();
3.151 + if (me)
3.152 {
3.153 - ex.setMapCenter (currentMapEditor()->getMapCenter() );
3.154 + ex.setMapCenter (me->getMapCenter() );
3.155 ex.doExport();
3.156 }
3.157 }
3.158 @@ -1962,12 +1988,18 @@
3.159 void Main::fileExportTaskjuggler()
3.160 {
3.161 ExportTaskjuggler ex;
3.162 - if (currentMapEditor())
3.163 + MapEditor *me=currentMapEditor();
3.164 + if (me)
3.165 {
3.166 - ex.setMapCenter (currentMapEditor()->getMapCenter() );
3.167 + ex.setMapCenter (me->getMapCenter() );
3.168 ex.setCaption ( __VYM " - "+tr("Export to")+" Taskjuggler"+tr("(still experimental)"));
3.169 ex.addFilter ("Taskjuggler (*.tjp)");
3.170 - if (ex.execDialog()) ex.doExport();
3.171 + if (ex.execDialog() )
3.172 + {
3.173 + me->setExportMode(true);
3.174 + ex.doExport();
3.175 + me->setExportMode(false);
3.176 + }
3.177 }
3.178 }
3.179
4.1 --- a/mapeditor.cpp Thu Mar 23 12:38:54 2006 +0000
4.2 +++ b/mapeditor.cpp Thu Mar 23 12:38:55 2006 +0000
4.3 @@ -219,6 +219,9 @@
4.4
4.5 blockReposition=false;
4.6 blockSaveState=false;
4.7 +
4.8 + hidemode=HideNone;
4.9 +
4.10 isInteractive=interactive;
4.11 if (isInteractive)
4.12 // Create temporary files
4.13 @@ -1038,13 +1041,39 @@
4.14 return pix;
4.15 }
4.16
4.17 +void MapEditor::setHideTmpMode (HideTmpMode mode)
4.18 +{
4.19 + hidemode=mode;
4.20 + mapCenter->setHideTmp (hidemode);
4.21 + mapCenter->reposition();
4.22 + adjustCanvasSize();
4.23 + canvas()->update();
4.24 +}
4.25 +
4.26 +HideTmpMode MapEditor::getHideTmpMode()
4.27 +{
4.28 + return hidemode;
4.29 +}
4.30 +
4.31 void MapEditor::exportImage(QString fn)
4.32 {
4.33 // Finish open lineEdits
4.34 if (lineedit) finishedLineEditNoSave();
4.35
4.36 + setExportMode (true);
4.37 QPixmap pix (getPixmap());
4.38 pix.save(fn, "PNG");
4.39 + setExportMode (false);
4.40 +}
4.41 +
4.42 +void MapEditor::setExportMode (bool b)
4.43 +{
4.44 + // should be called before and after exports
4.45 + // depending on the settings
4.46 + if (b && settings.readEntry("/vym/export/useHideExport","yes"))
4.47 + setHideTmpMode (HideExport);
4.48 + else
4.49 + setHideTmpMode (HideNone);
4.50 }
4.51
4.52 void MapEditor::exportImage(QString fn, int item)
4.53 @@ -1052,8 +1081,10 @@
4.54 // Finish open lineEdits
4.55 if (lineedit) finishedLineEditNoSave();
4.56
4.57 + setExportMode (true);
4.58 QPixmap pix (getPixmap());
4.59 pix.save(fn, exportImageFormatMenu->text(item) );
4.60 + setExportMode (false);
4.61 }
4.62
4.63 void MapEditor::exportOOPresentation(const QString &fn, const QString &cf)
4.64 @@ -1061,13 +1092,21 @@
4.65 ExportOO ex;
4.66 ex.setFile (fn);
4.67 ex.setMapCenter(mapCenter);
4.68 - if (ex.setConfigFile(cf)) ex.exportPresentation();
4.69 + if (ex.setConfigFile(cf))
4.70 + {
4.71 + setExportMode (true);
4.72 + ex.exportPresentation();
4.73 + setExportMode (false);
4.74 + }
4.75 }
4.76
4.77
4.78
4.79 void MapEditor::exportXML(const QString &dir)
4.80 {
4.81 + // Hide stuff during export, if settings want this
4.82 + setExportMode (true);
4.83 +
4.84 // Create subdirectories
4.85 makeSubDirs (dir);
4.86
4.87 @@ -1091,6 +1130,8 @@
4.88
4.89 // Now write image, too
4.90 exportImage (dir+"/images/"+mapName+".png");
4.91 +
4.92 + setExportMode (false);
4.93 }
4.94
4.95 void MapEditor::clear()
4.96 @@ -2970,15 +3011,30 @@
4.97 void MapEditor::testFunction()
4.98 {
4.99 cout << "MapEditor::testFunction() called\n";
4.100 - mapCenter->reposition();
4.101 - adjustCanvasSize();
4.102 -
4.103 - /*
4.104 - if (selection && (typeid(*selection) == typeid(BranchObj)))
4.105 +
4.106 + if (hidemode==HideNone)
4.107 {
4.108 - cout << "Note:\n"<<((BranchObj*)selection)->getNoteOpenDoc()<<endl;
4.109 - }
4.110 - */
4.111 + setHideTmpMode (HideExport);
4.112 + mapCenter->calcBBoxSizeWithChilds();
4.113 + QRect totalBBox=mapCenter->getTotalBBox();
4.114 + QRect mapRect=totalBBox;
4.115 + QCanvasRectangle *frame=NULL;
4.116 +
4.117 + cout << " map has =("<<totalBBox.x()<<","<<totalBBox.y()<<","<<totalBBox.width()<<","<<totalBBox.height()<<")\n";
4.118 +
4.119 + mapRect.setRect (totalBBox.x(), totalBBox.y(),
4.120 + totalBBox.width(), totalBBox.height());
4.121 + frame=new QCanvasRectangle (mapRect,mapCanvas);
4.122 + frame->setBrush (QColor(white));
4.123 + frame->setPen (QColor(black));
4.124 + frame->setZ(0);
4.125 + frame->show();
4.126 + }
4.127 + else
4.128 + {
4.129 + setHideTmpMode (HideNone);
4.130 + }
4.131 + cout <<" hidemode="<<hidemode<<endl;
4.132 }
4.133
4.134 void MapEditor::ensureSelectionVisible()
5.1 --- a/mapeditor.h Thu Mar 23 12:38:54 2006 +0000
5.2 +++ b/mapeditor.h Thu Mar 23 12:38:55 2006 +0000
5.3 @@ -67,7 +67,10 @@
5.4 void print(); // print canvas
5.5 private:
5.6 QPixmap getPixmap();
5.7 + void setHideTmpMode (HideTmpMode); // temporary hide stuff
5.8 + HideTmpMode getHideTmpMode(); // temporary hide stuff
5.9 public:
5.10 + void setExportMode (bool); // temporary hide stuff during export
5.11 void exportImage (QString fn); // export as PNG
5.12 void exportImage (QString fn, int); // export in given format
5.13 void exportOOPresentation(const QString &,const QString &);
5.14 @@ -238,6 +241,8 @@
5.15 bool EOFind; // true, if search failed
5.16
5.17 QPoint exportOffset; // set before export, used in save
5.18 + HideTmpMode hidemode; // true while exporting to hide some stuff
5.19 +
5.20 void resizeEvent( QResizeEvent * );
5.21
5.22 QUrlOperator *urlOperator;
6.1 --- a/ornamentedobj.cpp Thu Mar 23 12:38:54 2006 +0000
6.2 +++ b/ornamentedobj.cpp Thu Mar 23 12:38:55 2006 +0000
6.3 @@ -55,6 +55,7 @@
6.4 standardFlags->setName ("standardFlags");
6.5
6.6 hideExport=false;
6.7 + hidden=false;
6.8
6.9 url="";
6.10 vymLink="";
6.11 @@ -309,14 +310,18 @@
6.12
6.13 void OrnamentedObj::setHideInExport(bool b)
6.14 {
6.15 - hideExport=b;
6.16 - if (b)
6.17 - systemFlags->activate("hideInExport");
6.18 - else
6.19 - systemFlags->deactivate("hideInExport");
6.20 - calcBBoxSize();
6.21 - positionBBox();
6.22 - requestReposition();
6.23 + if (parObj)
6.24 + {
6.25 + // Don't allow to MapCenter to be hidden
6.26 + hideExport=b;
6.27 + if (b)
6.28 + systemFlags->activate("hideInExport");
6.29 + else
6.30 + systemFlags->deactivate("hideInExport");
6.31 + calcBBoxSize();
6.32 + positionBBox();
6.33 + requestReposition();
6.34 + }
6.35 }
6.36
6.37 bool OrnamentedObj::hideInExport()
6.38 @@ -324,6 +329,11 @@
6.39 return hideExport;
6.40 }
6.41
6.42 +bool OrnamentedObj::isHidden()
6.43 +{
6.44 + return hidden;
6.45 +}
6.46 +
6.47 QString OrnamentedObj::getOrnAttr()
6.48 {
6.49 QString posAttr;
7.1 --- a/ornamentedobj.h Thu Mar 23 12:38:54 2006 +0000
7.2 +++ b/ornamentedobj.h Thu Mar 23 12:38:55 2006 +0000
7.3 @@ -40,6 +40,7 @@
7.4 virtual void updateNoteFlag();
7.5 virtual void setHideInExport(bool); // set export of object (and childs)
7.6 virtual bool hideInExport();
7.7 + virtual bool isHidden ();
7.8 virtual QString getOrnAttr(); // get attributes for saveToDir
7.9
7.10 protected:
7.11 @@ -51,6 +52,7 @@
7.12 QString url; // url to external doc
7.13 QString vymLink; // path to another map
7.14 bool hideExport; // hide in exports if set
7.15 + bool hidden; // true if temporary hidden
7.16 };
7.17
7.18 #endif
8.1 --- a/tex/vym.changelog Thu Mar 23 12:38:54 2006 +0000
8.2 +++ b/tex/vym.changelog Thu Mar 23 12:38:55 2006 +0000
8.3 @@ -1,3 +1,12 @@
8.4 +-------------------------------------------------------------------
8.5 +Thu Mar 23 13:26:46 CET 2006 - uwedr
8.6 +
8.7 +- Version 1.7.12
8.8 +- Bugfix: Problem with vymlinks pointing to higher directories (#159770)
8.9 +- Bugfix: All exports support hiding of objects now
8.10 +- Bugfix: exportDir in XHTML export is correctly saved in map and
8.11 + defaults to current directory
8.12 +
8.13 -------------------------------------------------------------------
8.14 Wed Mar 15 11:43:02 CET 2006 - uwedr
8.15
9.1 --- a/tex/vym.tex Thu Mar 23 12:38:54 2006 +0000
9.2 +++ b/tex/vym.tex Thu Mar 23 12:38:55 2006 +0000
9.3 @@ -107,7 +107,7 @@
9.4 In our science oriented society we have learned to mainly rely on our
9.5 left side of the brain, the "rational" one. In other cultures,
9.6 especially like the native americans and other "old" cultures, the right
9.7 -side is much more important. maps are just one way to stimulate the
9.8 +side is much more important. Maps are just one way to stimulate the
9.9 other side and make use of additional ressources we all have.
9.10
9.11
9.12 @@ -202,8 +202,8 @@
9.13 There are also more flags set by \vym automatically to show additional
9.14 information, e.g. when a exists for a particular branch.
9.15
9.16 -By default some of these flags are set exclusively e.g. when the \lq
9.17 -thumb-up\rq flag is set, then the \lq thumb down\rq is unset and vice
9.18 +By default some of these flags are set exclusively e.g. when the
9.19 +"thumb-up" flag is set, then the "thumb down" is unset and vice
9.20 versa. You can change this default behaviour in the settings menu.
9.21
9.22 %TODO add info about toolbars e.g. undo/redo, ...
9.23 @@ -278,7 +278,7 @@
9.24 fails, there will appear a short message "Nothing found" or a few
9.25 seconds in the {\em statusbar} on the bottom of the mapeditor.
9.26
9.27 -\subsubsection*{Scroll a part of the map}
9.28 +\subsubsection*{Keep the overview -- scroll a part of the map}
9.29 A very big subtree of a map e.g. a branch with hundreds of childs makes
9.30 it very hard to keep an overview over the whole map. You can hide all
9.31 the childs of a branch by {\em scrolling} it -- this function is also
9.32 @@ -302,7 +302,7 @@
9.33
9.34
9.35 \subsection{Modify and move branches}
9.36 -\subsubsection*{Modify the heading of a branch}
9.37 +\subsubsection*{Modify the heading}
9.38 You can edit the heading by selecting the branch and then
9.39 \begin{itemize}
9.40 \item pressing \key{Enter}
9.41 @@ -475,12 +475,15 @@
9.42 of the map is always painted "thin".
9.43
9.44
9.45 -\subsection{Link to other documents}
9.46 -Presently \vym supports two kind of links:
9.47 +\subsection{Links to other documents and webpages}
9.48 +\vym supports two kind of external links:
9.49 \begin{itemize}
9.50 \item Document, which will be opened in an external webbrowser
9.51 \item \vym map, which will be opened in \vym itself
9.52 \end{itemize}
9.53 +In addition to the external links there also internal ones, leading from one
9.54 +branch in a map toanother one. Those are called {\em XLinks} and are explained
9.55 +in section~\ref{xlinks}.
9.56
9.57 \subsubsection*{Webbrowser}
9.58 Modern Webbrowsers like {\tt konqueror} are able to display various
9.59 @@ -799,7 +802,7 @@
9.60 modifier lets you create {\em xLinks}, which will be explained in the
9.61 next section.
9.62
9.63 -\subsection{XLinks}
9.64 +\subsection{XLinks} \label{xlinks}
9.65 So far all the data in the \vym map has been treelike. Using xLinks you
9.66 can link one branch to any other, just like attaching a rope between two
9.67 branches in a real tree. This is especially useful in complex maps,
9.68 @@ -887,6 +890,13 @@
9.69 \begin{appendix}
9.70
9.71 \section{Contributing to \vym}
9.72 +So far I'd say I have written 98\% of the code on my own. No surprise,
9.73 +that \vym exactly fits my own needs. Nevertheless I would like to
9.74 +encourage all users of \vym to contribute. Maybe not only with feature
9.75 +requests, but also with code, new import/export filters, translations
9.76 +etc. In this appendix I'll try to show how easy it is to expand the
9.77 +things you can do already with \vym. I really look forward to hear from
9.78 +you!
9.79
9.80 \subsection{Getting help}
9.81
9.82 @@ -909,7 +919,7 @@
9.83 Especially for support questions please try the mailinglists first. If
9.84 everything else fails you can contact the Uwe Drechsel at
9.85 \begin{center}
9.86 -\href{mailto:vym@InSilmaril.de}{vym@Insilmaril.de}
9.87 +\href{mailto:vym@InSilmaril.de}{vym@InSilmaril.de}
9.88 \end{center}
9.89
9.90
9.91 @@ -947,7 +957,8 @@
9.92 The last command {\tt make install} needs root-permissions. Of course it
9.93 may be omitted, if you just want to test \vym.
9.94
9.95 -\subsubsection*{Compiling \vym on Macs}
9.96 +%\subsubsection*{Compiling \vym on Macs}
9.97 +%TODO
9.98
9.99 \subsection{\vym file format} \label{fileformat}
9.100 \vym maps usually have the postfix "{\tt .vym}" and represent a
9.101 @@ -1044,8 +1055,10 @@
9.102 {\tt MapEditor::saveToDir} in {\tt mapeditor.cpp}.
9.103
9.104
9.105 -\subsubsection{Templates}
9.106 -\subsubsection{XSL Transformation}
9.107 +%\subsubsection{Templates}
9.108 +%TODO
9.109 +%\subsubsection{XSL Transformation}
9.110 +%TODO
9.111
9.112
9.113 \end{appendix}
10.1 --- a/version.h Thu Mar 23 12:38:54 2006 +0000
10.2 +++ b/version.h Thu Mar 23 12:38:55 2006 +0000
10.3 @@ -2,7 +2,7 @@
10.4 #define VERSION_H
10.5
10.6 #define __VYM "VYM"
10.7 -#define __VYM_VERSION "1.7.11"
10.8 -#define __BUILD_DATE "March 14, 2006"
10.9 +#define __VYM_VERSION "1.7.12"
10.10 +#define __BUILD_DATE "March 23, 2006"
10.11
10.12 #endif