# HG changeset patch # User insilmaril # Date 1143117535 0 # Node ID 69d648a0a15b16e2123c4f28f2eb1ab41235f1c1 # Parent 359217d2a49b8ef6c411394835dab3b3fb5509d7 Version 1.7.12 diff -r 359217d2a49b -r 69d648a0a15b linkablemapobj.cpp --- a/linkablemapobj.cpp Thu Mar 23 12:38:54 2006 +0000 +++ b/linkablemapobj.cpp Thu Mar 23 12:38:55 2006 +0000 @@ -403,6 +403,8 @@ QCanvasLine* cl; MapObj::setVisibility (v); bool visnow=visible; + + // We can hide the link, while object is not selected if (hideLinkUnselected && !selected) visnow=false; @@ -787,7 +789,8 @@ setSelBox(); selected=true; selbox->show(); - setVisibility (visible); +// FIXME not needed? +// setVisibility (visible); } @@ -795,7 +798,8 @@ { selected=false; selbox->hide(); - setVisibility (visible); +// FIXME not needed? +// setVisibility (visible); } void LinkableMapObj::parabel (QPointArray &ya, double p1x, double p1y, double p2x, double p2y) diff -r 359217d2a49b -r 69d648a0a15b main.cpp --- a/main.cpp Thu Mar 23 12:38:54 2006 +0000 +++ b/main.cpp Thu Mar 23 12:38:55 2006 +0000 @@ -103,6 +103,7 @@ QAction *actionSettingsAutoedit; QAction *actionSettingsUseDelKey; QAction *actionSettingsUseFlagGroups; +QAction *actionSettingsUseHideExport; QPopupMenu *branchContextMenu; QPopupMenu *branchAddContextMenu; diff -r 359217d2a49b -r 69d648a0a15b mainwindow.cpp --- a/mainwindow.cpp Thu Mar 23 12:38:54 2006 +0000 +++ b/mainwindow.cpp Thu Mar 23 12:38:55 2006 +0000 @@ -160,6 +160,7 @@ extern QAction* actionSettingsPasteNewHeading; extern QAction* actionSettingsUseDelKey; extern QAction* actionSettingsUseFlagGroups; +extern QAction* actionSettingsUseHideExport; extern QPopupMenu* branchContextMenu; extern QPopupMenu* branchAddContextMenu; @@ -298,6 +299,7 @@ settings.writeEntry( "/vym/mapeditor/editmode/autoedit",actionSettingsAutoedit->isOn() ); settings.writeEntry( "/vym/mapeditor/editmode/useDelKey",actionSettingsUseDelKey->isOn() ); settings.writeEntry( "/vym/mapeditor/editmode/useFlagGroups",actionSettingsUseFlagGroups->isOn() ); + settings.writeEntry( "/vym/export/useHideExport",actionSettingsUseHideExport->isOn() ); QString s; int maps=lastMaps.count(); @@ -1057,6 +1059,12 @@ a->setOn ( settings.readBoolEntry ("/vym/mapeditor/editmode/useFlagGroups",true) ); a->addTo( menu ); actionSettingsUseFlagGroups=a; + + a= new QAction( tr( "Use hide flag during exports " ), QPixmap(), tr( "Use hide flags" ), 0, this, "hideexport" ); + a->setToggleAction(true); + a->setOn ( settings.readBoolEntry ("/vym/export/useHideExport",true) ); + a->addTo( menu ); + actionSettingsUseHideExport=a; } // Test Actions @@ -1863,7 +1871,8 @@ void Main::fileExportHTML() { - if (currentMapEditor()) + MapEditor *me=currentMapEditor(); + if (me) { ExportHTMLDialog dia(this); @@ -1872,8 +1881,10 @@ QString dir=dia.getDir(); if (reallyWriteDirectory(dir) ) { - currentMapEditor()->exportXML (dia.getDir() ); - dia.doExport(currentMapEditor()->getMapName() ); + me->setExportMode (true); + me->exportXML (dia.getDir() ); + dia.doExport(me->getMapName() ); + me->setExportMode (false); } } } @@ -1881,12 +1892,13 @@ void Main::fileExportXHTML() { + MapEditor *me=currentMapEditor(); QString dir; - if (currentMapEditor()) + if (me) { ExportXHTMLDialog dia(this); - dia.setFilePath (currentMapEditor()->getFilePath() ); - dia.setMapName (currentMapEditor()->getMapName() ); + dia.setFilePath (me->getFilePath() ); + dia.setMapName (me->getMapName() ); dia.readSettings(); if (dia.exec()==QDialog::Accepted) @@ -1902,10 +1914,10 @@ if (ok) { - currentMapEditor()->exportXML (dia.getDir() ); - dia.doExport(currentMapEditor()->getMapName() ); + me->exportXML (dia.getDir() ); + dia.doExport(me->getMapName() ); if (dia.hasChanged()) - currentMapEditor()->setChanged(); + me->setChanged(); } } } @@ -1913,12 +1925,13 @@ void Main::fileExportImage(int item) { - if (currentMapEditor()) + MapEditor *me=currentMapEditor(); + if (me) { QString fn = QFileDialog::getSaveFileName( QString::null, "Image (*.bmp *.jpg *.pbm *.pgm *.png *.ppm *xbm *.xpm)", this ); if ( !fn.isEmpty() ) - currentMapEditor()->exportImage(fn,item); + me->exportImage(fn,item); else statusBar()->message( tr("Couldn't save %1").arg(fn), statusbarTime ); @@ -1927,34 +1940,47 @@ void Main::fileExportASCII() { - if (currentMapEditor()) + MapEditor *me=currentMapEditor(); + if (me) { ExportASCII ex; - ex.setMapCenter(currentMapEditor()->getMapCenter()); + ex.setMapCenter(me->getMapCenter()); ex.addFilter ("TXT (*.txt)"); ex.setCaption(__VYM " -" +tr("Export as ASCII")+" "+tr("(still experimental)")); - if (ex.execDialog() ) ex.doExport(); + if (ex.execDialog() ) + { + me->setExportMode(true); + ex.doExport(); + me->setExportMode(false); + } } } void Main::fileExportLaTeX() { - if (currentMapEditor()) + MapEditor *me=currentMapEditor(); + if (me) { ExportLaTeX ex; - ex.setMapCenter(currentMapEditor()->getMapCenter()); + ex.setMapCenter(me->getMapCenter()); ex.addFilter ("Tex (*.tex)"); ex.setCaption(__VYM " -" +tr("Export as LaTeX")+" "+tr("(still experimental)")); - if (ex.execDialog() ) ex.doExport(); + if (ex.execDialog() ) + { + me->setExportMode(true); + ex.doExport(); + me->setExportMode(false); + } } } void Main::fileExportKDEBookmarks() { ExportKDEBookmarks ex; - if (currentMapEditor()) + MapEditor *me=currentMapEditor(); + if (me) { - ex.setMapCenter (currentMapEditor()->getMapCenter() ); + ex.setMapCenter (me->getMapCenter() ); ex.doExport(); } } @@ -1962,12 +1988,18 @@ void Main::fileExportTaskjuggler() { ExportTaskjuggler ex; - if (currentMapEditor()) + MapEditor *me=currentMapEditor(); + if (me) { - ex.setMapCenter (currentMapEditor()->getMapCenter() ); + ex.setMapCenter (me->getMapCenter() ); ex.setCaption ( __VYM " - "+tr("Export to")+" Taskjuggler"+tr("(still experimental)")); ex.addFilter ("Taskjuggler (*.tjp)"); - if (ex.execDialog()) ex.doExport(); + if (ex.execDialog() ) + { + me->setExportMode(true); + ex.doExport(); + me->setExportMode(false); + } } } diff -r 359217d2a49b -r 69d648a0a15b mapeditor.cpp --- a/mapeditor.cpp Thu Mar 23 12:38:54 2006 +0000 +++ b/mapeditor.cpp Thu Mar 23 12:38:55 2006 +0000 @@ -219,6 +219,9 @@ blockReposition=false; blockSaveState=false; + + hidemode=HideNone; + isInteractive=interactive; if (isInteractive) // Create temporary files @@ -1038,13 +1041,39 @@ return pix; } +void MapEditor::setHideTmpMode (HideTmpMode mode) +{ + hidemode=mode; + mapCenter->setHideTmp (hidemode); + mapCenter->reposition(); + adjustCanvasSize(); + canvas()->update(); +} + +HideTmpMode MapEditor::getHideTmpMode() +{ + return hidemode; +} + void MapEditor::exportImage(QString fn) { // Finish open lineEdits if (lineedit) finishedLineEditNoSave(); + setExportMode (true); QPixmap pix (getPixmap()); pix.save(fn, "PNG"); + setExportMode (false); +} + +void MapEditor::setExportMode (bool b) +{ + // should be called before and after exports + // depending on the settings + if (b && settings.readEntry("/vym/export/useHideExport","yes")) + setHideTmpMode (HideExport); + else + setHideTmpMode (HideNone); } void MapEditor::exportImage(QString fn, int item) @@ -1052,8 +1081,10 @@ // Finish open lineEdits if (lineedit) finishedLineEditNoSave(); + setExportMode (true); QPixmap pix (getPixmap()); pix.save(fn, exportImageFormatMenu->text(item) ); + setExportMode (false); } void MapEditor::exportOOPresentation(const QString &fn, const QString &cf) @@ -1061,13 +1092,21 @@ ExportOO ex; ex.setFile (fn); ex.setMapCenter(mapCenter); - if (ex.setConfigFile(cf)) ex.exportPresentation(); + if (ex.setConfigFile(cf)) + { + setExportMode (true); + ex.exportPresentation(); + setExportMode (false); + } } void MapEditor::exportXML(const QString &dir) { + // Hide stuff during export, if settings want this + setExportMode (true); + // Create subdirectories makeSubDirs (dir); @@ -1091,6 +1130,8 @@ // Now write image, too exportImage (dir+"/images/"+mapName+".png"); + + setExportMode (false); } void MapEditor::clear() @@ -2970,15 +3011,30 @@ void MapEditor::testFunction() { cout << "MapEditor::testFunction() called\n"; - mapCenter->reposition(); - adjustCanvasSize(); - - /* - if (selection && (typeid(*selection) == typeid(BranchObj))) + + if (hidemode==HideNone) { - cout << "Note:\n"<<((BranchObj*)selection)->getNoteOpenDoc()<calcBBoxSizeWithChilds(); + QRect totalBBox=mapCenter->getTotalBBox(); + QRect mapRect=totalBBox; + QCanvasRectangle *frame=NULL; + + cout << " map has =("<setBrush (QColor(white)); + frame->setPen (QColor(black)); + frame->setZ(0); + frame->show(); + } + else + { + setHideTmpMode (HideNone); + } + cout <<" hidemode="<setName ("standardFlags"); hideExport=false; + hidden=false; url=""; vymLink=""; @@ -309,14 +310,18 @@ void OrnamentedObj::setHideInExport(bool b) { - hideExport=b; - if (b) - systemFlags->activate("hideInExport"); - else - systemFlags->deactivate("hideInExport"); - calcBBoxSize(); - positionBBox(); - requestReposition(); + if (parObj) + { + // Don't allow to MapCenter to be hidden + hideExport=b; + if (b) + systemFlags->activate("hideInExport"); + else + systemFlags->deactivate("hideInExport"); + calcBBoxSize(); + positionBBox(); + requestReposition(); + } } bool OrnamentedObj::hideInExport() @@ -324,6 +329,11 @@ return hideExport; } +bool OrnamentedObj::isHidden() +{ + return hidden; +} + QString OrnamentedObj::getOrnAttr() { QString posAttr; diff -r 359217d2a49b -r 69d648a0a15b ornamentedobj.h --- a/ornamentedobj.h Thu Mar 23 12:38:54 2006 +0000 +++ b/ornamentedobj.h Thu Mar 23 12:38:55 2006 +0000 @@ -40,6 +40,7 @@ virtual void updateNoteFlag(); virtual void setHideInExport(bool); // set export of object (and childs) virtual bool hideInExport(); + virtual bool isHidden (); virtual QString getOrnAttr(); // get attributes for saveToDir protected: @@ -51,6 +52,7 @@ QString url; // url to external doc QString vymLink; // path to another map bool hideExport; // hide in exports if set + bool hidden; // true if temporary hidden }; #endif diff -r 359217d2a49b -r 69d648a0a15b tex/vym.changelog --- a/tex/vym.changelog Thu Mar 23 12:38:54 2006 +0000 +++ b/tex/vym.changelog Thu Mar 23 12:38:55 2006 +0000 @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Mar 23 13:26:46 CET 2006 - uwedr + +- Version 1.7.12 +- Bugfix: Problem with vymlinks pointing to higher directories (#159770) +- Bugfix: All exports support hiding of objects now +- Bugfix: exportDir in XHTML export is correctly saved in map and + defaults to current directory + ------------------------------------------------------------------- Wed Mar 15 11:43:02 CET 2006 - uwedr diff -r 359217d2a49b -r 69d648a0a15b tex/vym.tex --- a/tex/vym.tex Thu Mar 23 12:38:54 2006 +0000 +++ b/tex/vym.tex Thu Mar 23 12:38:55 2006 +0000 @@ -107,7 +107,7 @@ In our science oriented society we have learned to mainly rely on our left side of the brain, the "rational" one. In other cultures, especially like the native americans and other "old" cultures, the right -side is much more important. maps are just one way to stimulate the +side is much more important. Maps are just one way to stimulate the other side and make use of additional ressources we all have. @@ -202,8 +202,8 @@ There are also more flags set by \vym automatically to show additional information, e.g. when a exists for a particular branch. -By default some of these flags are set exclusively e.g. when the \lq -thumb-up\rq flag is set, then the \lq thumb down\rq is unset and vice +By default some of these flags are set exclusively e.g. when the +"thumb-up" flag is set, then the "thumb down" is unset and vice versa. You can change this default behaviour in the settings menu. %TODO add info about toolbars e.g. undo/redo, ... @@ -278,7 +278,7 @@ fails, there will appear a short message "Nothing found" or a few seconds in the {\em statusbar} on the bottom of the mapeditor. -\subsubsection*{Scroll a part of the map} +\subsubsection*{Keep the overview -- scroll a part of the map} A very big subtree of a map e.g. a branch with hundreds of childs makes it very hard to keep an overview over the whole map. You can hide all the childs of a branch by {\em scrolling} it -- this function is also @@ -302,7 +302,7 @@ \subsection{Modify and move branches} -\subsubsection*{Modify the heading of a branch} +\subsubsection*{Modify the heading} You can edit the heading by selecting the branch and then \begin{itemize} \item pressing \key{Enter} @@ -475,12 +475,15 @@ of the map is always painted "thin". -\subsection{Link to other documents} -Presently \vym supports two kind of links: +\subsection{Links to other documents and webpages} +\vym supports two kind of external links: \begin{itemize} \item Document, which will be opened in an external webbrowser \item \vym map, which will be opened in \vym itself \end{itemize} +In addition to the external links there also internal ones, leading from one +branch in a map toanother one. Those are called {\em XLinks} and are explained +in section~\ref{xlinks}. \subsubsection*{Webbrowser} Modern Webbrowsers like {\tt konqueror} are able to display various @@ -799,7 +802,7 @@ modifier lets you create {\em xLinks}, which will be explained in the next section. -\subsection{XLinks} +\subsection{XLinks} \label{xlinks} So far all the data in the \vym map has been treelike. Using xLinks you can link one branch to any other, just like attaching a rope between two branches in a real tree. This is especially useful in complex maps, @@ -887,6 +890,13 @@ \begin{appendix} \section{Contributing to \vym} +So far I'd say I have written 98\% of the code on my own. No surprise, +that \vym exactly fits my own needs. Nevertheless I would like to +encourage all users of \vym to contribute. Maybe not only with feature +requests, but also with code, new import/export filters, translations +etc. In this appendix I'll try to show how easy it is to expand the +things you can do already with \vym. I really look forward to hear from +you! \subsection{Getting help} @@ -909,7 +919,7 @@ Especially for support questions please try the mailinglists first. If everything else fails you can contact the Uwe Drechsel at \begin{center} -\href{mailto:vym@InSilmaril.de}{vym@Insilmaril.de} +\href{mailto:vym@InSilmaril.de}{vym@InSilmaril.de} \end{center} @@ -947,7 +957,8 @@ The last command {\tt make install} needs root-permissions. Of course it may be omitted, if you just want to test \vym. -\subsubsection*{Compiling \vym on Macs} +%\subsubsection*{Compiling \vym on Macs} +%TODO \subsection{\vym file format} \label{fileformat} \vym maps usually have the postfix "{\tt .vym}" and represent a @@ -1044,8 +1055,10 @@ {\tt MapEditor::saveToDir} in {\tt mapeditor.cpp}. -\subsubsection{Templates} -\subsubsection{XSL Transformation} +%\subsubsection{Templates} +%TODO +%\subsubsection{XSL Transformation} +%TODO \end{appendix} diff -r 359217d2a49b -r 69d648a0a15b version.h --- a/version.h Thu Mar 23 12:38:54 2006 +0000 +++ b/version.h Thu Mar 23 12:38:55 2006 +0000 @@ -2,7 +2,7 @@ #define VERSION_H #define __VYM "VYM" -#define __VYM_VERSION "1.7.11" -#define __BUILD_DATE "March 14, 2006" +#define __VYM_VERSION "1.7.12" +#define __BUILD_DATE "March 23, 2006" #endif