diff -r 1fc21685e3ea -r ab118b86bc54 mainwindow.cpp --- a/mainwindow.cpp Mon May 21 13:05:26 2007 +0000 +++ b/mainwindow.cpp Wed May 30 15:23:07 2007 +0000 @@ -341,6 +341,11 @@ connect( a, SIGNAL( triggered() ), this, SLOT( fileExportASCII() ) ); fileExportMenu->addAction (a); + a = new QAction( "Spreadsheet (CSV)...", this); + a->setStatusTip ( tr( "Export as %1").arg("CSV "+tr("(still experimental)" ))); + connect( a, SIGNAL( triggered() ), this, SLOT( fileExportCSV() ) ); + fileExportMenu->addAction (a); + 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() ) ); @@ -2364,6 +2369,25 @@ } } +void Main::fileExportCSV() +{ + MapEditor *me=currentMapEditor(); + if (me) + { + ExportCSV ex; + ex.setMapCenter(me->getMapCenter()); + ex.addFilter ("CSV (*.csv)"); + ex.setDir(lastImageDir); + ex.setCaption(vymName+ " -" +tr("Export as CSV")+" "+tr("(still experimental)")); + if (ex.execDialog() ) + { + me->setExportMode(true); + ex.doExport(); + me->setExportMode(false); + } + } +} + void Main::fileExportLaTeX() { MapEditor *me=currentMapEditor(); @@ -3297,10 +3321,10 @@ void Main::windowToggleNoteEditor() { - if (textEditor->isVisible() ) - textEditor->hide(); - else - textEditor->show(); + if (textEditor->showWithMain() ) + windowHideNoteEditor(); + else + windowShowNoteEditor(); } void Main::windowToggleHistory() @@ -3584,12 +3608,14 @@ void Main::windowShowNoteEditor() { + textEditor->setShowWithMain(true); textEditor->show(); actionViewToggleNoteEditor->setOn (true); } void Main::windowHideNoteEditor() { + textEditor->setShowWithMain(false); textEditor->hide(); actionViewToggleNoteEditor->setOn (false); }