mainwindow.cpp
changeset 505 244e309b4047
parent 502 f3465a5f0dc4
child 514 497fab7d1404
     1.1 --- a/mainwindow.cpp	Thu Jun 14 10:21:46 2007 +0000
     1.2 +++ b/mainwindow.cpp	Mon Jun 18 15:10:18 2007 +0000
     1.3 @@ -869,7 +869,7 @@
     1.4      connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleLine() ) );
     1.5  	formatMenu->addAction (a);
     1.6  	actionFormatLinkStyleLine=a;
     1.7 -    a= new QAction( tr( "Linkstyle Parabel" ), actionGroupFormatLinkStyles);
     1.8 +    a= new QAction( tr( "Linkstyle Curve" ), actionGroupFormatLinkStyles);
     1.9  	a->setStatusTip (tr( "Line" ));
    1.10  	a->setToggleAction(true);
    1.11      connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleParabel() ) );
    1.12 @@ -881,7 +881,7 @@
    1.13      connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStylePolyLine() ) );
    1.14  	formatMenu->addAction (a);
    1.15  	actionFormatLinkStylePolyLine=a;
    1.16 -    a= new QAction( tr( "Linkstyle Thick Parabel" ), actionGroupFormatLinkStyles);
    1.17 +    a= new QAction( tr( "Linkstyle Thick Curve" ), actionGroupFormatLinkStyles);
    1.18  	a->setStatusTip (tr( "PolyParabel" ) );
    1.19  	a->setToggleAction(true);
    1.20  	a->setChecked (true);
    1.21 @@ -1434,7 +1434,7 @@
    1.22      a= new QAction( tr( "Delete key","Settings action" ), this);
    1.23      a->setStatusTip( tr( "Delete key for deleting branches" ));
    1.24  	a->setToggleAction(true);
    1.25 -	a->setOn ( settings.value ("/mapeditor/editmode/useDelKey",false).toBool() );
    1.26 +	a->setOn ( settings.value ("/mapeditor/editmode/useDelKey",true).toBool() );
    1.27  	settingsMenu->addAction (a);
    1.28      connect( a, SIGNAL( triggered() ), this, SLOT( settingsToggleDelKey() ) );
    1.29  	actionSettingsUseDelKey=a;
    1.30 @@ -1483,6 +1483,11 @@
    1.31      connect( a, SIGNAL( triggered() ), this, SLOT( helpDoc() ) );
    1.32  	helpMenu->addAction (a);
    1.33  
    1.34 +    a = new QAction(  tr( "Open VYM example maps ","Help action" ), this );
    1.35 +    a->setStatusTip( tr( "Open VYM example maps " ));
    1.36 +    connect( a, SIGNAL( triggered() ), this, SLOT( helpDemo() ) );
    1.37 +	helpMenu->addAction (a);
    1.38 +
    1.39      a = new QAction( tr( "About VYM","Help action" ), this);
    1.40      a->setStatusTip( tr( "About VYM")+vymName);
    1.41      connect( a, SIGNAL( triggered() ), this, SLOT( helpAbout() ) );
    1.42 @@ -1583,7 +1588,7 @@
    1.43  	actionFormatLinkColor->addTo( canvasContextMenu );
    1.44  	actionFormatSelectionColor->addTo( canvasContextMenu );
    1.45  	actionFormatBackColor->addTo( canvasContextMenu );
    1.46 -	actionFormatBackImage->addTo( canvasContextMenu );
    1.47 +	// actionFormatBackImage->addTo( canvasContextMenu );  //FIXME makes vym too slow: postponed for later version 
    1.48  
    1.49  	// Menu for last opened files
    1.50  	// Create actions
    1.51 @@ -3730,6 +3735,34 @@
    1.52  }
    1.53  
    1.54  
    1.55 +void Main::helpDemo()
    1.56 +{
    1.57 +	QStringList filters;
    1.58 +	filters <<"VYM example map (*.vym)";
    1.59 +	QFileDialog *fd=new QFileDialog( this);
    1.60 +	fd->setDir (QDir(vymBaseDir.path()+"/demos"));
    1.61 +	fd->setFileMode (QFileDialog::ExistingFiles);
    1.62 +	fd->setFilters (filters);
    1.63 +	fd->setCaption(vymName+ " - " +tr("Load vym example map"));
    1.64 +	fd->show();
    1.65 +
    1.66 +	QString fn;
    1.67 +	if ( fd->exec() == QDialog::Accepted )
    1.68 +	{
    1.69 +		lastFileDir=fd->directory().path();
    1.70 +	    QStringList flist = fd->selectedFiles();
    1.71 +		QStringList::Iterator it = flist.begin();
    1.72 +		while( it != flist.end() ) 
    1.73 +		{
    1.74 +			fn = *it;
    1.75 +			fileLoad(*it, NewMap);				   
    1.76 +			++it;
    1.77 +		}
    1.78 +	}
    1.79 +	delete (fd);
    1.80 +}
    1.81 +
    1.82 +
    1.83  void Main::helpAbout()
    1.84  {
    1.85  	AboutDialog ad;