# HG changeset patch # User insilmaril # Date 1162211977 0 # Node ID 7ced3733ba608833d65dda50e41ee3ebc1cd21a7 # Parent 67cfa6e6b863b54e326d365d5e5a1b54f8b12a5d Spanish doc is found, if LANG is set. Fixed wrong position of floatimages diff -r 67cfa6e6b863 -r 7ced3733ba60 aboutdialog.cpp --- a/aboutdialog.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/aboutdialog.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -192,8 +192,8 @@ //if (!proc->waitForStarted() &&mainWindow->settingsURL() ) setSource(url); if (!proc->waitForStarted() ) QMessageBox::warning(0, - tr("Warning"), - tr("Couldn't find a viewer to open %1.\n").arg(url)+ + tr("Warning","About window"), + tr("Couldn't find a viewer to open %1.\n","About window").arg(url)+ tr("Please use Settings->")+tr("Set application to open an URL")); } diff -r 67cfa6e6b863 -r 7ced3733ba60 api.cpp --- a/api.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/api.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -197,19 +197,19 @@ // a variable later QString r; ok=true; - /* - QRegExp re("\"(.*)\""); - int pos=re.search (paramList[index]); - if (pos>=0) - r=re.cap (1); - else - r=""; - */ - if (paramList[index]=="true") + QString p=paramList[index]; + if (p=="true" || p=="1") return true; - else if (paramList[index]=="false") + else if (p=="false" || p=="0") return false; ok=false; return ok; } +QColor API::parColor(bool &ok,const int &index) +{ + // return the QColor at index + ok=true; + return QColor (paramList[index]); +} + diff -r 67cfa6e6b863 -r 7ced3733ba60 api.h --- a/api.h Tue Oct 24 15:36:38 2006 +0000 +++ b/api.h Mon Oct 30 12:39:37 2006 +0000 @@ -1,6 +1,7 @@ #ifndef API_H #define API_H +#include #include enum ErrorLevel {NoError,Warning,Aborted}; @@ -25,6 +26,7 @@ int parInt (bool &,const uint &index); QString parString(bool &ok,const int &index); bool parBool (bool &ok, const int &index); + QColor parColor (bool &ok, const int &index); private: QString input; QString com; diff -r 67cfa6e6b863 -r 7ced3733ba60 branchobj.cpp --- a/branchobj.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/branchobj.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -921,7 +921,7 @@ return a; } -LinkableMapObj* BranchObj::addFloatImage () +FloatImageObj* BranchObj::addFloatImage () { FloatImageObj *newfi=new FloatImageObj (canvas,this); floatimage.append (newfi); @@ -929,13 +929,15 @@ newfi->setVisibility (false); else newfi->setVisibility(visible); + /* calcBBoxSize(); positionBBox(); + */ requestReposition(); return newfi; } -LinkableMapObj* BranchObj::addFloatImage (FloatImageObj *fio) +FloatImageObj* BranchObj::addFloatImage (FloatImageObj *fio) { FloatImageObj *newfi=new FloatImageObj (canvas,this); floatimage.append (newfi); @@ -944,8 +946,10 @@ newfi->setVisibility (false); else newfi->setVisibility(visible); + /* calcBBoxSize(); positionBBox(); + */ requestReposition(); return newfi; } diff -r 67cfa6e6b863 -r 7ced3733ba60 branchobj.h --- a/branchobj.h Tue Oct 24 15:36:38 2006 +0000 +++ b/branchobj.h Mon Oct 30 12:39:37 2006 +0000 @@ -82,8 +82,8 @@ void setIncludeImagesHor(bool); bool getIncludeImagesHor(); QString getIncludeImageAttr(); - virtual LinkableMapObj* addFloatImage(); - virtual LinkableMapObj* addFloatImage(FloatImageObj*); + virtual FloatImageObj* addFloatImage(); + virtual FloatImageObj* addFloatImage(FloatImageObj*); virtual void removeFloatImage(FloatImageObj*); virtual FloatImageObj* getFirstFloatImage(); virtual FloatImageObj* getLastFloatImage(); diff -r 67cfa6e6b863 -r 7ced3733ba60 demos/todo.vym Binary file demos/todo.vym has changed diff -r 67cfa6e6b863 -r 7ced3733ba60 floatimageobj.cpp --- a/floatimageobj.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/floatimageobj.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -86,7 +86,7 @@ clickBox.setSize (QSize(icon->size().width()+8, icon->size().height()+8)); positionBBox(); filetype="PNG"; - filename="noname.png"; + filename="No filename given"; } bool FloatImageObj::load (const QString &fn) diff -r 67cfa6e6b863 -r 7ced3733ba60 floatobj.cpp --- a/floatobj.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/floatobj.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -89,7 +89,7 @@ void FloatObj::reposition() { - move (parObj->getChildPos().x()+relPos.x(), parObj->getChildPos().y()+relPos.y()); + move2RelPos (relPos); updateLink(); } diff -r 67cfa6e6b863 -r 7ced3733ba60 lang/vym_de.ts --- a/lang/vym_de.ts Tue Oct 24 15:36:38 2006 +0000 +++ b/lang/vym_de.ts Mon Oct 30 12:39:37 2006 +0000 @@ -12,26 +12,57 @@ + AboutTextBrowser + + Warning + Warnung + + + Couldn't find a viewer to open %1. + + Konnte kein Programm zum Öffnen von %1 finden. + + + Please use Settings-> + Bitte setzen sie einen Pfad in Einstellungen-> + + + Set application to open an URL + URLs öffnen mit... + + + Warning + About window + Warnung + + + Couldn't find a viewer to open %1. + + About window + Konnte kein Programm zum Öffnen von %1 finden. + + + EditXLinkDialog Edit XLink - xLink ändern + xLink ändern XLink width: - xLink Dicke: + xLink Dicke: Set color of heading - Farbe Heading + Farbe Heading XLink color: - Farbe xLink: + Farbe xLink: Use as default: - Als Standard verwenden: + Als Standard verwenden: Delete XLink @@ -39,7 +70,11 @@ Ok - Ok + Ok + + + Quit and delete XLink + @@ -113,7 +148,7 @@ ExportXHTMLDialog Export XHTML - Exportiere XHTML + Exportiere XHTML Directory: @@ -121,15 +156,15 @@ Browse - Durchsuchen + Durchsuchen Options - Optionen + Optionen Include image - Bild erzeugen + Bild erzeugen Include text @@ -137,23 +172,23 @@ show output of external scripts - Zeige Ausgabe der externen Skripte + Zeige Ausgabe der externen Skripte Export - Exportieren + Exportieren Cancel - Abbrechen + Abbrechen VYM - Export HTML to directory - VYM - Exportiere HTML in Verzeichnis + VYM - Exportiere HTML in Verzeichnis Critical Error - Kritischer Fehler + Kritischer Fehler Couldn't start @@ -165,39 +200,39 @@ Export to directory: - Export Verzeichnis: + Export Verzeichnis: Colored headings in text - Farbige Headings im Text + Farbige Headings im Text showWarnings e.g. if directory is not empty - Warnung, falls Verzeichnis nicht leer ist + Warnung, falls Verzeichnis nicht leer ist Stylesheets - Stylesheets + Stylesheets CSS: - CSS: + CSS: XSL: - XSL: + XSL: VYM - Path to CSS file - VYM - Pfad zu CSS Datei + VYM - Pfad zu CSS Datei VYM - Path to XSL file - VYM - Pfad zu XSL Datei + VYM - Pfad zu XSL Datei Warning - Warnung + Warnung could not be opened! @@ -205,19 +240,19 @@ Save settings in map - Einstellungen in map speichern + Einstellungen in map speichern Scripts - Skripte + Skripte Before export: - Vor Export: + Vor Export: After Export: - Nach Export: + Nach Export: The settings saved in the map would like to run scripts: @@ -235,11 +270,11 @@ VYM - Path to pre export script - VYM - Pfad für Prä-Export Skript + VYM - Pfad für Prä-Export Skript VYM - Path to post export script - VYM -Pfad für Post-Export Skript + VYM -Pfad für Post-Export Skript Stylesheets: @@ -256,7 +291,7 @@ Please check, if you really want to allow this in your system! - Die in der Map gespeicherten Einstellungen möchten gerne Skripte starten: + Die in der Map gespeicherten Einstellungen möchten gerne Skripte starten: %1 @@ -264,19 +299,19 @@ Could not open %1 - %1 konnte nicht geöffnet werden + %1 konnte nicht geöffnet werden Could not write %1 - %1 konnte nicht geschrieben werden + %1 konnte nicht geschrieben werden Could not start %1 - Konnte %1 nicht starten + Konnte %1 nicht starten %1 didn't exit normally - %1 wurde nicht richtig beendet + %1 wurde nicht richtig beendet Couldn't start %1 @@ -287,31 +322,31 @@ ExtraInfoDialog VYM - Info - VYM - Info + VYM - Info Map: - Map: + Map: Author: - Author: + Author: Comment: - Kommentar: + Kommentar: Statistics: - Statistik: + Statistik: Cancel - Abbrechen + Abbrechen Close - Schliessen + Schliessen @@ -341,44 +376,51 @@ HistoryWindow Dialog - + Redo - Wiederherstellen + Wiederherstellen New Row - + Time - + Comment - + Undo - Rückgängig + Rückgängig Close - Schliessen + Schliessen Action - + Table with actions + + + + Comment + Table with actions + Undo action - - - - now - now bar in history hwindow - + Table with actions + + + + Current state + Current bar in history hwindow + Aktuelle Zustand @@ -393,7 +435,7 @@ &New... - &Neu... + &Neu... Open @@ -401,23 +443,23 @@ &Open... - &Öffnen... + &Öffnen... Save - Speichern + Speichern &Save... - &Speichern... + &Speichern... Save &As... - Speichern &unter... + Speichern &unter... Import directory structure (experimental) - Importiere Verzeichnisstruktur (experimentelle Funktion) + Importiere Verzeichnisstruktur (experimentelle Funktion) Import Dir @@ -433,7 +475,7 @@ Print - Drucken + Drucken &Print... @@ -445,7 +487,7 @@ &Close Map - Schlie&ßen + Schlie&ßen Exit VYM @@ -457,7 +499,7 @@ &Edit - &Bearbeiten + &Bearbeiten Undo @@ -465,7 +507,7 @@ &Undo - &Rückgängig + &Rückgängig Copy @@ -473,7 +515,7 @@ &Copy - &Kopieren + &Kopieren Cut @@ -481,7 +523,7 @@ Cu&t - &Ausschneiden + &Ausschneiden Paste @@ -489,7 +531,7 @@ &Paste - Ein&fügen + Ein&fügen Move branch up @@ -497,7 +539,7 @@ Move up - Zweig nach oben + Zweig nach oben Move branch down @@ -505,7 +547,7 @@ Move down - Zweig nach unten + Zweig nach unten Scroll branch @@ -517,7 +559,7 @@ Unscroll all scrolled branches - Alle eingerollten Zweige aufrollen + Alle eingerollten Zweige aufrollen Find @@ -537,7 +579,7 @@ Use heading for URL - Beschriftung als URL übernehmen + Beschriftung als URL übernehmen Jump to another vym map, if needed load it first @@ -561,7 +603,7 @@ Edit heading - Bearbeite Zweig-Überschrift + Bearbeite Zweig-Überschrift Delete Selection @@ -573,7 +615,7 @@ Add branch as child - Neuer Zweig + Neuer Zweig Add a branch above selection @@ -581,7 +623,7 @@ Add branch above - Neuer Zweig - oben + Neuer Zweig - oben Add a branch below selection @@ -589,7 +631,7 @@ Add branch below - Neuer Zweig - unten + Neuer Zweig - unten Select upper branch @@ -609,7 +651,7 @@ Select child branch - Unterzweig auswählen + Unterzweig auswählen Select first branch @@ -643,7 +685,7 @@ Pic&k color - Farbe &übernehmen + Farbe &übernehmen Color branch @@ -651,7 +693,7 @@ Color &branch - Zweig &färben + Zweig &färben Color Subtree @@ -659,7 +701,7 @@ Color sub&tree - &Unterbaum färben + &Unterbaum färben Line @@ -703,7 +745,7 @@ &Use color of heading for link - &Verbindungen haben Farbe der Beschriftungen + &Verbindungen haben Farbe der Beschriftungen Set Link Color @@ -731,7 +773,7 @@ reset Zoom - Keine Vergrösserung + Keine Vergrösserung Zoom in @@ -751,7 +793,7 @@ Next Window - Nächstes Fenster + Nächstes Fenster &Previous Window @@ -759,7 +801,7 @@ Previous Window - Vorheriges Fenster + Vorheriges Fenster &Settings @@ -787,7 +829,7 @@ Select existing heading - Beschriftung vor dem editieren auswählen + Beschriftung vor dem editieren auswählen Enable pasting into new branch @@ -811,7 +853,7 @@ test flag - test Flag + test Flag Count Canvas Items @@ -839,7 +881,7 @@ &Help - &Hilfe + &Hilfe Open VYM Documentation (pdf) @@ -847,7 +889,7 @@ Open VYM Documentation (pdf) - VYM Handbuch (pdf) + VYM Handbuch (pdf) Information about VYM @@ -863,11 +905,11 @@ About QT - Über QT + Über QT Save image - Speichere Bild + Speichere Bild The file @@ -936,15 +978,15 @@ Save &As - Speichern &unter... + Speichern &unter... Open Recent - Zuletzt geöffnete Dateien + Zuletzt geöffnete Dateien Export - Exportieren + Exportieren Export map as image @@ -1038,7 +1080,7 @@ Delete vym link - vym Verknüpfung löschen + vym Verknüpfung löschen Critical Load Error @@ -1186,12 +1228,12 @@ New map File menu - Neue Map anlegen + Neue Map anlegen Open File menu - Öffnen + Öffnen Modes when using modifiers @@ -1203,7 +1245,7 @@ Add branch (insert) - Neuen Zweig einfügen + Neuen Zweig einfügen Remove only branch and keep its childs @@ -1211,7 +1253,7 @@ Remove only branch - Zweig entfernen, Unterzweige behalten + Zweig entfernen, Unterzweige behalten Remove childs of branch @@ -1219,7 +1261,7 @@ Remove childs - Unterzweige entfernen + Unterzweige entfernen Use modifier to copy @@ -1231,11 +1273,11 @@ Remove - Entfernen + Entfernen Edit XLink - xLink ändern + xLink ändern Goto XLink @@ -1282,16 +1324,16 @@ Delete key - Entfernen Taste + Entfernen Taste Exclusive flags - Exklusive Flags + Exklusive Flags The directory %1 is not empty. Do you risk to overwrite its contents? - Das Verzeichnis %1 ist nicht leer. + Das Verzeichnis %1 ist nicht leer. Riskieren Sie es dessen Inhalt zu überschreiben? @@ -1365,7 +1407,7 @@ E&xit - B&eenden + B&eenden Redo @@ -1373,7 +1415,7 @@ &Redo - Wieder&herstellen + Wieder&herstellen Create URL to FATE @@ -1385,7 +1427,7 @@ Include images vertically - Obere und untere Bildkanten berücksichtigen + Obere und untere Bildkanten berücksichtigen Include left and right position of images into branch @@ -1393,7 +1435,7 @@ Include images horizontally - Linke und rechte Bildkanten berücksichtigen + Linke und rechte Bildkanten berücksichtigen Hide link @@ -1401,7 +1443,7 @@ Hide link if object is not selected - Verbindung verbergen, falls Objekt nicht selektiert ist + Verbindung verbergen, falls Objekt nicht selektiert ist Note @@ -1510,7 +1552,7 @@ Call test function - Testfunktion aufrufen + Testfunktion aufrufen Couldn't save %1 @@ -1534,7 +1576,7 @@ Export in Open Document Format used e.g. in Open Office - Exportiere im Open Document Format, das z.B. in Open Office verwendet wird + Exportiere im Open Document Format, das z.B. in Open Office verwendet wird Export as XML @@ -1570,15 +1612,15 @@ Add map (insert) - Map einfügen (An Selektion hinzufügen) + Map einfügen (An Selektion hinzufügen) Add map (replace) - Map einfügen (Selektion austauschen) + Map einfügen (Selektion austauschen) Export as - Exportieren als + Exportieren als Export to @@ -1590,7 +1632,7 @@ Hide in exports - In Export nicht anzeigen + In Export nicht anzeigen Hide object in exported maps @@ -1603,7 +1645,7 @@ Use hide flags - Während des Exports das "Verbergen" Flag verwenden + Während des Exports das "Verbergen" Flag verwenden Open URL in new tab @@ -1675,7 +1717,7 @@ F&ormat - F&ormat + F&ormat Show Note Editor @@ -1695,79 +1737,646 @@ Image - Bild + Bild Format Actions Toolbars - Format Actions + Format Actions View Actions Toolbars - Ansicht Aktionen + Ansicht Aktionen Modes when using modifiers Toolbars - Modes beim Benutzen von Modifizierern + Modes beim Benutzen von Modifizierern Standard Flags Standard Flag Toolbar - + Standard Flags Werkzeugleiste Follow XLink - + XLink folgen Couldn't find configuration for export to Open Office - + Konnte keine EInstellungen zum Export nach Open Office finden + No matches found for "%1" - + Keine treffer für "%1" gefunden &Map - + &Map &Actions - + &Aktionen Open all URLs in subtree - - - - Open xlinked map - + Alle URLs in Unterbaum öffnen Open all vym links in subtree - + Alle Verbindungen zu vym maps in Unterbaum öffnen URLs and vymLinks - + URLs und Verbindungen zu vym maps Couldn't create temporary directory before load - + Konnte temporäres Verzeichnis vor dem Laden nicht erzeugen Couldn't create temporary directory before save + Konnte temporäres Verzeichnis vor dem Speichern nicht erzeugen + + + Sorry, currently only Konqueror and Mozilla support tabbed browsing. + Sorry, im Moment unterstützen nur Konqueror und Mozilla tabbed browsing. + + + Test function + Test Funktion + + + Command + Test Kommando + + + Enter command to call in editor + Kommando für den MapEditor + + + Open linked map + Verlinkte Map öffnen + + + &New... + File menu + &Neu... + + + New map + Status tip File menu + Neue map + + + &Open... + File menu + &Öffnen... + + + Open + Status tip File menu + Öffnen + + + Open Recent + File menu + Zuletzt geöffnete Dateien + + + &Save... + File menu + &Speichern... + + + Save + Status tip file menu + Speichern + + + Save &As... + File menu + Speichern &unter... + + + Save &As + Status tip file menu + Speichern &unter... + + + Import + File menu + Importieren + + + Import %1 + Status tip file menu - Sorry, currently only Konqueror and Mozilla support tabbed browsing. + KDE bookmarks + + Firefox Bookmarks + File menu + Firefox Lesezeichen + + + Import %1 + status tip file menu + + + + Import Dir%1 + File menu + + + + Import directory structure (experimental) + status tip file menu + Importiere Verzeichnisstruktur (experimentelle Funktion) + + + Export + File menu + Exportieren + + + Image%1 + File export menu + + + + Export map as image + status tip file menu + als Bild + + + Export in Open Document Format used e.g. in Open Office + status tip file menu + Exportiere im Open Document Format, das z.B. in Open Office verwendet wird + + + Export as %1 + status tip file menu + + + + webpage (XHTML) + status tip file menu + + + + Export as %1 + + + + KDE Bookmarks + File menu + KDE Lesezeichen + + + Print + File menu + Drucken + + + &Close Map + File menu + Schlie&ßen + + + E&xit + File menu + B&eenden + + + &Actions toolbar + Toolbar name + + + + &Edit + Edit menu + &Bearbeiten + + + &Undo + Edit menu + + + + &Redo + Edit menu + Wieder&herstellen + + + &Copy + Edit menu + &Kopieren + + + Cu&t + Edit menu + &Ausschneiden + + + &Paste + Edit menu + Ein&fügen + + + Edit heading + Edit menu + Bearbeite Zweig-Überschrift + + + Delete Selection + Edit menu + Entfernen + + + Add branch as child + Edit menu + Neuer Zweig + + + Add branch (insert) + Edit menu + Neuen Zweig einfügen + + + Add branch above + Edit menu + Neuer Zweig - oben + + + Add branch below + Edit menu + Neuer Zweig - unten + + + Move up + Edit menu + Zweig nach oben + + + Move down + Edit menu + Zweig nach unten + + + Scroll branch + Edit menu + Zweig einrollen + + + Unscroll all scrolled branches + Edit menu + Alle eingerollten Zweige aufrollen + + + Find... + Edit menu + + + + Open URL + Edit menu + URL öffnen + + + Open URL in new tab + Edit menu + URL in neuen Tab öffnen + + + Open all URLs in subtree + Edit menu + Alle URLs in Unterbaum öffnen + + + Edit URL... + Edit menu + + + + Use heading for URL + Edit menu + Beschriftung als URL übernehmen + + + Create URL to Bugzilla + Edit menu + URL für Bugzilla anlegen + + + Create URL to FATE + Edit menu + URL für FATE anlegen + + + Open linked map + Edit menu + Verlinkte Map öffnen + + + Open all vym links in subtree + Edit menu + Alle Verbindungen zu vym maps in Unterbaum öffnen + + + Edit vym link... + Edit menu + + + + Delete vym link + Edit menu + vym Verknüpfung löschen + + + Hide in exports + Edit menu + In Export nicht anzeigen + + + Edit Map Info... + Edit menu + + + + Add map (insert) + Edit menu + Map einfügen (An Selektion hinzufügen) + + + Add map (replace) + Edit menu + Map einfügen (Selektion austauschen) + + + Save selection + Edit menu + Auswahl speichern + + + Remove only branch + Edit menu + Zweig entfernen, Unterzweige behalten + + + Remove childs + Edit menu + Unterzweige entfernen + + + Select upper branch + Edit menu + Zweig oben auswählen + + + Select lower branch + Edit menu + Zweig unten auswählen + + + Select left branch + Edit menu + Linken Zweig auswählen + + + Select child branch + Edit menu + Unterzweig auswählen + + + Select first branch + Edit menu + Obersten Zweig auwählen + + + Select last branch + Edit menu + Untersten Zweig auswählen + + + Add Image... + Edit menu + + + + F&ormat + Format menu + F&ormat + + + Format Actions + Format Toolbar name + Format Actions + + + Pic&k color + Edit menu + Farbe &übernehmen + + + Color &branch + Edit menu + Zweig &färben + + + Color sub&tree + Edit menu + &Unterbaum färben + + + No Frame + Branch attribute + Kein Rahmen + + + RectangleBranch attribute + + + + Include images vertically + Branch attribute + Obere und untere Bildkanten berücksichtigen + + + Include images horizontally + Branch attribute + Linke und rechte Bildkanten berücksichtigen + + + Hide link if object is not selected + Branch attribute + Verbindung verbergen, falls Objekt nicht selektiert ist + + + &Use color of heading for link + Branch attribute + &Verbindungen haben Farbe der Beschriftungen + + + View Actions + View Toolbar name + Ansicht Aktionen + + + reset Zoom + View action + Keine Vergrösserung + + + Zoom in + View action + Vergrössern + + + Zoom out + View action + Verkleinern + + + Show Note Editor + View action + Zeige Notiz Editor + + + Show history window + View action + Zeige Verlaufsfenster + + + Next Window + View action + Nächstes Fenster + + + Previous Window + View action + Vorheriges Fenster + + + Modes when using modifiers + Modifier Toolbar name + Modes beim Benutzen von Modifizierern + + + Use modifier to color branches + Mode modifier + Modifzierer zum Färben verwenden + + + Use modifier to copy + Mode modifier + Modifizierer zum Kopieren verwenden + + + Use modifier to draw xLinks + Mode modifier + Modifizierer zum Anlegen von xLinks verwenden + + + Set application to open pdf files + Settings action + pdf-Dateien öffnen mit... + + + Set application to open external links + Settings action + Anwendung zum Öffnen externen Verweise + + + Edit branch after adding it + Settings action + Zweig nach dem Einfügen neu beschriften + + + Select branch after adding it + Settings action + Zweig nach dem Einfügen auswählen + + + Select existing heading + Settings action + Beschriftung vor dem editieren auswählen + + + Delete key + Settings action + Entfernen Taste + + + Exclusive flags + Settings action + Exklusive Flags + + + Use hide flags + Settings action + Während des Exports das "Verbergen" Flag verwenden + + + &Help + Help menubar entry + &Hilfe + + + Open VYM Documentation (pdf) + Help action + VYM Handbuch (pdf) + + + About VYM + Help action + Über VYM + + + About QT + Help action + Über QT + + + Remove + Context menu name + Entfernen + + + URLs and vymLinks + Context menu name + URLs und Verbindungen zu vym maps + + + Edit XLink + Context menu name + xLink ändern + + + Follow XLink + Context menu name + XLink folgen + + + Save image + Context action + Speichere Bild + + + The directory %1 is not empty. +Do you risk to overwrite its contents? + write directory + Das Verzeichnis %1 ist nicht leer. +Riskieren Sie es dessen Inhalt zu überschreiben? + MapEditor @@ -2008,7 +2617,7 @@ Critical Parse Error by reading backupFile - Kritischer Fehler beim Parsen + Kritischer Fehler beim Parsen der Sicherungskopie @@ -2145,7 +2754,7 @@ Maybe you want to reload your original data. Sorry for any inconveniences. - Um einen Schritt rückgängig machen zu können, wird das Verzeichnis + Um einen Schritt rückgängig machen zu können, wird das Verzeichnis %1 benutzt - leider ist verschwunden. Am besten Sie starten vym neu und laden Ihre Daten nochmal. @@ -2209,7 +2818,7 @@ Warning - Warnung + Warnung Couldn't find script %1 @@ -2221,11 +2830,25 @@ History for - + Verlauf für Save image - Speichere Bild + Speichere Bild + + + Critical Parse Error while reading %1 + Kritischer Fehler beim Parsen von %1 + + + Could not read %1 + %1 konnte nicht gelesen werden + + + Can't get color of heading, +there's no branch selected + Konnte die Farbe der Beschriftung nicht bestimmen, +da kein Zweig ausgewählt ist. @@ -2343,12 +2966,12 @@ Error - + Fehler Couldn't access temporary directory - + Auf das temporäre Verzeichnis konnte nicht zugegriffen werden @@ -2359,7 +2982,7 @@ Close - Schliessen + Schliessen History of %1 @@ -2367,7 +2990,7 @@ Dialog - + Dialog @@ -2378,7 +3001,7 @@ Import - Importiere + Importiere &Import... @@ -2414,7 +3037,7 @@ Undo - Rückgängig + Rückgängig &Undo @@ -2422,7 +3045,7 @@ Redo - Wiederherstellen + Wiederherstellen &Redo @@ -2430,7 +3053,7 @@ Select and copy all - Alles auswählen und kopieren + Alles auswählen und kopieren Select and copy &all @@ -2438,7 +3061,7 @@ Copy - Kopieren + Kopieren &Copy @@ -2446,7 +3069,7 @@ Cut - Ausschneiden + Ausschneiden Cu&t @@ -2454,7 +3077,7 @@ Paste - Einfügen + Einfügen &Paste @@ -2462,7 +3085,7 @@ Delete all - Alles löschen + Alles löschen &Delete All @@ -2486,7 +3109,7 @@ Set fixed font - Wähle Zeichensatz mit fixer Breite + Wähle Zeichensatz mit fixer Breite Set &fixed font @@ -2494,7 +3117,7 @@ Set variable font - Wähle Zeichensatz mit variabler Breite + Wähle Zeichensatz mit variabler Breite Set &variable font @@ -2502,7 +3125,7 @@ Used fixed font by default - Verwende fixen Zeichensatz per default + Verwende fixen Zeichensatz per default &fixed font is default @@ -2510,11 +3133,11 @@ Export Note (HTML) - Exportiere Notiz (HTML) + Exportiere Notiz (HTML) Export Note As (HTML) - Exportiere Notiz als (HTML) + Exportiere Notiz als (HTML) Export &As... (HTML) @@ -2522,7 +3145,7 @@ Export Note As (ASCII) - Exportiere Notiz als (ASCII) + Exportiere Notiz als (ASCII) Export &As...(ASCII) @@ -2570,11 +3193,11 @@ The file - Die Datei + Die Datei exists already. Do you want to overwrite it? - gibt es bereits. Wollen Sie sie + gibt es bereits. Wollen Sie sie Overwrite @@ -2586,7 +3209,7 @@ Couldn't export note - Konnte Notiz nicht exportieren + Konnte Notiz nicht exportieren Export Note to single file (ASCII) @@ -2598,7 +3221,7 @@ &Convert Paragraphs - &Absätze umwandeln + &Absätze umwandeln Join all lines of a paragraph @@ -2606,11 +3229,11 @@ &Join lines - &Zeilen vereinen + &Zeilen vereinen Toggle font hint for the whole text - Zeichensatz für gesamten Text umschalten + Zeichensatz für gesamten Text umschalten &Font hint @@ -2634,34 +3257,147 @@ Edit Actions - + Edit Actions Format Actions - Format Actions + Format Actions Print Document - + Drucke Notiz Note Actions - + Note Actions &Note - + &Notiz + + + Ready + Statusbar message + Bereit + + + No filename available for this note. + Statusbar message + Notiz hat keinen Dateinamen + + + Note Editor + Window caption + Notiz Editor + + + &Note + Menubar + &Notiz + + + Import + Status tip for Note menu + Importieren + + + Export Note (HTML) + Status tip for Note menu + Exportiere Notiz (HTML) + + + Export Note As (HTML) + Status tip for Note Menu + Exportiere Notiz als (HTML) + + + Export Note As (ASCII) + Status tip for note menu + Exportiere Notiz als (ASCII) + + + Print Note + Status tip for note menu + Drucke Notiz + + + Undo + Status tip for note menu + Rückgängig + + + Redo + Status tip for note menu + Wiederherstellen + + + Select and copy all + Status tip for note menu + Alles auswählen und kopieren + + + Copy + Status tip for note menu + Kopieren + + + Cut + Status tip for note menu + Ausschneiden + + + Paste + Status tip for note menu + Einfügen + + + Delete all + Status tip for note menu + Alles löschen + + + Toggle font hint for the whole text + Status tip for note menu + Zeichensatz für gesamten Text umschalten + + + Set fixed font + Status tip for note menu + Wähle Zeichensatz mit fixer Breite + + + Set variable font + Status tip for note menu + Wähle Zeichensatz mit variabler Breite + + + Used fixed font by default + Status tip for note menu + Verwende fixen Zeichensatz per default + + + The file %1 +exists already. +Do you want to overwrite it? + dialog 'save note as' + Die Datei %1 gibt es bereits. +Wollen Sie sie überschreiben? + + + Couldn't export note + dialog 'save note as' + Konnte Notiz nicht exportieren WarningDialog VYM - Warning : Foo... - VYM - Warnung: ... + VYM - Warnung: ... Proceed - Weiter + Weiter Show this message again @@ -2669,11 +3405,15 @@ Cancel - Abbrechen + Abbrechen Ok - Ok + Ok + + + showAgainBox + diff -r 67cfa6e6b863 -r 7ced3733ba60 linkablemapobj.cpp --- a/linkablemapobj.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/linkablemapobj.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -154,9 +154,13 @@ { if (parObj) { - getRelPos(); + relPos.setX (absPos.x() - parObj->getChildPos().x() ); + relPos.setY (absPos.y() - parObj->getChildPos().y() ); parObj->calcBBoxSize(); - } + } else + { + qWarning ("LMO::setRelPos No parent yet!"); + } } void LinkableMapObj::setRelPos(const QPoint &p) @@ -166,14 +170,15 @@ { parObj->calcBBoxSize(); requestReposition(); - } + } else + { + qWarning ("LMO::setRelPos No parent yet!"); + } } QPoint LinkableMapObj::getRelPos() { if (!parObj) return QPoint(); - relPos.setX (absPos.x() - parObj->getChildPos().x() ); - relPos.setY (absPos.y() - parObj->getChildPos().y() ); return relPos; } @@ -713,9 +718,9 @@ void LinkableMapObj::reposition() { + cout << "LMO::reposition\n"; // FIXME not needed? Is overloaded in BranchObj... /* - cout << "LMO::reposition\n"; if (depth==0) { // only calculate the sizes once. If the deepest LMO changes its height, diff -r 67cfa6e6b863 -r 7ced3733ba60 mainwindow.cpp --- a/mainwindow.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/mainwindow.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -73,6 +73,9 @@ // Sometimes we may need to remember old selections prevSelection=""; + // Default color + currentColor=Qt::black; + // Create unique temporary directory bool ok; tmpVymDir=makeUniqueDir (ok,"/tmp/vym-XXXXXX"); @@ -242,123 +245,123 @@ tb->setObjectName ("mapTB"); QAction *a; - a = new QAction(QPixmap( iconPath+"filenew.png"), tr( "&New..." ),this); - a->setStatusTip ( tr( "New map","File menu" ) ); + a = new QAction(QPixmap( iconPath+"filenew.png"), tr( "&New...","File menu" ),this); + a->setStatusTip ( tr( "New map","Status tip File menu" ) ); a->setShortcut ( Qt::CTRL + Qt::Key_N ); a->addTo( tb ); fileMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( fileNew() ) ); - a = new QAction( QPixmap( iconPath+"fileopen.png"), tr( "&Open..." ),this); - a->setStatusTip (tr( "Open","File menu" ) ); + a = new QAction( QPixmap( iconPath+"fileopen.png"), tr( "&Open..." ,"File menu"),this); + a->setStatusTip (tr( "Open","Status tip File menu" ) ); a->setShortcut ( Qt::CTRL + Qt::Key_O ); a->addTo( tb ); fileMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( fileLoad() ) ); - fileLastMapsMenu = fileMenu->addMenu (tr("Open Recent")); + fileLastMapsMenu = fileMenu->addMenu (tr("Open Recent","File menu")); fileMenu->addSeparator(); - a = new QAction( QPixmap( iconPath+"filesave.png"), tr( "&Save..." ), this); - a->setStatusTip ( tr( "Save" )); + a = new QAction( QPixmap( iconPath+"filesave.png"), tr( "&Save...","File menu" ), this); + a->setStatusTip ( tr( "Save","Status tip file menu" )); a->setShortcut (Qt::CTRL + Qt::Key_S ); a->addTo( tb ); fileMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( fileSave() ) ); actionFileSave=a; - a = new QAction( QPixmap(iconPath+"filesaveas.png"), tr( "Save &As..." ), this); - a->setStatusTip (tr( "Save &As" ) ); + a = new QAction( QPixmap(iconPath+"filesaveas.png"), tr( "Save &As...","File menu" ), this); + a->setStatusTip (tr( "Save &As","Status tip file menu" ) ); fileMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( fileSaveAs() ) ); fileMenu->addSeparator(); - fileImportMenu = fileMenu->addMenu (tr("Import")); + fileImportMenu = fileMenu->addMenu (tr("Import","File menu")); a = new QAction(tr("KDE Bookmarks"), this); - a->setStatusTip ( tr( "Import")+" "+tr("KDE Bookmarks" )); + a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE bookmarks"))); a->addTo (fileImportMenu); connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDEBookmarks() ) ); if (settings.value( "/mainwindow/showTestMenu",false).toBool()) { - a = new QAction( QPixmap(), tr("Firefox Bookmarks"),this); - a->setStatusTip (tr( "Import")+" "+tr("Firefox Bookmarks" ) ); + a = new QAction( QPixmap(), tr("Firefox Bookmarks","File menu"),this); + a->setStatusTip (tr( "Import %1","Status tip file menu").arg(tr("Firefox Bookmarks" ) )); a->addTo (fileImportMenu); connect( a, SIGNAL( triggered() ), this, SLOT( fileImportFirefoxBookmarks() ) ); } a = new QAction("Mind Manager...",this); - a->setStatusTip ( tr( "Import")+" Mind Manager" ); + a->setStatusTip ( tr( "Import %1","status tip file menu").arg(" Mind Manager") ); fileImportMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( fileImportMM() ) ); - a = new QAction( tr( "Import Dir"+QString("...") ), this); - a->setStatusTip (tr( "Import directory structure (experimental)" ) ); + a = new QAction( tr( "Import Dir%1","File menu").arg("..."), this); + a->setStatusTip (tr( "Import directory structure (experimental)","status tip file menu" ) ); fileImportMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( fileImportDir() ) ); - fileExportMenu = fileMenu->addMenu (tr("Export")); - - a = new QAction( tr("Image")+QString("..."), this); - a->setStatusTip( tr( "Export map as image" )); + fileExportMenu = fileMenu->addMenu (tr("Export","File menu")); + + a = new QAction( tr("Image%1","File export menu").arg("..."), this); + a->setStatusTip( tr( "Export map as image","status tip file menu" )); connect( a, SIGNAL( triggered() ), this, SLOT( fileExportImage() ) ); fileExportMenu->addAction (a); - a = new QAction( "Open Office"+QString("..."), this); - a->setStatusTip( tr( "Export in Open Document Format used e.g. in Open Office " )); + a = new QAction( "Open Office...", this); + a->setStatusTip( tr( "Export in Open Document Format used e.g. in Open Office ","status tip file menu" )); connect( a, SIGNAL( triggered() ), this, SLOT( fileExportOOPresentation() ) ); fileExportMenu->addAction (a); a = new QAction( "Webpage (XHTML)...",this ); a->setShortcut (Qt::ALT + Qt::Key_X); - a->setStatusTip ( tr( "Export as")+" webpage (XHTML)"); + a->setStatusTip ( tr( "Export as %1","status tip file menu").arg(tr(" webpage (XHTML)","status tip file menu"))); connect( a, SIGNAL( triggered() ), this, SLOT( fileExportXHTML() ) ); fileExportMenu->addAction (a); a = new QAction( "Text (ASCII)...", this); - a->setStatusTip ( tr( "Export as")+" ASCII"+" "+tr("(still experimental)" )); + a->setStatusTip ( tr( "Export as %1").arg("ASCII "+tr("(still experimental)" ))); connect( a, SIGNAL( triggered() ), this, SLOT( fileExportASCII() ) ); fileExportMenu->addAction (a); - a = new QAction( tr("KDE Bookmarks"), this); - a->setStatusTip( tr( "Export as")+" "+tr("KDE Bookmarks" )); + a = new QAction( tr("KDE Bookmarks","File menu"), this); + a->setStatusTip( tr( "Export as %1").arg(tr("KDE Bookmarks" ))); connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDEBookmarks() ) ); fileExportMenu->addAction (a); a = new QAction( "Taskjuggler...", this ); - a->setStatusTip( tr( "Export as")+" Taskjuggler"+" "+tr("(still experimental)" )); + a->setStatusTip( tr( "Export as %1").arg("Taskjuggler "+tr("(still experimental)" ))); connect( a, SIGNAL( triggered() ), this, SLOT( fileExportTaskjuggler() ) ); fileExportMenu->addAction (a); a = new QAction( "LaTeX...", this); - a->setStatusTip( tr( "Export as")+" LaTeX"+" "+tr("(still experimental)" )); + a->setStatusTip( tr( "Export as %1").arg("LaTeX "+tr("(still experimental)" ))); connect( a, SIGNAL( triggered() ), this, SLOT( fileExportLaTeX() ) ); fileExportMenu->addAction (a); a = new QAction( "XML..." , this ); - a->setStatusTip (tr( "Export as")+" XML"); + a->setStatusTip (tr( "Export as %1").arg("XML")); connect( a, SIGNAL( triggered() ), this, SLOT( fileExportXML() ) ); fileExportMenu->addAction (a); fileMenu->addSeparator(); a = new QAction(QPixmap( iconPath+"fileprint.png"), tr( "&Print")+QString("..."), this); - a->setStatusTip ( tr( "Print" ) ); + a->setStatusTip ( tr( "Print" ,"File menu") ); a->setShortcut (Qt::CTRL + Qt::Key_P ); a->addTo( tb ); fileMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( filePrint() ) ); actionFilePrint=a; - a = new QAction( QPixmap(iconPath+"fileclose.png"), tr( "&Close Map" ), this); + a = new QAction( QPixmap(iconPath+"fileclose.png"), tr( "&Close Map","File menu" ), this); a->setStatusTip (tr( "Close Map" ) ); a->setShortcut (Qt::ALT + Qt::Key_C ); fileMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( fileCloseMap() ) ); - a = new QAction(QPixmap(iconPath+"exit.png"), tr( "E&xit")+" "+__VYM, this); + a = new QAction(QPixmap(iconPath+"exit.png"), tr( "E&xit","File menu")+" "+__VYM, this); a->setStatusTip ( tr( "Exit")+" "+__VYM ); a->setShortcut (Qt::CTRL + Qt::Key_Q ); fileMenu->addAction (a); @@ -369,14 +372,14 @@ //Edit Actions void Main::setupEditActions() { - QToolBar *tb = addToolBar( tr ("&Actions") ); + QToolBar *tb = addToolBar( tr ("&Actions toolbar","Toolbar name") ); tb->setLabel( "Edit Actions" ); tb->setObjectName ("actionsTB"); - QMenu *editMenu = menuBar()->addMenu( tr("&Edit") ); + QMenu *editMenu = menuBar()->addMenu( tr("&Edit","Edit menu") ); QAction *a; QAction *alt; - a = new QAction( QPixmap( iconPath+"undo.png"), tr( "&Undo" ),this); + a = new QAction( QPixmap( iconPath+"undo.png"), tr( "&Undo","Edit menu" ),this); connect( a, SIGNAL( triggered() ), this, SLOT( editUndo() ) ); a->setStatusTip (tr( "Undo" ) ); a->setShortcut ( Qt::CTRL + Qt::Key_Z ); @@ -385,7 +388,7 @@ editMenu->addAction (a); actionEditUndo=a; - a = new QAction( QPixmap( iconPath+"redo.png"), tr( "&Redo" ), this); + a = new QAction( QPixmap( iconPath+"redo.png"), tr( "&Redo","Edit menu" ), this); a->setStatusTip (tr( "Redo" )); a->setShortcut (Qt::CTRL + Qt::Key_Y ); tb->addAction (a); @@ -394,7 +397,7 @@ actionEditRedo=a; editMenu->addSeparator(); - a = new QAction(QPixmap( iconPath+"editcopy.png"), tr( "&Copy" ), this); + a = new QAction(QPixmap( iconPath+"editcopy.png"), tr( "&Copy","Edit menu" ), this); a->setStatusTip ( tr( "Copy" ) ); a->setShortcut (Qt::CTRL + Qt::Key_C ); a->setEnabled (false); @@ -403,7 +406,7 @@ connect( a, SIGNAL( triggered() ), this, SLOT( editCopy() ) ); actionEditCopy=a; - a = new QAction(QPixmap( iconPath+"editcut.png" ), tr( "Cu&t" ), this); + a = new QAction(QPixmap( iconPath+"editcut.png" ), tr( "Cu&t","Edit menu" ), this); a->setStatusTip ( tr( "Cut" ) ); a->setShortcut (Qt::CTRL + Qt::Key_X ); a->setEnabled (false); @@ -412,7 +415,7 @@ actionEditCut=a; connect( a, SIGNAL( triggered() ), this, SLOT( editCut() ) ); - a = new QAction(QPixmap( iconPath+"editpaste.png"), tr( "&Paste" ),this); + a = new QAction(QPixmap( iconPath+"editpaste.png"), tr( "&Paste","Edit menu" ),this); connect( a, SIGNAL( triggered() ), this, SLOT( editPaste() ) ); a->setStatusTip ( tr( "Paste" ) ); a->setShortcut ( Qt::CTRL + Qt::Key_V ); @@ -422,14 +425,14 @@ actionEditPaste=a; // Shortcuts to modify heading: - a = new QAction(tr( "Edit heading" ),this); + a = new QAction(tr( "Edit heading","Edit menu" ),this); a->setStatusTip ( tr( "edit Heading" )); a->setShortcut ( Qt::Key_Enter); // a->setShortcutContext (Qt::WindowShortcut); addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( editHeading() ) ); actionListBranches.append(a); - a = new QAction( tr( "Edit heading" ), this); + a = new QAction( tr( "Edit heading","Edit menu" ), this); a->setStatusTip (tr( "edit Heading" )); a->setShortcut (Qt::Key_Return ); //a->setShortcutContext (Qt::WindowShortcut); @@ -438,7 +441,7 @@ actionListBranches.append(a); editMenu->addAction (a); actionEditHeading=a; - a = new QAction( tr( "Edit heading" ), this); + a = new QAction( tr( "Edit heading","Edit menu" ), this); a->setStatusTip (tr( "edit Heading" )); a->setShortcut ( Qt::Key_F2 ); a->setShortcutContext (Qt::WindowShortcut); @@ -447,7 +450,7 @@ actionListBranches.append(a); // Shortcut to delete selection - a = new QAction( tr( "Delete Selection" ),this); + a = new QAction( tr( "Delete Selection","Edit menu" ),this); a->setStatusTip (tr( "Delete Selection" )); a->setShortcut ( Qt::Key_Delete); a->setShortcutContext (Qt::WindowShortcut); @@ -456,13 +459,13 @@ actionEditDelete=a; // Shortcut to add branch - alt = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child" ), this); + alt = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child","Edit menu" ), this); alt->setStatusTip ( tr( "Add a branch as child of selection" )); alt->setShortcut (Qt::Key_A); alt->setShortcutContext (Qt::WindowShortcut); addAction (alt); connect( alt, SIGNAL( triggered() ), this, SLOT( editNewBranch() ) ); - a = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child" ), this); + a = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child","Edit menu" ), this); a->setStatusTip ( tr( "Add a branch as child of selection" )); a->setShortcut (Qt::Key_Insert); connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranch() ) ); @@ -478,7 +481,7 @@ // Add branch by inserting it at selection - a = new QAction(tr( "Add branch (insert)" ), this); + a = new QAction(tr( "Add branch (insert)","Edit menu" ), this); a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" )); a->setShortcut (Qt::ALT + Qt::Key_Insert ); a->setShortcutContext (Qt::WindowShortcut); @@ -487,7 +490,7 @@ a->setEnabled (false); actionListBranches.append(a); actionEditAddBranchBefore=a; - a = new QAction(tr( "Add branch (insert)" ),this); + a = new QAction(tr( "Add branch (insert)","Edit menu" ),this); a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" )); a->setShortcut ( Qt::ALT + Qt::Key_A ); a->setShortcutContext (Qt::WindowShortcut); @@ -496,7 +499,7 @@ actionListBranches.append(a); // Add branch above - a = new QAction(tr( "Add branch above" ), this); + a = new QAction(tr( "Add branch above","Edit menu" ), this); a->setStatusTip ( tr( "Add a branch above selection" )); a->setShortcut (Qt::SHIFT+Qt::Key_Insert ); a->setShortcutContext (Qt::WindowShortcut); @@ -505,7 +508,7 @@ a->setEnabled (false); actionListBranches.append(a); actionEditAddBranchAbove=a; - a = new QAction(tr( "Add branch above" ), this); + a = new QAction(tr( "Add branch above","Edit menu" ), this); a->setStatusTip ( tr( "Add a branch above selection" )); a->setShortcut (Qt::SHIFT+Qt::Key_A ); a->setShortcutContext (Qt::WindowShortcut); @@ -514,7 +517,7 @@ actionListBranches.append(a); // Add branch below - a = new QAction(tr( "Add branch below" ), this); + a = new QAction(tr( "Add branch below","Edit menu" ), this); a->setStatusTip ( tr( "Add a branch below selection" )); a->setShortcut (Qt::CTRL +Qt::Key_Insert ); a->setShortcutContext (Qt::WindowShortcut); @@ -523,7 +526,7 @@ a->setEnabled (false); actionListBranches.append(a); actionEditAddBranchBelow=a; - a = new QAction(tr( "Add branch below" ), this); + a = new QAction(tr( "Add branch below","Edit menu" ), this); a->setStatusTip ( tr( "Add a branch below selection" )); a->setShortcut (Qt::CTRL +Qt::Key_A ); a->setShortcutContext (Qt::WindowShortcut); @@ -531,7 +534,7 @@ connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBelow() ) ); actionListBranches.append(a); - a = new QAction(QPixmap(iconPath+"up.png" ), tr( "Move up" ), this); + a = new QAction(QPixmap(iconPath+"up.png" ), tr( "Move up","Edit menu" ), this); a->setStatusTip ( tr( "Move branch up" ) ); a->setShortcut (Qt::Key_PageUp ); a->setEnabled (false); @@ -540,7 +543,7 @@ connect( a, SIGNAL( triggered() ), this, SLOT( editMoveUp() ) ); actionEditMoveUp=a; - a = new QAction( QPixmap( iconPath+"down.png"), tr( "Move down" ),this); + a = new QAction( QPixmap( iconPath+"down.png"), tr( "Move down","Edit menu" ),this); connect( a, SIGNAL( triggered() ), this, SLOT( editMoveDown() ) ); a->setStatusTip (tr( "Move branch down" ) ); a->setShortcut ( Qt::Key_PageDown ); @@ -550,12 +553,12 @@ actionEditMoveDown=a; - a = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch" ),this); + a = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch","Edit menu" ),this); a->setShortcut ( Qt::Key_ScrollLock ); a->setStatusTip (tr( "Scroll branch" ) ); connect( a, SIGNAL( triggered() ), this, SLOT( editToggleScroll() ) ); - alt = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch" ), this); + alt = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch","Edit menu" ), this); alt->setShortcut ( Qt::Key_S ); alt->setStatusTip (tr( "Scroll branch" )); connect( alt, SIGNAL( triggered() ), this, SLOT( editToggleScroll() ) ); @@ -573,14 +576,14 @@ addAction (alt); actionListBranches.append(actionEditToggleScroll); - a = new QAction( tr( "Unscroll all scrolled branches" ), this); + a = new QAction( tr( "Unscroll all scrolled branches","Edit menu" ), this); a->setStatusTip (tr( "Unscroll all" )); editMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( editUnScrollAll() ) ); editMenu->addSeparator(); - a = new QAction( QPixmap(iconPath+"find.png"), tr( "Find"+QString("...") ), this); + a = new QAction( QPixmap(iconPath+"find.png"), tr( "Find...","Edit menu"), this); a->setStatusTip (tr( "Find" ) ); a->setShortcut (Qt::CTRL + Qt::Key_F ); editMenu->addAction (a); @@ -588,7 +591,7 @@ editMenu->addSeparator(); - a = new QAction( QPixmap(flagsPath+"flag-url.png"), tr( "Open URL" ), this); + a = new QAction( QPixmap(flagsPath+"flag-url.png"), tr( "Open URL","Edit menu" ), this); a->setShortcut (Qt::CTRL + Qt::Key_U ); a->setShortcut (tr( "Open URL" )); tb->addAction (a); @@ -596,21 +599,21 @@ connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURL() ) ); actionEditOpenURL=a; - a = new QAction( tr( "Open URL in new tab" ), this); + a = new QAction( tr( "Open URL in new tab","Edit menu" ), this); a->setStatusTip (tr( "Open URL in new tab" )); a->setShortcut (Qt::CTRL+Qt::Key_U ); addAction(a); connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURLTab() ) ); actionEditOpenURLTab=a; - a = new QAction( tr( "Open all URLs in subtree" ), this); + a = new QAction( tr( "Open all URLs in subtree","Edit menu" ), this); a->setStatusTip (tr( "Open all URLs in subtree" )); addAction(a); actionListBranches.append(a); connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleURLTabs() ) ); actionEditOpenMultipleURLTabs=a; - a = new QAction(QPixmap(), tr( "Edit URL"+QString("...") ), this); + a = new QAction(QPixmap(), tr( "Edit URL...","Edit menu"), this); a->setStatusTip ( tr( "Edit URL" ) ); a->setShortcut (Qt::SHIFT + Qt::CTRL + Qt::Key_U ); //a->setShortcut ( Qt::Key_U ); @@ -620,35 +623,35 @@ connect( a, SIGNAL( triggered() ), this, SLOT( editURL() ) ); actionEditURL=a; - a = new QAction( tr( "Use heading for URL" ), this); + a = new QAction( tr( "Use heading for URL","Edit menu" ), this); a->setStatusTip ( tr( "Use heading of selected branch as URL" )); a->setEnabled (false); actionListBranches.append(a); connect( a, SIGNAL( triggered() ), this, SLOT( editHeading2URL() ) ); actionEditHeading2URL=a; - a = new QAction(tr( "Create URL to Bugzilla" ), this); + a = new QAction(tr( "Create URL to Bugzilla","Edit menu" ), this); a->setStatusTip ( tr( "Create URL to Bugzilla" )); a->setEnabled (false); actionListBranches.append(a); connect( a, SIGNAL( triggered() ), this, SLOT( editBugzilla2URL() ) ); actionEditBugzilla2URL=a; - a = new QAction(tr( "Create URL to FATE" ), this); + a = new QAction(tr( "Create URL to FATE","Edit menu" ), this); a->setStatusTip ( tr( "Create URL to FATE" )); a->setEnabled (false); actionListBranches.append(a); connect( a, SIGNAL( triggered() ), this, SLOT( editFATE2URL() ) ); actionEditFATE2URL=a; - a = new QAction(QPixmap(flagsPath+"flag-vymlink.png"), tr( "Open xlinked map" ), this); + a = new QAction(QPixmap(flagsPath+"flag-vymlink.png"), tr( "Open linked map","Edit menu" ), this); a->setStatusTip ( tr( "Jump to another vym map, if needed load it first" )); tb->addAction (a); a->setEnabled (false); connect( a, SIGNAL( triggered() ), this, SLOT( editOpenVymLink() ) ); actionEditOpenVymLink=a; - a = new QAction(QPixmap(), tr( "Open all vym links in subtree" ), this); + a = new QAction(QPixmap(), tr( "Open all vym links in subtree","Edit menu" ), this); a->setStatusTip ( tr( "Open all vym links in subtree" )); a->setEnabled (false); actionListBranches.append(a); @@ -656,20 +659,20 @@ actionEditOpenMultipleVymLinks=a; - a = new QAction(tr( "Edit vym link"+QString("...") ), this); + a = new QAction(tr( "Edit vym link...","Edit menu" ), this); a->setEnabled (false); a->setStatusTip ( tr( "Edit link to another vym map" )); connect( a, SIGNAL( triggered() ), this, SLOT( editVymLink() ) ); actionListBranches.append(a); actionEditVymLink=a; - a = new QAction(tr( "Delete vym link" ),this); + a = new QAction(tr( "Delete vym link","Edit menu" ),this); a->setStatusTip ( tr( "Delete link to another vym map" )); a->setEnabled (false); connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteVymLink() ) ); actionEditDeleteVymLink=a; - a = new QAction(QPixmap(flagsPath+"flag-hideexport.png"), tr( "Hide in exports" ), this); + a = new QAction(QPixmap(flagsPath+"flag-hideexport.png"), tr( "Hide in exports","Edit menu" ), this); a->setStatusTip ( tr( "Hide object in exports" ) ); a->setShortcut (Qt::Key_H ); a->setToggleAction(true); @@ -678,14 +681,14 @@ connect( a, SIGNAL( triggered() ), this, SLOT( editToggleHideExport() ) ); actionEditToggleHideExport=a; - a = new QAction(tr( "Edit Map Info"+QString("...") ),this); + a = new QAction(tr( "Edit Map Info...","Edit menu" ),this); a->setStatusTip ( tr( "Edit Map Info" )); a->setEnabled (true); connect( a, SIGNAL( triggered() ), this, SLOT( editMapInfo() ) ); actionEditMapInfo=a; // Import at selection (adding to selection) - a = new QAction( tr( "Add map (insert)" ),this); + a = new QAction( tr( "Add map (insert)","Edit menu" ),this); a->setStatusTip (tr( "Add map at selection" )); connect( a, SIGNAL( triggered() ), this, SLOT( editImportAdd() ) ); a->setEnabled (false); @@ -693,7 +696,7 @@ actionEditImportAdd=a; // Import at selection (replacing selection) - a = new QAction( tr( "Add map (replace)" ), this); + a = new QAction( tr( "Add map (replace)","Edit menu" ), this); a->setStatusTip (tr( "Replace selection with map" )); connect( a, SIGNAL( triggered() ), this, SLOT( editImportReplace() ) ); a->setEnabled (false); @@ -701,7 +704,7 @@ actionEditImportReplace=a; // Save selection - a = new QAction( tr( "Save selection" ), this); + a = new QAction( tr( "Save selection","Edit menu" ), this); a->setStatusTip (tr( "Save selection" )); connect( a, SIGNAL( triggered() ), this, SLOT( editSaveBranch() ) ); a->setEnabled (false); @@ -709,50 +712,50 @@ actionEditSaveBranch=a; // Only remove branch, not its childs - a = new QAction(tr( "Remove only branch " ), this); + a = new QAction(tr( "Remove only branch ","Edit menu" ), this); a->setStatusTip ( tr( "Remove only branch and keep its childs" )); a->setShortcut (Qt::ALT + Qt::Key_Delete ); - connect( a, SIGNAL( triggered() ), this, SLOT( editRemoveBranchKeepChilds() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteKeepChilds() ) ); a->setEnabled (false); addAction (a); actionListBranches.append(a); - actionEditRemoveBranchKeepChilds=a; + actionEditDeleteKeepChilds=a; // Only remove childs of a branch - a = new QAction( tr( "Remove childs" ), this); + a = new QAction( tr( "Remove childs","Edit menu" ), this); a->setStatusTip (tr( "Remove childs of branch" )); a->setShortcut (Qt::SHIFT + Qt::Key_Delete ); - connect( a, SIGNAL( triggered() ), this, SLOT( editRemoveChilds() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteChilds() ) ); a->setEnabled (false); actionListBranches.append(a); - actionEditRemoveChilds=a; + actionEditDeleteChilds=a; // Shortcuts for navigating with cursor: - a = new QAction(tr( "Select upper branch" ), this); + a = new QAction(tr( "Select upper branch","Edit menu" ), this); a->setStatusTip ( tr( "Select upper branch" )); a->setShortcut (Qt::Key_Up ); a->setShortcutContext (Qt::WindowShortcut); addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( editUpperBranch() ) ); - a = new QAction( tr( "Select lower branch" ),this); + a = new QAction( tr( "Select lower branch","Edit menu" ),this); a->setStatusTip (tr( "Select lower branch" )); a->setShortcut ( Qt::Key_Down ); a->setShortcutContext (Qt::WindowShortcut); addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( editLowerBranch() ) ); - a = new QAction(tr( "Select left branch" ), this); + a = new QAction(tr( "Select left branch","Edit menu" ), this); a->setStatusTip ( tr( "Select left branch" )); a->setShortcut (Qt::Key_Left ); a->setShortcutContext (Qt::WindowShortcut); addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( editLeftBranch() ) ); - a = new QAction( tr( "Select child branch" ), this); + a = new QAction( tr( "Select child branch","Edit menu" ), this); a->setStatusTip (tr( "Select right branch" )); a->setShortcut (Qt::Key_Right); a->setShortcutContext (Qt::WindowShortcut); addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( editRightBranch() ) ); - a = new QAction( tr( "Select first branch" ), this); + a = new QAction( tr( "Select first branch","Edit menu" ), this); a->setStatusTip (tr( "Select first branch" )); a->setShortcut (Qt::Key_Home ); a->setShortcutContext (Qt::WindowShortcut); @@ -762,7 +765,7 @@ actionListBranches.append(a); actionEditSelectFirst=a; connect( a, SIGNAL( triggered() ), this, SLOT( editFirstBranch() ) ); - a = new QAction( tr( "Select last branch" ),this); + a = new QAction( tr( "Select last branch","Edit menu" ),this); a->setStatusTip (tr( "Select last branch" )); a->setShortcut ( Qt::Key_End ); a->setShortcutContext (Qt::WindowShortcut); @@ -773,7 +776,7 @@ actionListBranches.append(a); actionEditSelectLast=a; - a = new QAction( tr( "Add Image" )+QString("..."), this); + a = new QAction( tr( "Add Image...","Edit menu" ), this); a->setStatusTip (tr( "Add Image" )); connect( a, SIGNAL( triggered() ), this, SLOT( editLoadImage() ) ); actionEditLoadImage=a; @@ -783,9 +786,9 @@ // Format Actions void Main::setupFormatActions() { - QMenu *formatMenu = menuBar()->addMenu (tr ("F&ormat")); - - QToolBar *tb = addToolBar( tr("Format Actions","Toolbars")); + QMenu *formatMenu = menuBar()->addMenu (tr ("F&ormat","Format menu")); + + QToolBar *tb = addToolBar( tr("Format Actions","Format Toolbar name")); tb->setObjectName ("formatTB"); QAction *a; QPixmap pix( 16,16); @@ -796,7 +799,7 @@ a->addTo( tb ); formatMenu->addAction (a); actionFormatColor=a; - a= new QAction( QPixmap(iconPath+"formatcolorpicker.png"), tr( "Pic&k color" ), this); + a= new QAction( QPixmap(iconPath+"formatcolorpicker.png"), tr( "Pic&k color","Edit menu" ), this); a->setStatusTip (tr( "Pick color\nHint: You can pick a color from another branch and color using CTRL+Left Button" ) ); a->setShortcut (Qt::CTRL + Qt::Key_K ); connect( a, SIGNAL( triggered() ), this, SLOT( formatPickColor() ) ); @@ -806,7 +809,7 @@ actionListBranches.append(a); actionFormatPickColor=a; - a= new QAction(QPixmap(iconPath+"formatcoloritem.png"), tr( "Color &branch" ), this); + a= new QAction(QPixmap(iconPath+"formatcoloritem.png"), tr( "Color &branch","Edit menu" ), this); a->setStatusTip ( tr( "Color branch" ) ); a->setShortcut (Qt::CTRL + Qt::Key_I); connect( a, SIGNAL( triggered() ), this, SLOT( formatColorItem() ) ); @@ -816,7 +819,7 @@ actionListBranches.append(a); actionFormatColorBranch=a; - a= new QAction(QPixmap(iconPath+"formatcolorbranch.png"), tr( "Color sub&tree" ), this); + a= new QAction(QPixmap(iconPath+"formatcolorbranch.png"), tr( "Color sub&tree","Edit menu" ), this); a->setStatusTip ( tr( "Color Subtree" )); a->setShortcut (Qt::CTRL + Qt::Key_T); connect( a, SIGNAL( triggered() ), this, SLOT( formatColorBranch() ) ); @@ -857,37 +860,37 @@ actionGroupFormatFrameTypes=new QActionGroup ( this); actionGroupFormatFrameTypes->setExclusive (true); - a = new QAction( tr( "No Frame" ), actionGroupFormatFrameTypes ); + a = new QAction( tr( "No Frame","Branch attribute" ), actionGroupFormatFrameTypes ); a->setStatusTip (tr("No Frame")); a->setToggleAction(true); connect( a, SIGNAL( triggered() ), this, SLOT( formatFrameNone() ) ); actionFormatFrameNone=a; - a = new QAction( tr( "Rectangle" ), actionGroupFormatFrameTypes); + a = new QAction( tr( "Rectangle""Branch attribute" ), actionGroupFormatFrameTypes); a->setStatusTip (tr( "Rectangle" )); a->setToggleAction(true); connect( a, SIGNAL( triggered() ), this, SLOT( formatFrameRectangle() ) ); actionFormatFrameRectangle=a; - a = new QAction( tr( "Include images vertically" ), this); + a = new QAction( tr( "Include images vertically","Branch attribute" ), this); a->setStatusTip ( tr ("Include top and bottom position of images into branch")); a->setToggleAction(true); connect( a, SIGNAL( triggered() ), this, SLOT( formatIncludeImagesVer() ) ); actionFormatIncludeImagesVer=a; - a = new QAction( tr( "Include images horizontally" ), this); + a = new QAction( tr( "Include images horizontally","Branch attribute" ), this); a->setStatusTip ( tr ("Include left and right position of images into branch")); a->setToggleAction(true); connect( a, SIGNAL( triggered() ), this, SLOT( formatIncludeImagesHor() ) ); actionFormatIncludeImagesHor=a; - a = new QAction( tr( "Hide link if object is not selected" ), this); + a = new QAction( tr( "Hide link if object is not selected","Branch attribute" ), this); a->setStatusTip (tr( "Hide link" )); a->setToggleAction(true); connect( a, SIGNAL( triggered() ), this, SLOT( formatHideLinkUnselected() ) ); actionFormatHideLinkUnselected=a; formatMenu->addSeparator(); - a= new QAction( tr( "&Use color of heading for link" ), this); + a= new QAction( tr( "&Use color of heading for link","Branch attribute" ), this); a->setStatusTip (tr( "Use same color for links and headings" )); a->setToggleAction(true); connect( a, SIGNAL( triggered() ), this, SLOT( formatToggleLinkColorHint() ) ); @@ -911,27 +914,27 @@ // View Actions void Main::setupViewActions() { - QToolBar *tb = addToolBar( tr("View Actions","Toolbars") ); + QToolBar *tb = addToolBar( tr("View Actions","View Toolbar name") ); tb->setLabel( "View Actions" ); tb->setObjectName ("viewTB"); QMenu *viewMenu = menuBar()->addMenu ( tr( "&View" )); QAction *a; - a = new QAction(QPixmap(iconPath+"viewmag-reset.png"), tr( "reset Zoom" ), this); + a = new QAction(QPixmap(iconPath+"viewmag-reset.png"), tr( "reset Zoom","View action" ), this); a->setStatusTip ( tr( "Zoom reset" ) ); a->setShortcut (Qt::CTRL + Qt::Key_0 ); a->addTo( tb ); viewMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT(viewZoomReset() ) ); - a = new QAction( QPixmap(iconPath+"viewmag+.png"), tr( "Zoom in" ), this); + a = new QAction( QPixmap(iconPath+"viewmag+.png"), tr( "Zoom in","View action" ), this); a->setStatusTip (tr( "Zoom in" )); a->setShortcut (Qt::CTRL + Qt::Key_Plus); a->addTo( tb ); viewMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT(viewZoomIn() ) ); - a = new QAction( QPixmap(iconPath+"viewmag-.png"), tr( "Zoom out" ), this); + a = new QAction( QPixmap(iconPath+"viewmag-.png"), tr( "Zoom out","View action" ), this); a->setStatusTip (tr( "Zoom out" )); a->setShortcut (Qt::CTRL + Qt::Key_Minus ); a->addTo( tb ); @@ -939,7 +942,7 @@ connect( a, SIGNAL( triggered() ), this, SLOT( viewZoomOut() ) ); - a = new QAction(QPixmap(flagsPath+"flag-note.png"), tr( "Show Note Editor" ),this); + a = new QAction(QPixmap(flagsPath+"flag-note.png"), tr( "Show Note Editor","View action" ),this); a->setStatusTip ( tr( "Show Note Editor" )); a->setShortcut ( Qt::CTRL + Qt::Key_E ); a->setToggleAction(true); @@ -952,7 +955,7 @@ connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleNoteEditor() ) ); actionViewToggleNoteEditor=a; - a = new QAction( tr( "Show history window" ),this ); + a = new QAction( tr( "Show history window","View action" ),this ); a->setStatusTip ( tr( "Show history window" )); a->setShortcut ( Qt::CTRL + Qt::Key_H ); a->setToggleAction(false); @@ -960,13 +963,13 @@ connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleHistory() ) ); actionViewToggleHistoryWindow=a; - a = new QAction(tr( "Next Window" ), this); + a = new QAction(tr( "Next Window","View action" ), this); a->setStatusTip ( tr( "&Next Window" ) ); a->setShortcut (Qt::ALT + Qt::Key_N ); viewMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT(windowNextEditor() ) ); - a = new QAction (tr( "Previous Window" ), this ); + a = new QAction (tr( "Previous Window","View action" ), this ); a->setStatusTip (tr( "&Previous Window" )); a->setShortcut (Qt::ALT + Qt::Key_P ); viewMenu->addAction (a); @@ -979,12 +982,12 @@ //QPopupMenu *menu = new QPopupMenu( this ); //menuBar()->insertItem( tr( "&Mode (using modifiers)" ), menu ); - QToolBar *tb = addToolBar( tr ("Modes when using modifiers","Toolbars") ); + QToolBar *tb = addToolBar( tr ("Modes when using modifiers","Modifier Toolbar name") ); tb->setObjectName ("modesTB"); QAction *a; actionGroupModModes=new QActionGroup ( this); actionGroupModModes->setExclusive (true); - a= new QAction( QPixmap(iconPath+"modecolor.png"), tr( "Use modifier to color branches" ), actionGroupModModes); + a= new QAction( QPixmap(iconPath+"modecolor.png"), tr( "Use modifier to color branches","Mode modifier" ), actionGroupModModes); a->setShortcut (Qt::Key_J); a->setStatusTip ( tr( "Use modifier to color branches" )); a->setToggleAction(true); @@ -992,14 +995,14 @@ a->setOn(true); actionModModeColor=a; - a= new QAction( QPixmap(iconPath+"modecopy.png"), tr( "Use modifier to copy" ), actionGroupModModes ); + a= new QAction( QPixmap(iconPath+"modecopy.png"), tr( "Use modifier to copy","Mode modifier" ), actionGroupModModes ); a->setShortcut( Qt::Key_K); a->setStatusTip( tr( "Use modifier to copy" )); a->setToggleAction(true); a->addTo (tb); actionModModeCopy=a; - a= new QAction(QPixmap(iconPath+"modelink.png"), tr( "Use modifier to draw xLinks" ), actionGroupModModes ); + a= new QAction(QPixmap(iconPath+"modelink.png"), tr( "Use modifier to draw xLinks","Mode modifier" ), actionGroupModModes ); a->setShortcut (Qt::Key_L); a->setStatusTip( tr( "Use modifier to draw xLinks" )); a->setToggleAction(true); @@ -1333,39 +1336,39 @@ QAction *a; - a = new QAction( tr( "Set application to open pdf files"), this); + a = new QAction( tr( "Set application to open pdf files","Settings action"), this); a->setStatusTip ( tr( "Set application to open pdf files")); connect( a, SIGNAL( triggered() ), this, SLOT( settingsPDF() ) ); settingsMenu->addAction (a); - a = new QAction( tr( "Set application to open external links"), this); + a = new QAction( tr( "Set application to open external links","Settings action"), this); a->setStatusTip( tr( "Set application to open external links")); connect( a, SIGNAL( triggered() ), this, SLOT( settingsURL() ) ); settingsMenu->addAction (a); settingsMenu->addSeparator(); - a = new QAction( tr( "Edit branch after adding it" ), this ); + a = new QAction( tr( "Edit branch after adding it","Settings action" ), this ); a->setStatusTip( tr( "Edit branch after adding it" )); a->setToggleAction(true); a->setOn ( settings.value ("/mapeditor/editmode/autoEdit",true).toBool()); settingsMenu->addAction (a); actionSettingsAutoEdit=a; - a= new QAction( tr( "Select branch after adding it" ), this ); + a= new QAction( tr( "Select branch after adding it","Settings action" ), this ); a->setStatusTip( tr( "Select branch after adding it" )); a->setToggleAction(true); a->setOn ( settings.value ("/mapeditor/editmode/autoSelectHeading",false).toBool() ); settingsMenu->addAction (a); actionSettingsAutoSelectHeading=a; - a= new QAction(tr( "Select existing heading" ), this); + a= new QAction(tr( "Select existing heading","Settings action" ), this); a->setStatusTip( tr( "Select heading before editing" )); a->setToggleAction(true); a->setOn ( settings.value ("/mapeditor/editmode/autoSelectText",true).toBool() ); settingsMenu->addAction (a); actionSettingsAutoSelectText=a; - a= new QAction( tr( "Delete key" ), this); + a= new QAction( tr( "Delete key","Settings action" ), this); a->setStatusTip( tr( "Delete key for deleting branches" )); a->setToggleAction(true); a->setOn ( settings.value ("/mapeditor/editmode/useDelKey",false).toBool() ); @@ -1373,14 +1376,14 @@ connect( a, SIGNAL( triggered() ), this, SLOT( settingsToggleDelKey() ) ); actionSettingsUseDelKey=a; - a= new QAction( tr( "Exclusive flags" ), this); + a= new QAction( tr( "Exclusive flags","Settings action" ), this); a->setStatusTip( tr( "Use exclusive flags in flag toolbars" )); a->setToggleAction(true); a->setOn ( settings.value ("/mapeditor/editmode/useFlagGroups",true).toBool() ); settingsMenu->addAction (a); actionSettingsUseFlagGroups=a; - a= new QAction( tr( "Use hide flags" ), this); + a= new QAction( tr( "Use hide flags","Settings action" ), this); a->setStatusTip( tr( "Use hide flag during exports " )); a->setToggleAction(true); a->setOn ( settings.value ("/export/useHideExport",true).toBool() ); @@ -1394,13 +1397,13 @@ QMenu *testMenu = menuBar()->addMenu( tr( "&Test" )); QAction *a; - a = new QAction( tr( "Test function" ), this); - a->setStatusTip( tr( "Call test function" )); + a = new QAction( "Test function" , this); + a->setStatusTip( "Call test function" ); a->setShortcut (Qt::Key_F4 ); connect( a, SIGNAL( triggered() ), this, SLOT( testFunction() ) ); testMenu->addAction (a); - a = new QAction( tr( "Command" ), this); - a->setStatusTip( tr( "Enter command to call in editor" )); + a = new QAction( "Command" , this); + a->setStatusTip( "Enter command to call in editor" ); a->setShortcut (Qt::Key_F5 ); connect( a, SIGNAL( triggered() ), this, SLOT( testCommand() ) ); testMenu->addAction (a); @@ -1409,20 +1412,20 @@ // Help Actions void Main::setupHelpActions() { - QMenu *helpMenu = menuBar()->addMenu ( tr( "&Help" )); + QMenu *helpMenu = menuBar()->addMenu ( tr( "&Help","Help menubar entry" )); QAction *a; - a = new QAction( tr( "Open VYM Documentation (pdf) " ), this ); + a = new QAction( tr( "Open VYM Documentation (pdf) ","Help action" ), this ); a->setStatusTip( tr( "Open VYM Documentation (pdf)" )); connect( a, SIGNAL( triggered() ), this, SLOT( helpDoc() ) ); helpMenu->addAction (a); - a = new QAction( tr( "About VYM" ), this); + a = new QAction( tr( "About VYM","Help action" ), this); a->setStatusTip( tr( "About VYM")+" "__VYM); connect( a, SIGNAL( triggered() ), this, SLOT( helpAbout() ) ); helpMenu->addAction (a); - a = new QAction( tr( "About QT" ), this); + a = new QAction( tr( "About QT","Help action" ), this); a->setStatusTip( tr( "Information about QT toolkit" )); connect( a, SIGNAL( triggered() ), this, SLOT( helpAboutQT() ) ); helpMenu->addAction (a); @@ -1450,11 +1453,11 @@ branchAddContextMenu->addAction ( actionEditImportReplace ); // Submenu "Remove" - branchRemoveContextMenu =branchContextMenu->addMenu (tr ("Remove")); + branchRemoveContextMenu =branchContextMenu->addMenu (tr ("Remove","Context menu name")); branchRemoveContextMenu->addAction (actionEditCut); branchRemoveContextMenu->addAction ( actionEditDelete ); - branchRemoveContextMenu->addAction ( actionEditRemoveBranchKeepChilds ); - branchRemoveContextMenu->addAction ( actionEditRemoveChilds ); + branchRemoveContextMenu->addAction ( actionEditDeleteKeepChilds ); + branchRemoveContextMenu->addAction ( actionEditDeleteChilds ); actionEditSaveBranch->addTo( branchContextMenu ); @@ -1472,7 +1475,7 @@ branchLinksContextMenu =new QMenu (this); branchContextMenu->addSeparator(); - branchLinksContextMenu=branchContextMenu->addMenu(tr("URLs and vymLinks")); + branchLinksContextMenu=branchContextMenu->addMenu(tr("URLs and vymLinks","Context menu name")); branchLinksContextMenu->addAction ( actionEditOpenURL ); branchLinksContextMenu->addAction ( actionEditOpenURLTab ); branchLinksContextMenu->addAction ( actionEditOpenMultipleURLTabs ); @@ -1493,15 +1496,15 @@ // Context Menu for XLinks in a branch menu // This will be populated "on demand" in MapEditor::updateActions branchContextMenu->addSeparator(); - branchXLinksContextMenuEdit =branchContextMenu->addMenu (tr ("Edit XLink")); - branchXLinksContextMenuFollow =branchContextMenu->addMenu (tr ("Follow XLink")); + branchXLinksContextMenuEdit =branchContextMenu->addMenu (tr ("Edit XLink","Context menu name")); + branchXLinksContextMenuFollow =branchContextMenu->addMenu (tr ("Follow XLink","Context menu name")); connect( branchXLinksContextMenuFollow, SIGNAL( triggered(QAction *) ), this, SLOT( editFollowXLink(QAction * ) ) ); connect( branchXLinksContextMenuEdit, SIGNAL( triggered(QAction *) ), this, SLOT( editEditXLink(QAction * ) ) ); // Context menu for floatimage floatimageContextMenu =new QMenu (this); - a= new QAction (tr ("Save image"),this); + a= new QAction (tr ("Save image","Context action"),this); connect (a, SIGNAL (triggered()), this, SLOT (editSaveImage())); floatimageContextMenu->addAction (a); @@ -1583,7 +1586,7 @@ if (!eList.isEmpty()) { QMessageBox mb( __VYM, - tr("The directory %1 is not empty.\nDo you risk to overwrite its contents?").arg(dir), + tr("The directory %1 is not empty.\nDo you risk to overwrite its contents?","write directory").arg(dir), QMessageBox::Warning, QMessageBox::Yes , QMessageBox::Cancel | QMessageBox::Default, @@ -2882,16 +2885,16 @@ fileSaveAs (PartOfMap); } -void Main::editRemoveBranchKeepChilds() +void Main::editDeleteKeepChilds() { if (currentMapEditor()) - currentMapEditor()->removeBranchKeepChilds(); + currentMapEditor()->deleteKeepChilds(); } -void Main::editRemoveChilds() +void Main::editDeleteChilds() { if (currentMapEditor()) - currentMapEditor()->removeChilds(); + currentMapEditor()->deleteChilds(); } void Main::editDeleteSelection() @@ -2965,9 +2968,8 @@ { if (currentMapEditor()) { - QColor col = QColorDialog::getColor( currentMapEditor()->getColor(), this ); + QColor col = QColorDialog::getColor((currentColor ), this ); if ( !col.isValid() ) return; - currentMapEditor()->setColor( col ); colorChanged( col ); } } @@ -2975,7 +2977,7 @@ void Main::formatPickColor() { if (currentMapEditor()) - colorChanged( currentMapEditor()->pickColor() ); + colorChanged( currentMapEditor()->getCurrentHeadingColor() ); } void Main::colorChanged(QColor c) @@ -2983,18 +2985,19 @@ QPixmap pix( 16, 16 ); pix.fill( c ); actionFormatColor->setIconSet( pix ); + currentColor=c; } void Main::formatColorItem() { if (currentMapEditor()) - currentMapEditor()->colorItem(); + currentMapEditor()->colorItem(currentColor); } void Main::formatColorBranch() { if (currentMapEditor()) - currentMapEditor()->colorBranch(); + currentMapEditor()->colorBranch(currentColor); } void Main::formatLinkStyleLine() @@ -3412,6 +3415,7 @@ { if (!currentMapEditor()) return; currentMapEditor()->testFunction(); + } void Main::testCommand() @@ -3425,38 +3429,45 @@ void Main::helpDoc() { - QString docpath; + QString locale = QLocale::system().name(); + QString docname; + if (locale.left(2)=="es") + docname="vym_es.pdf"; + else + docname="vym.pdf"; + QDir docdir; #if defined(Q_OS_MACX) - docpath="./vym.app/Contents/vym.pdf"; + docdir.setPath("./vym.app/Contents"); #else // default path in SUSE LINUX - docpath="/usr/share/doc/packages/vym/doc/vym.pdf"; + docdir.setPath("/usr/share/doc/packages/vym/doc"); #endif - if (!QFile (docpath).exists() ) + if (!docdir.exists() ) { // relative path for easy testing in tarball - docpath="doc/vym.pdf"; - if (!QFile (docpath).exists() ) + docdir.setPath("doc"); + if (!docdir.exists() ) { // relative path for testing while still writing vym.tex - docpath="doc/tex/vym.pdf"; - if (!QFile (docpath).exists() ) + docdir.setPath("doc/tex/vym.pdf"); + if (!docdir.exists() ) { // Try yet another one for Knoppix - docpath="/usr/share/doc/packages/vym/vym.pdf"; - if (!QFile (docpath).exists() ) + docdir.setPath("/usr/share/doc/packages/vym"); + if (!docdir.exists() ) { QMessageBox::critical(0, tr("Critcal error"), tr("Couldn't find the documentation\n" - "vym.pdf in various places.")); + "vym.pdf in various directories.")); return; } } } } + QString docpath=docdir.path()+"/"+docname; Process *pdfProc = new Process(); pdfProc->clearArguments(); pdfProc->addArgument( settings.value("/mainwindow/readerPDF").toString()); @@ -3467,7 +3478,7 @@ // error handling QMessageBox::warning(0, tr("Warning"), - tr("Couldn't find a viewer to open %1.\n").arg("vym.pdf")+ + tr("Couldn't find a viewer to open %1.\n").arg(docpath)+ tr("Please use Settings->")+tr("Set application to open PDF files")); settingsPDF(); return; diff -r 67cfa6e6b863 -r 7ced3733ba60 mainwindow.h --- a/mainwindow.h Tue Oct 24 15:36:38 2006 +0000 +++ b/mainwindow.h Mon Oct 30 12:39:37 2006 +0000 @@ -115,8 +115,8 @@ void editImportAdd(); void editImportReplace(); void editSaveBranch(); - void editRemoveBranchKeepChilds(); - void editRemoveChilds(); + void editDeleteKeepChilds(); + void editDeleteChilds(); void editDeleteSelection(); void editUpperBranch(); void editLowerBranch(); @@ -194,6 +194,8 @@ Q3PtrList actionListBranches; + QColor currentColor; + QAction* actionFileSave; QAction* actionFilePrint; QAction* actionEditUndo; @@ -223,8 +225,8 @@ QAction *actionEditAddBranchBefore; QAction *actionEditAddBranchAbove; QAction *actionEditAddBranchBelow; - QAction *actionEditRemoveBranchKeepChilds; - QAction *actionEditRemoveChilds; + QAction *actionEditDeleteKeepChilds; + QAction *actionEditDeleteChilds; QAction *actionEditImportAdd; QAction *actionEditImportReplace; QAction *actionEditSaveBranch; diff -r 67cfa6e6b863 -r 7ced3733ba60 mapcenterobj.cpp --- a/mapcenterobj.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/mapcenterobj.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -187,39 +187,6 @@ version=s; } -bool MapCenterObj::checkVersion () -{ - // returns true, if vym is able to read file regarding - // the version set with setVersion - QString s1=version.section (".",0,0); - QString s2=version.section (".",1,1); - QString s3=version.section (".",2,2); - bool ok; - int vv1 =QString(__VYM_VERSION).section (".",0,0).toInt(&ok,10); - int vv2 =QString(__VYM_VERSION).section (".",1,1).toInt(&ok,10); - int vv3 =QString(__VYM_VERSION).section (".",2,2).toInt(&ok,10); - int mv1=0; - int mv2=0; - int mv3=0; - if (!s1.isEmpty() ) mv1=s1.toInt(&ok,10); - if (!s2.isEmpty() ) mv2=s2.toInt(&ok,10); - if (!s3.isEmpty() ) mv3=s3.toInt(&ok,10); - - if (vv1 > mv1) - return true; - if (vv1 < mv1) - return false; - if (vv2 > mv2) - return true; - if (vv2 < mv2) - return false; - if (vv3 > mv3) - return true; - if (vv3 < mv3) - return false; - return true; -} - void MapCenterObj::setAuthor (const QString &s) { author=s; diff -r 67cfa6e6b863 -r 7ced3733ba60 mapcenterobj.h --- a/mapcenterobj.h Tue Oct 24 15:36:38 2006 +0000 +++ b/mapcenterobj.h Mon Oct 30 12:39:37 2006 +0000 @@ -25,7 +25,6 @@ LinkableMapObj* findMapObj(QPoint,LinkableMapObj*); // find MapObj virtual QString saveToDir (const QString&,const QString&,int, const QPoint&);// Save data recursivly to tempdir void setVersion(const QString &); - bool checkVersion(); // check if program version is higher than saved version void setAuthor (const QString &); QString getAuthor (); void setComment (const QString &); diff -r 67cfa6e6b863 -r 7ced3733ba60 mapeditor.cpp --- a/mapeditor.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/mapeditor.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -85,7 +85,6 @@ printer=NULL; - actColor=Qt::black; setColor (actColor); defLinkColor=QColor (0,0,255); defXLinkColor=QColor (180,180,180); linkcolorhint=DefaultColor; @@ -163,11 +162,6 @@ //cout <<"Destructor MapEditor\n"; } -QColor MapEditor::getColor() -{ - return actColor; -} - QColor MapEditor::getBackgroundColor() { return mapCanvas->backgroundColor(); @@ -372,15 +366,24 @@ mapCenter); } -void MapEditor::saveStateChangingPart(LinkableMapObj *undoSel, const QString &comment) +void MapEditor::saveStateChangingPart(LinkableMapObj *undoSel, LinkableMapObj* redoSel, const QString &rc, const QString &comment) { // save the selected part of the map, Undo will replace part of map QString undoSelection=""; - if (undoSel) undoSelection=undoSel->getSelectString(); + if (undoSel) + undoSelection=undoSel->getSelectString(); + else + qWarning ("MapEditor::saveStateChangingPart no undoSel given!"); + QString redoSelection=""; + if (redoSel) + redoSelection=undoSel->getSelectString(); + else + qWarning ("MapEditor::saveStateChangingPart no redoSel given!"); + saveState (PartOfMap, undoSelection, "", - "", "", + redoSelection, rc, comment, undoSel); } @@ -407,8 +410,6 @@ // save the selected mainbranch of the map, Undo will insert part of map saveState (PartOfMap, undoSelection, QString("addMapInsert (\"PATH\",%1)").arg(((BranchObj*)redoSel)->getNum()), -// undoSelection, QString("addMapInsert (\"PATH\",%1,%2)").arg(((BranchObj*)redoSel)->getNum()) -// .arg(((BranchObj*)redoSel)->x()).arg(((BranchObj*)redoSel)->y()), redoSelection, "delete ()", comment, redoSel); @@ -416,21 +417,6 @@ } } -void MapEditor::saveStateConstSelection(const QString &uc, const QString &rc, const QString &comment) -{ - // selection does not change during action, - // so just save commands for undo and redo - // and use current selection - - QString sel; - if (selection) sel=selection->getSelectString(); - - saveState (UndoCommand, - sel, uc, - sel, rc, - comment, - NULL); -} void MapEditor::saveState(LinkableMapObj *undoSel, const QString &uc, LinkableMapObj *redoSel, const QString &rc, const QString &comment) { @@ -473,8 +459,6 @@ */ cout << "ME::saveState() "<activateStandardFlag(s); - bo->updateFlagsToolbar(); - } - } - } else if (com=="setFlag") { if (!selection) @@ -1007,7 +1054,22 @@ // (map state is set later at end of load...) } else { - saveStateChangingPart(selection,"Load map"); + if (!selection || (typeid(*selection) != typeid(BranchObj) && + typeid(*selection) != typeid (MapCenterObj))) + return aborted; + BranchObj *bo=(BranchObj*)selection; + if (lmode==ImportAdd) + saveStateChangingPart( + selection, + selection, + QString("addMapInsert (%1)").arg(fname), + QString("Add map %1 to %2").arg(fname).arg(getName(bo))); + else + saveStateChangingPart( + selection, + selection, + QString("addMapReplace(%1)").arg(fname), + QString("Add map %1 to %2").arg(fname).arg(getName(bo))); } @@ -1412,6 +1474,12 @@ QString redoCommand= undoSet.readEntry (QString("/history/step-%1/redoCommand").arg(curStep)); QString redoSelection=undoSet.readEntry (QString("/history/step-%1/redoSelection").arg(curStep)); QString comment=undoSet.readEntry (QString("/history/step-%1/comment").arg(curStep)); + QString version=undoSet.readEntry ("/history/version"); + + if (!checkVersion(version)) + QMessageBox::warning(0,tr("Warning"), + tr("Version %1 of saved undo/redo data\ndoes not match current vym version %2.").arg(version).arg(__VYM_VERSION)); + // Find out current undo directory QString bakMapDir=QDir::convertSeparators (QString(tmpMapDir+"/undo-%1").arg(curStep)); @@ -1485,6 +1553,11 @@ QString redoCommand= undoSet.readEntry (QString("/history/step-%1/redoCommand").arg(curStep)); QString redoSelection=undoSet.readEntry (QString("/history/step-%1/redoSelection").arg(curStep)); QString comment=undoSet.readEntry (QString("/history/step-%1/comment").arg(curStep)); + QString version=undoSet.readEntry ("/history/version"); + + if (!checkVersion(version)) + QMessageBox::warning(0,tr("Warning"), + tr("Version %1 of saved undo/redo data\ndoes not match current vym version %2.").arg(version).arg(__VYM_VERSION)); // Find out current undo directory QString bakMapDir=QDir::convertSeparators (QString(tmpMapDir+"/undo-%1").arg(curStep)); @@ -1655,8 +1728,13 @@ if (selection && (typeid(*selection) == typeid(BranchObj) || typeid(*selection) == typeid(MapCenterObj))) { - saveStateChangingPart(selection,QString("Paste to %1").arg( getName(selection))); pasteNoSave(); + saveStateChangingPart( + selection, + selection, + "paste ()", + QString("Paste to %1").arg( getName(selection)) + ); mapCenter->reposition(); adjustCanvasSize(); } @@ -1664,7 +1742,12 @@ void MapEditor::cut() { - saveStateChangingPart(selection->getParObj(),QString("Cut %1").arg(getName(selection))); + saveStateChangingPart( + selection->getParObj(), + selection, + "cut ()", + QString("Cut %1").arg(getName(selection)) + ); copy(); cutNoSave(); mapCenter->reposition(); @@ -1766,8 +1849,10 @@ typeid(*selection) == typeid(MapCenterObj) ) ) { editingBO=(BranchObj*)selection; - saveStateConstSelection( + saveState( + selection, "setHeading (\""+editingBO->getHeading()+"\")", + selection, "setHeading (\""+s+"\")", QString("Set heading of %1 to \"%2\"").arg(getName(editingBO)).arg(s) ); editingBO->setHeading(s ); @@ -1870,11 +1955,12 @@ if (newbo) { - saveStateConstSelection ( - //QString ("delete (\"%1\")").arg(newbo->getSelectString()), + saveState( + selection, // FIXME sholdnt newbo be deleted here??? "delete ()", + selection, QString ("addBranch (%1)").arg(pos-2), - QString ("Add new branch to %1").arg(getName(bo))); //TODO undoCommand + QString ("Add new branch to %1").arg(getName(bo))); mapCenter->reposition(); adjustCanvasSize(); @@ -1936,7 +2022,12 @@ { FloatImageObj* fio=(FloatImageObj*)selection; BranchObj* par=(BranchObj*)(fio->getParObj()); - saveStateChangingPart(par, QString("Delete %1").arg(getName(fio))); + saveStateChangingPart( + par, + fio, + "delete ()", + QString("Delete %1").arg(getName(fio)) + ); fio->unselect(); selection=NULL; par->removeFloatImage(fio); @@ -2363,11 +2454,6 @@ } } -void MapEditor::setColor(QColor c) -{ - actColor=c; -} - void MapEditor::selectBackgroundColor() { QColor col = QColorDialog::getColor( mapCanvas->backgroundColor(), this ); @@ -2382,7 +2468,7 @@ mapCanvas->setBackgroundColor (c); } -QColor MapEditor::pickColor() +QColor MapEditor::getCurrentHeadingColor() { if (selection) { @@ -2390,13 +2476,15 @@ typeid(*selection) == typeid(MapCenterObj)) { BranchObj *bo=(BranchObj*)selection; - actColor=bo->getColor(); + return bo->getColor(); } } - return actColor; + + QMessageBox::warning(0,tr("Warning"),tr("Can't get color of heading,\nthere's no branch selected")); + return Qt::black; } -void MapEditor::colorItem() +void MapEditor::colorItem(QColor c) { if (selection) { @@ -2404,13 +2492,18 @@ typeid(*selection) == typeid(MapCenterObj)) { BranchObj *bo=(BranchObj*)selection; - saveStateChangingPart(selection, QString("Set color of %1 to %2").arg(getName(bo)).arg(actColor.name())); //TODO undoCommand - bo->setColor(actColor); // color branch + saveStateChangingPart( + selection, + selection, + QString ("colorItem (%1)").arg(c.name()), + QString("Set color of %1 to %2").arg(getName(bo)).arg(c.name()) + ); //TODO with complete API: undoCommand + bo->setColor(c); // color branch } } } -void MapEditor::colorBranch() +void MapEditor::colorBranch(QColor c) { if (selection) { @@ -2418,8 +2511,13 @@ typeid(*selection) == typeid(MapCenterObj)) { BranchObj *bo=(BranchObj*)selection; - saveStateChangingPart(selection, QString ("Set color of %1 and childs to %2").arg(getName(bo)).arg(actColor.name())); //TODO undoCommand - bo->setColorChilds(actColor); // color links, color childs + saveStateChangingPart( + selection, + selection, + QString ("colorBranch (%1)").arg(c.name()), + QString ("Set color of %1 and childs to %2").arg(getName(bo)).arg(c.name()) + ); + bo->setColorChilds(c); // color links, color childs } } } @@ -2444,7 +2542,10 @@ u="unsetFlag"; r="setFlag"; } - saveStateConstSelection(QString("%1 (\"%2\")").arg(u).arg(f), + saveState( + selection, + QString("%1 (\"%2\")").arg(u).arg(f), + selection, QString("%1 (\"%2\")").arg(r).arg(f), QString("Toggling standard flag \"%1\" of %2").arg(f).arg(getName(bo))); bo->toggleStandardFlag (f,mainWindow->useFlagGroups()); @@ -2526,6 +2627,24 @@ itFind=NULL; EOFind=false; } +void MapEditor::setURL(const QString &url) +{ + if (selection && (typeid(*selection) == typeid(BranchObj) || + typeid(*selection) == typeid(MapCenterObj)) ) + { + BranchObj *bo=(BranchObj*)selection; + QString oldurl=bo->getURL(); + bo->setURL (url); + saveState ( + selection, + QString ("setURL (\"%1\")").arg(oldurl), + selection, + QString ("setURL (\"%1\")").arg(url), + QString ("set URL of %1 to %2").arg(getName(bo)).arg(url) + ); + updateActions(); + } +} void MapEditor::editURL() { @@ -2538,12 +2657,8 @@ "VYM", tr("Enter URL:"), QLineEdit::Normal, bo->getURL(), &ok, this ); if ( ok) - { // user entered something and pressed OK - saveStateConstSelection("setURL (\""+bo->getURL()+"\")","setURL (\""+text+"\")", QString("Set URL of %1 to %21").arg(getName(bo)).arg(text)); - bo->setURL (text); - updateActions(); - } + setURL (text); } } @@ -2578,12 +2693,7 @@ { if (selection && (typeid(*selection) == typeid(BranchObj) || typeid(*selection) == typeid(MapCenterObj)) ) - { - BranchObj *bo=(BranchObj*)selection; - saveStateConstSelection("setURL (\""+bo->getURL()+"\")","setURL (\""+bo->getHeading()+"\")",QString("Copy heading of %1 to URL").arg(getName(bo))); - bo->setURL (bo->getHeading()); - updateActions(); - } + setURL (((BranchObj*)selection)->getHeading()); } void MapEditor::editBugzilla2URL() @@ -2593,9 +2703,7 @@ { BranchObj *bo=(BranchObj*)selection; QString url= "https://bugzilla.novell.com/show_bug.cgi?id="+bo->getHeading(); - saveStateConstSelection("setURL (\""+bo->getURL()+"\")","setURL (\""+url+"\")",QString("Use heading of %1 as link to Novell Bugzilla").arg(getName(bo))); - bo->setURL (url); - updateActions(); + setURL (url); } } @@ -2606,7 +2714,13 @@ { BranchObj *bo=(BranchObj*)selection; QString url= "http://keeper.suse.de:8080/webfate/match/id?value=ID"+bo->getHeading(); - saveStateConstSelection("setURL (\""+bo->getURL()+"\")","setURL (\""+url+"\")",QString("Use heading of %1 as link to FATE").arg(getName(bo))); + saveState( + selection, + "setURL (\""+bo->getURL()+"\")", + selection, + "setURL (\""+url+"\")", + QString("Use heading of %1 as link to FATE").arg(getName(bo)) + ); bo->setURL (url); updateActions(); } @@ -2628,7 +2742,13 @@ QString fn; if ( fd->exec() == QDialog::Accepted ) { - saveStateConstSelection("setVymLink (\""+bo->getVymLink()+"\")","setVymLink (\""+fd->selectedFile()+"\")",QString("Set vymlink of %1 to %2").arg(getName(bo)).arg(fd->selectedFile())); + saveState( + selection, + "setVymLink (\""+bo->getVymLink()+"\")", + selection, + "setVymLink (\""+fd->selectedFile()+"\")", + QString("Set vymlink of %1 to %2").arg(getName(bo)).arg(fd->selectedFile()) + ); bo->setVymLink (fd->selectedFile() ); updateActions(); mapCenter->reposition(); @@ -2644,7 +2764,13 @@ typeid(*selection) == typeid(MapCenterObj)) ) { BranchObj *bo=(BranchObj*)selection; - saveStateConstSelection("setVymLink (\""+bo->getVymLink()+"\")","setVymLink (\"\")",QString("Unset vymlink of %1").arg(getName(bo))); + saveState( + selection, + "setVymLink (\""+bo->getVymLink()+"\")", + selection, + "setVymLink (\"\")", + QString("Unset vymlink of %1").arg(getName(bo)) + ); bo->setVymLink ("" ); updateActions(); mapCenter->reposition(); @@ -2653,26 +2779,23 @@ } } -void MapEditor::toggleHideExport() +void MapEditor::setHideExport(bool b) { if (selection && (typeid(*selection) == typeid(BranchObj) || - typeid(*selection) == typeid(MapCenterObj)) || - (typeid(*selection)==typeid(FloatImageObj)) - ) - { + typeid(*selection)==typeid(FloatImageObj))) + { OrnamentedObj *oo=(OrnamentedObj*)selection; - QString s; - if (oo->hideInExport()) - { - oo->setHideInExport(false); - s="Unset"; - } - else - { - oo->setHideInExport(true); - s="Set"; - } - saveStateComplete(QString ("%1 hide export flag of %2").arg(s).arg(getName(selection))); //TODO undoCommand + oo->setHideInExport (b); + QString u= b ? "false" : "true"; + QString r=!b ? "false" : "true"; + + saveState( + selection, + QString ("setHideExport (%1)").arg(u), + selection, + QString ("setHideExport (%1)").arg(r), + QString ("Set HideExport flag of %1 to %2").arg(getName(oo)).arg (r) + ); updateActions(); mapCenter->reposition(); adjustCanvasSize(); @@ -2680,6 +2803,13 @@ } } +void MapEditor::toggleHideExport() +{ + if (selection && (typeid(*selection) == typeid(BranchObj) || + typeid(*selection)==typeid(FloatImageObj))) + setHideExport ( !((OrnamentedObj*)selection)->hideInExport() ); +} + QString MapEditor::getVymLink() { if (selection && (typeid(*selection) == typeid(BranchObj) || @@ -2709,18 +2839,19 @@ } -void MapEditor::removeBranchKeepChilds() +void MapEditor::deleteKeepChilds() { if (selection && (typeid(*selection) == typeid(BranchObj) )) { BranchObj* bo=(BranchObj*)selection; BranchObj* par=(BranchObj*)(bo->getParObj()); QPoint p=bo->getRelPos(); - QString s=QString("Remove %1 and keep its childs").arg(getName(bo)); - if (bo->getDepth()==1) - saveStateComplete(s); - else - saveStateChangingPart(selection->getParObj(),s); // TODO undoCommand + saveStateChangingPart( + selection->getParObj(), + selection, + "deleteKeepChilds ()", + QString("Remove %1 and keep its childs").arg(getName(bo)) + ); QString sel=selection->getSelectString(); unselect(); @@ -2733,12 +2864,17 @@ } } -void MapEditor::removeChilds() +void MapEditor::deleteChilds() { - if (selection && (typeid(*selection) == typeid(BranchObj) )) + if (selection && (typeid(*selection) == typeid(BranchObj) || + typeid(*selection)==typeid(MapCenterObj))) { - // TODO undoCommand - saveStateChangingPart(selection->getParObj(), QString("Remove childs of branch %1").arg(getName(selection))); + saveStateChangingPart( + selection->getParObj(), + selection, + "deleteChilds ()", + QString( "Remove childs of branch %1").arg(getName(selection)) + ); ((BranchObj*)selection)->removeChilds(); mapCenter->reposition(); } @@ -2908,12 +3044,24 @@ BranchObj *bo=((BranchObj*)selection); if (bo->countBranches()==0) return; if (bo->getDepth()==0) return; - QString s; + QString u,r; if (bo->isScrolled()) - s="Unscroll"; + { + r="unscroll"; + u="scroll"; + } else - s="Scroll"; - saveStateChangingPart(selection, QString ("%1 %2").arg(s).arg(getName(bo))); + { + u="scroll"; + r="unscroll"; + } + saveState( + selection, + QString ("%1 ()").arg(u), + selection, + QString ("%1 ()").arg(r), + QString ("%1 %2").arg(r).arg(getName(bo)) + ); bo->toggleScroll(); adjustCanvasSize(); canvas()->update(); @@ -2953,17 +3101,25 @@ QString fn; if ( fd->exec() == QDialog::Accepted ) { - saveStateChangingPart(selection, QString("Add floatimage to %1").arg(getName(selection))); // FIXME in QT4 use: lastImageDir=fd->directory(); lastImageDir=QDir (fd->dirPath()); QStringList flist = fd->selectedFiles(); QStringList::Iterator it = flist.begin(); + FloatImageObj *fio; while( it != flist.end() ) { fn = *it; bo->addFloatImage(); - // TODO check if load was successful - bo->getLastFloatImage()->load(*it); + fio=bo->getLastFloatImage(); + fio->load(*it); + // FIXME check if load of fio was successful + saveState( + (LinkableMapObj*)fio, + "delete ()", + selection, + QString ("loadFloatImage (%1)").arg(*it), + QString("Add floatimage %1 to %2").arg(*it).arg(getName(selection)) + ); bo->getLastFloatImage()->setOriginalFilename(fn); ++it; } @@ -3618,8 +3774,10 @@ FloatImageObj *fo=(FloatImageObj*)selection; QString pold=qpointToString(movingObj_orgRelPos); QString pnow=qpointToString(fo->getRelPos()); - saveStateConstSelection( + saveState( + selection, "moveRel "+pold, + selection, "moveRel "+pnow, QString("Move %1 to relativ position %2").arg(getName(selection)).arg(pnow)); @@ -3815,7 +3973,7 @@ QPixmap pix; if (Q3ImageDrag::decode(event, pix)) { - addFloatImage(pix); + addFloatImageInt(pix); event->accept(); update=true; } else @@ -3914,20 +4072,19 @@ } } -void MapEditor::addFloatImage(const QPixmap &img) +void MapEditor::addFloatImageInt (const QPixmap &img) { if (selection && (typeid(*selection) == typeid(BranchObj)) || (typeid(*selection) == typeid(MapCenterObj)) ) { BranchObj *bo=((BranchObj*)selection); - saveStateChangingPart(selection,QString("Add floatimage to %1").arg(getName(bo))); + //FIXME XXX saveStateChangingPart(selection,QString("Add floatimage to %1").arg(getName(bo))); //QString fn=fd->selectedFile(); //lastImageDir=fn.left(fn.findRev ("/")); - bo->addFloatImage(); - // FIXME check if load was successful - bo->getLastFloatImage()->load(img); - //bo->getLastFloatImage()->setOriginalFilename(fn); + FloatImageObj *fio=bo->addFloatImage(); + fio->load(img); + fio->setOriginalFilename("Image added by Drag and Drop"); mapCenter->reposition(); adjustCanvasSize(); canvas()->update(); @@ -3949,7 +4106,7 @@ { if (nop->state()==Q3NetworkProtocol::StDone) { QPixmap img(imageBuffer->buffer()); - addFloatImage(img); + addFloatImageInt (img); } if (imageBuffer) { diff -r 67cfa6e6b863 -r 7ced3733ba60 mapeditor.h --- a/mapeditor.h Tue Oct 24 15:36:38 2006 +0000 +++ b/mapeditor.h Mon Oct 30 12:39:37 2006 +0000 @@ -20,7 +20,6 @@ public: MapEditor(QWidget* parent=0, const char* name=0, Qt::WFlags f=0); ~MapEditor(); - QColor getColor(); QColor getBackgroundColor(); MapCenterObj* getMapCenter(); Q3Canvas* getCanvas(); @@ -32,16 +31,15 @@ void makeTmpDirs(); // create temporary directories QString saveToDir(const QString&,const QString &,bool, const QPoint &,LinkableMapObj*); void saveStateComplete (const QString &); - void saveStateChangingPart (LinkableMapObj *, const QString &); + void saveStateChangingPart (LinkableMapObj *, LinkableMapObj *, const QString &, const QString &); void saveStateRemovingPart (LinkableMapObj *, const QString &); - void saveStateConstSelection (const QString &, const QString &, const QString &); void saveState(LinkableMapObj *, const QString &, LinkableMapObj *, const QString &, const QString &); void saveState(const QString &, const QString &, const QString &, const QString &, const QString &); void saveState(const SaveMode&, const QString &, const QString &, const QString &, const QString &, const QString &, LinkableMapObj *); public: void parseAtom(const QString &); private: - void addFloatImage(const QPixmap &img); + void addFloatImageInt(const QPixmap &img); private slots: void fetchImage(const QString &img); @@ -123,16 +121,16 @@ void selectRightBranch(); void selectFirstBranch(); void selectLastBranch(); - void setColor(QColor); void selectBackgroundColor(); void setBackgroundColor(QColor); - QColor pickColor(); - void colorItem(); - void colorBranch(); + QColor getCurrentHeadingColor(); + void colorItem(QColor); + void colorBranch(QColor); void toggleStandardFlag(QString); virtual void setViewCenter(); // needed for zooming BranchObj* findText(QString,bool); // Find object void findReset(); // Reset Find + void setURL(const QString &); // set the URL void editURL(); // edit the URL QString getURL(); // returns URL of selection or "" QStringList getURLs(); // returns URLs of subtree @@ -143,9 +141,10 @@ void deleteVymLink(); // delete link to another map QString getVymLink(); // return path to map QStringList getVymLinks(); // return paths in subtree + void setHideExport(bool); // toggle the export flag void toggleHideExport(); // toggle the export flag - void removeBranchKeepChilds(); // remove but keep childs - void removeChilds(); // remove childs + void deleteKeepChilds(); // remove but keep childs + void deleteChilds(); // remove childs void editMapInfo(); // dialog to enter author, ... void updateActions(); // update e.g. format buttons void updateNoteFlag(); // when TextEditor changes @@ -198,7 +197,6 @@ bool adjustCanvasRequested; // collect requests until end of user event BranchObj *editingBO; // entering Text into BO - QColor actColor; // actual color QColor defLinkColor; // default color for links QColor defXLinkColor; // default color for xlinks int defXLinkWidth; // default width for xlinks diff -r 67cfa6e6b863 -r 7ced3733ba60 ornamentedobj.cpp --- a/ornamentedobj.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/ornamentedobj.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -366,7 +366,7 @@ attribut("absPosY",QString().setNum(absPos.y(),10)); else { - if (depth==1) + if (depth==1 || typeid (*this)==typeid (FloatImageObj)) posAttr= attribut("relPosX",QString().setNum(relPos.x(),10)) + attribut("relPosY",QString().setNum(relPos.y(),10)); diff -r 67cfa6e6b863 -r 7ced3733ba60 texteditor.cpp --- a/texteditor.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/texteditor.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -35,7 +35,7 @@ connect (e, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) ); setCentralWidget( e ); statusBar()->message( tr("Ready","Statusbar message"), statusbarTime); - setCaption(__VYM " - " +tr ("Note Editor")); + setCaption(__VYM " - " +tr ("Note Editor","Window caption")); connect(e, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)), @@ -196,11 +196,11 @@ { QToolBar *tb = addToolBar ( tr("Note Actions") ); tb->setObjectName ("noteEditorFileActions"); - QMenu *fileMenu = menuBar()->addMenu( tr( "&Note" )); + QMenu *fileMenu = menuBar()->addMenu( tr( "&Note","Menubar" )); QAction *a; a = new QAction( QPixmap( iconPath+"fileopen.png"), tr( "&Import..." ),this); - a->setStatusTip (tr( "Import" ) ); + a->setStatusTip (tr( "Import","Status tip for Note menu" ) ); a->setShortcut( Qt::CTRL + Qt::Key_O ); connect( a, SIGNAL( activated() ), this, SLOT( textLoad() ) ); tb->addAction (a); @@ -209,7 +209,7 @@ fileMenu->addSeparator(); a = new QAction( QPixmap(iconPath+"filesave.png" ), tr( "&Export..." ),this); - a->setStatusTip (tr( "Export Note (HTML)" ) ); + a->setStatusTip (tr( "Export Note (HTML)","Status tip for Note menu" ) ); a->setShortcut( Qt::CTRL + Qt::Key_S ); connect( a, SIGNAL( activated() ), this, SLOT( textSave() ) ); tb->addAction (a); @@ -217,13 +217,13 @@ actionFileSave=a; a = new QAction( QPixmap(), tr( "Export &As... (HTML)" ), this); - a->setStatusTip (tr( "Export Note As (HTML) " )); + a->setStatusTip (tr( "Export Note As (HTML) ","Status tip for Note Menu" )); connect( a, SIGNAL( activated() ), this, SLOT( textSaveAs() ) ); fileMenu->addAction (a); actionFileSaveAs=a; a = new QAction(QPixmap(), tr( "Export &As...(ASCII)" ), this); - a->setStatusTip ( tr( "Export Note As (ASCII) " ) ); + a->setStatusTip ( tr( "Export Note As (ASCII) ","Status tip for note menu" ) ); a->setShortcut(Qt::ALT + Qt::Key_X ); connect( a, SIGNAL( activated() ), this, SLOT( textExportAsASCII() ) ); fileMenu->addAction (a); @@ -231,7 +231,7 @@ fileMenu->addSeparator(); a = new QAction( QPixmap(iconPath+"fileprint.png" ), tr( "&Print..." ),this); - a->setStatusTip (tr( "Print Note" ) ); + a->setStatusTip (tr( "Print Note","Status tip for note menu" ) ); a->setShortcut( Qt::CTRL + Qt::Key_P ); connect( a, SIGNAL( activated() ), this, SLOT( textPrint() ) ); tb->addAction (a); @@ -247,7 +247,7 @@ QAction *a; a = new QAction(QPixmap(iconPath+"undo.png"), tr( "&Undo" ), this ); - a->setStatusTip ( tr( "Undo" ) ); + a->setStatusTip ( tr( "Undo","Status tip for note menu" ) ); a->setShortcut(Qt::CTRL + Qt::Key_Z ); connect( a, SIGNAL( activated() ), e, SLOT( undo() ) ); editMenu->addAction (a); @@ -255,7 +255,7 @@ actionEditUndo=a; a = new QAction(QPixmap(iconPath+"redo.png" ), tr( "&Redo" ),this); - a->setStatusTip ( tr( "Redo" ) ); + a->setStatusTip ( tr( "Redo","Status tip for note menu" ) ); a->setShortcut( Qt::CTRL + Qt::Key_Y ); connect( a, SIGNAL( activated() ), e, SLOT( redo() ) ); editMenu->addAction (a); @@ -264,14 +264,14 @@ editMenu->addSeparator(); a = new QAction(QPixmap(), tr( "Select and copy &all" ),this); - a->setStatusTip ( tr( "Select and copy all" ) ); + a->setStatusTip ( tr( "Select and copy all","Status tip for note menu" ) ); a->setShortcut( Qt::CTRL + Qt::Key_A ); connect( a, SIGNAL( activated() ), this, SLOT( editCopyAll() ) ); editMenu->addAction (a); editMenu->addSeparator(); a = new QAction(QPixmap(iconPath+"editcopy.png" ), tr( "&Copy" ),this); - a->setStatusTip ( tr( "Copy" ) ); + a->setStatusTip ( tr( "Copy","Status tip for note menu" ) ); a->setShortcut( Qt::CTRL + Qt::Key_C ); connect( a, SIGNAL( activated() ), e, SLOT( copy() ) ); editMenu->addAction (a); @@ -279,7 +279,7 @@ actionEditCopy=a; a = new QAction(QPixmap(iconPath+"editcut.png" ), tr( "Cu&t" ),this); - a->setStatusTip ( tr( "Cut" ) ); + a->setStatusTip ( tr( "Cut","Status tip for note menu" ) ); a->setShortcut( Qt::CTRL + Qt::Key_X ); connect( a, SIGNAL( activated() ), e, SLOT( cut() ) ); editMenu->addAction (a); @@ -287,7 +287,7 @@ actionEditCut=a; a = new QAction(QPixmap(iconPath+"editpaste.png" ), tr( "&Paste" ),this); - a->setStatusTip ( tr( "Paste" ) ); + a->setStatusTip ( tr( "Paste","Status tip for note menu" ) ); a->setShortcut( Qt::CTRL + Qt::Key_V ); connect( a, SIGNAL( activated() ), e, SLOT( paste() ) ); editMenu->addAction (a); @@ -295,7 +295,7 @@ actionEditPaste=a; a = new QAction( QPixmap( iconPath+"edittrash.png"), tr( "&Delete All" ), this); - a->setStatusTip (tr( "Delete all" ) ); + a->setStatusTip (tr( "Delete all","Status tip for note menu" ) ); connect( a, SIGNAL( activated() ), e, SLOT( clear() ) ); editMenu->addAction (a); tb->addAction (a); @@ -312,7 +312,7 @@ QAction *a; a = new QAction( QPixmap(iconPath+"formatfixedfont.png"), tr( "&Font hint" ), Qt::ALT + Qt::Key_I, this, "fontHint" ); - a->setStatusTip (tr( "Toggle font hint for the whole text" ) ); + a->setStatusTip (tr( "Toggle font hint for the whole text","Status tip for note menu" ) ); a->setToggleAction (true); a->setOn (settings.value("/noteeditor/fonts/useFixedByDefault",false).toBool() ); connect( a, SIGNAL( activated() ), this, SLOT( toggleFonthint() ) ); @@ -429,19 +429,19 @@ QAction *a; a = new QAction(tr( "Set &fixed font" ), this); - a->setStatusTip ( tr( "Set fixed font" )); + a->setStatusTip ( tr( "Set fixed font","Status tip for note menu" )); connect( a, SIGNAL( activated() ), this, SLOT( setFixedFont() ) ); settingsMenu->addAction (a); actionSettingsFixedFont=a; a = new QAction(tr( "Set &variable font" ), this); - a->setStatusTip ( tr( "Set variable font" ) ); + a->setStatusTip ( tr( "Set variable font","Status tip for note menu" ) ); connect( a, SIGNAL( activated() ), this, SLOT( setVarFont() ) ); settingsMenu->addAction (a); actionSettingsVarFont=a; a = new QAction(tr( "&fixed font is default" ), this); - a->setStatusTip (tr( "Used fixed font by default" ) ); + a->setStatusTip (tr( "Used fixed font by default","Status tip for note menu" ) ); a->setToggleAction (true); // set state later in constructor... settingsMenu->addAction (a); @@ -559,9 +559,7 @@ if (file.exists()) { QMessageBox mb( __VYM, - tr("The file ") + fn + - tr(" exists already. " - "Do you want to overwrite it?"), + tr("The file %1\nexists already.\nDo you want to overwrite it?","dialog 'save note as'").arg(fn), QMessageBox::Warning, QMessageBox::Yes | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape, @@ -585,7 +583,7 @@ return; } } - statusBar()->message(tr( "Couldn't export note ") + fn, statusbarTime ); + statusBar()->message(tr( "Couldn't export note ","dialog 'save note as'") + fn, statusbarTime ); } @@ -635,10 +633,8 @@ QFile file (fn); if (file.exists()) { - QMessageBox mb( "VYM", - tr("The file ") + fn + - tr(" exists already. " - "Do you want to overwrite it?"), + QMessageBox mb( __VYM, + tr("The file %1\nexists already.\nDo you want to overwrite it?","dialog 'save note as'").arg(fn), QMessageBox::Warning, QMessageBox::Yes | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape, @@ -673,7 +669,7 @@ QPrinter printer; QPrintDialog *dialog = new QPrintDialog(&printer, this); - dialog->setWindowTitle(tr("Print Document")); + dialog->setWindowTitle(tr("Print Note")); if (dialog->exec() != QDialog::Accepted) return; diff -r 67cfa6e6b863 -r 7ced3733ba60 version.h --- a/version.h Tue Oct 24 15:36:38 2006 +0000 +++ b/version.h Mon Oct 30 12:39:37 2006 +0000 @@ -1,8 +1,13 @@ #ifndef VERSION_H #define VERSION_H +#include + #define __VYM "VYM" #define __VYM_VERSION "1.8.58" -#define __BUILD_DATE "October 24, 2006" +#define __BUILD_DATE "October 25, 2006" + + +bool checkVersion(const QString &); #endif diff -r 67cfa6e6b863 -r 7ced3733ba60 vym.pro --- a/vym.pro Tue Oct 24 15:36:38 2006 +0000 +++ b/vym.pro Mon Oct 30 12:39:37 2006 +0000 @@ -82,6 +82,7 @@ showtextdialog.cpp \ selection.cpp \ texteditor.cpp \ + version.cpp \ xml.cpp \ xsltproc.cpp \ settings.cpp \ diff -r 67cfa6e6b863 -r 7ced3733ba60 xml.cpp --- a/xml.cpp Tue Oct 24 15:36:38 2006 +0000 +++ b/xml.cpp Mon Oct 30 12:39:37 2006 +0000 @@ -51,14 +51,18 @@ const QString& eName, const QXmlAttributes& atts ) { QColor col; - //cout << "startElement <"< state="< state="<setVersion(atts.value( "version" )); - if (!mc->checkVersion()) + if (!checkVersion(atts.value("version"))) QMessageBox::warning( 0, "Warning: Version Problem" , "

Map is newer than VYM

" "

The map you are just trying to load was " @@ -66,6 +70,8 @@ "The version of this vym is " __VYM_VERSION ". If you run into problems after pressing " "the ok-button below, updating vym should help."); + else + mc->setVersion(atts.value( "version" )); } if (loadMode==NewMap)