diff -r f3465a5f0dc4 -r 218b0e2c8bfd mainwindow.cpp --- a/mainwindow.cpp Thu Jun 14 10:21:41 2007 +0000 +++ b/mainwindow.cpp Mon Jun 18 15:10:19 2007 +0000 @@ -869,7 +869,7 @@ connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleLine() ) ); formatMenu->addAction (a); actionFormatLinkStyleLine=a; - a= new QAction( tr( "Linkstyle Parabel" ), actionGroupFormatLinkStyles); + a= new QAction( tr( "Linkstyle Curve" ), actionGroupFormatLinkStyles); a->setStatusTip (tr( "Line" )); a->setToggleAction(true); connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleParabel() ) ); @@ -881,7 +881,7 @@ connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStylePolyLine() ) ); formatMenu->addAction (a); actionFormatLinkStylePolyLine=a; - a= new QAction( tr( "Linkstyle Thick Parabel" ), actionGroupFormatLinkStyles); + a= new QAction( tr( "Linkstyle Thick Curve" ), actionGroupFormatLinkStyles); a->setStatusTip (tr( "PolyParabel" ) ); a->setToggleAction(true); a->setChecked (true); @@ -1434,7 +1434,7 @@ 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() ); + a->setOn ( settings.value ("/mapeditor/editmode/useDelKey",true).toBool() ); settingsMenu->addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( settingsToggleDelKey() ) ); actionSettingsUseDelKey=a; @@ -1483,6 +1483,11 @@ connect( a, SIGNAL( triggered() ), this, SLOT( helpDoc() ) ); helpMenu->addAction (a); + a = new QAction( tr( "Open VYM example maps ","Help action" ), this ); + a->setStatusTip( tr( "Open VYM example maps " )); + connect( a, SIGNAL( triggered() ), this, SLOT( helpDemo() ) ); + helpMenu->addAction (a); + a = new QAction( tr( "About VYM","Help action" ), this); a->setStatusTip( tr( "About VYM")+vymName); connect( a, SIGNAL( triggered() ), this, SLOT( helpAbout() ) ); @@ -1583,7 +1588,7 @@ actionFormatLinkColor->addTo( canvasContextMenu ); actionFormatSelectionColor->addTo( canvasContextMenu ); actionFormatBackColor->addTo( canvasContextMenu ); - actionFormatBackImage->addTo( canvasContextMenu ); + // actionFormatBackImage->addTo( canvasContextMenu ); //FIXME makes vym too slow: postponed for later version // Menu for last opened files // Create actions @@ -3730,6 +3735,34 @@ } +void Main::helpDemo() +{ + QStringList filters; + filters <<"VYM example map (*.vym)"; + QFileDialog *fd=new QFileDialog( this); + fd->setDir (QDir(vymBaseDir.path()+"/demos")); + fd->setFileMode (QFileDialog::ExistingFiles); + fd->setFilters (filters); + fd->setCaption(vymName+ " - " +tr("Load vym example map")); + fd->show(); + + QString fn; + if ( fd->exec() == QDialog::Accepted ) + { + lastFileDir=fd->directory().path(); + QStringList flist = fd->selectedFiles(); + QStringList::Iterator it = flist.begin(); + while( it != flist.end() ) + { + fn = *it; + fileLoad(*it, NewMap); + ++it; + } + } + delete (fd); +} + + void Main::helpAbout() { AboutDialog ad;