1.1 --- a/mainwindow.cpp Mon May 21 13:05:26 2007 +0000
1.2 +++ b/mainwindow.cpp Wed May 30 15:23:07 2007 +0000
1.3 @@ -341,6 +341,11 @@
1.4 connect( a, SIGNAL( triggered() ), this, SLOT( fileExportASCII() ) );
1.5 fileExportMenu->addAction (a);
1.6
1.7 + a = new QAction( "Spreadsheet (CSV)...", this);
1.8 + a->setStatusTip ( tr( "Export as %1").arg("CSV "+tr("(still experimental)" )));
1.9 + connect( a, SIGNAL( triggered() ), this, SLOT( fileExportCSV() ) );
1.10 + fileExportMenu->addAction (a);
1.11 +
1.12 a = new QAction( tr("KDE Bookmarks","File menu"), this);
1.13 a->setStatusTip( tr( "Export as %1").arg(tr("KDE Bookmarks" )));
1.14 connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDEBookmarks() ) );
1.15 @@ -2364,6 +2369,25 @@
1.16 }
1.17 }
1.18
1.19 +void Main::fileExportCSV()
1.20 +{
1.21 + MapEditor *me=currentMapEditor();
1.22 + if (me)
1.23 + {
1.24 + ExportCSV ex;
1.25 + ex.setMapCenter(me->getMapCenter());
1.26 + ex.addFilter ("CSV (*.csv)");
1.27 + ex.setDir(lastImageDir);
1.28 + ex.setCaption(vymName+ " -" +tr("Export as CSV")+" "+tr("(still experimental)"));
1.29 + if (ex.execDialog() )
1.30 + {
1.31 + me->setExportMode(true);
1.32 + ex.doExport();
1.33 + me->setExportMode(false);
1.34 + }
1.35 + }
1.36 +}
1.37 +
1.38 void Main::fileExportLaTeX()
1.39 {
1.40 MapEditor *me=currentMapEditor();
1.41 @@ -3297,10 +3321,10 @@
1.42
1.43 void Main::windowToggleNoteEditor()
1.44 {
1.45 - if (textEditor->isVisible() )
1.46 - textEditor->hide();
1.47 - else
1.48 - textEditor->show();
1.49 + if (textEditor->showWithMain() )
1.50 + windowHideNoteEditor();
1.51 + else
1.52 + windowShowNoteEditor();
1.53 }
1.54
1.55 void Main::windowToggleHistory()
1.56 @@ -3584,12 +3608,14 @@
1.57
1.58 void Main::windowShowNoteEditor()
1.59 {
1.60 + textEditor->setShowWithMain(true);
1.61 textEditor->show();
1.62 actionViewToggleNoteEditor->setOn (true);
1.63 }
1.64
1.65 void Main::windowHideNoteEditor()
1.66 {
1.67 + textEditor->setShowWithMain(false);
1.68 textEditor->hide();
1.69 actionViewToggleNoteEditor->setOn (false);
1.70 }