1.8.73 - beta testing
authorinsilmaril
Mon Jun 18 15:10:18 2007 +0000 (2007-06-18)
changeset 505244e309b4047
parent 504 731728086341
child 506 fcd1836b68e6
1.8.73 - beta testing
demos/liveform.vym
demos/todo.vym
mainwindow.cpp
mainwindow.h
mapeditor.cpp
mapeditor.h
version.h
     1.1 Binary file demos/liveform.vym has changed
     2.1 Binary file demos/todo.vym has changed
     3.1 --- a/mainwindow.cpp	Thu Jun 14 10:21:46 2007 +0000
     3.2 +++ b/mainwindow.cpp	Mon Jun 18 15:10:18 2007 +0000
     3.3 @@ -869,7 +869,7 @@
     3.4      connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleLine() ) );
     3.5  	formatMenu->addAction (a);
     3.6  	actionFormatLinkStyleLine=a;
     3.7 -    a= new QAction( tr( "Linkstyle Parabel" ), actionGroupFormatLinkStyles);
     3.8 +    a= new QAction( tr( "Linkstyle Curve" ), actionGroupFormatLinkStyles);
     3.9  	a->setStatusTip (tr( "Line" ));
    3.10  	a->setToggleAction(true);
    3.11      connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleParabel() ) );
    3.12 @@ -881,7 +881,7 @@
    3.13      connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStylePolyLine() ) );
    3.14  	formatMenu->addAction (a);
    3.15  	actionFormatLinkStylePolyLine=a;
    3.16 -    a= new QAction( tr( "Linkstyle Thick Parabel" ), actionGroupFormatLinkStyles);
    3.17 +    a= new QAction( tr( "Linkstyle Thick Curve" ), actionGroupFormatLinkStyles);
    3.18  	a->setStatusTip (tr( "PolyParabel" ) );
    3.19  	a->setToggleAction(true);
    3.20  	a->setChecked (true);
    3.21 @@ -1434,7 +1434,7 @@
    3.22      a= new QAction( tr( "Delete key","Settings action" ), this);
    3.23      a->setStatusTip( tr( "Delete key for deleting branches" ));
    3.24  	a->setToggleAction(true);
    3.25 -	a->setOn ( settings.value ("/mapeditor/editmode/useDelKey",false).toBool() );
    3.26 +	a->setOn ( settings.value ("/mapeditor/editmode/useDelKey",true).toBool() );
    3.27  	settingsMenu->addAction (a);
    3.28      connect( a, SIGNAL( triggered() ), this, SLOT( settingsToggleDelKey() ) );
    3.29  	actionSettingsUseDelKey=a;
    3.30 @@ -1483,6 +1483,11 @@
    3.31      connect( a, SIGNAL( triggered() ), this, SLOT( helpDoc() ) );
    3.32  	helpMenu->addAction (a);
    3.33  
    3.34 +    a = new QAction(  tr( "Open VYM example maps ","Help action" ), this );
    3.35 +    a->setStatusTip( tr( "Open VYM example maps " ));
    3.36 +    connect( a, SIGNAL( triggered() ), this, SLOT( helpDemo() ) );
    3.37 +	helpMenu->addAction (a);
    3.38 +
    3.39      a = new QAction( tr( "About VYM","Help action" ), this);
    3.40      a->setStatusTip( tr( "About VYM")+vymName);
    3.41      connect( a, SIGNAL( triggered() ), this, SLOT( helpAbout() ) );
    3.42 @@ -1583,7 +1588,7 @@
    3.43  	actionFormatLinkColor->addTo( canvasContextMenu );
    3.44  	actionFormatSelectionColor->addTo( canvasContextMenu );
    3.45  	actionFormatBackColor->addTo( canvasContextMenu );
    3.46 -	actionFormatBackImage->addTo( canvasContextMenu );
    3.47 +	// actionFormatBackImage->addTo( canvasContextMenu );  //FIXME makes vym too slow: postponed for later version 
    3.48  
    3.49  	// Menu for last opened files
    3.50  	// Create actions
    3.51 @@ -3730,6 +3735,34 @@
    3.52  }
    3.53  
    3.54  
    3.55 +void Main::helpDemo()
    3.56 +{
    3.57 +	QStringList filters;
    3.58 +	filters <<"VYM example map (*.vym)";
    3.59 +	QFileDialog *fd=new QFileDialog( this);
    3.60 +	fd->setDir (QDir(vymBaseDir.path()+"/demos"));
    3.61 +	fd->setFileMode (QFileDialog::ExistingFiles);
    3.62 +	fd->setFilters (filters);
    3.63 +	fd->setCaption(vymName+ " - " +tr("Load vym example map"));
    3.64 +	fd->show();
    3.65 +
    3.66 +	QString fn;
    3.67 +	if ( fd->exec() == QDialog::Accepted )
    3.68 +	{
    3.69 +		lastFileDir=fd->directory().path();
    3.70 +	    QStringList flist = fd->selectedFiles();
    3.71 +		QStringList::Iterator it = flist.begin();
    3.72 +		while( it != flist.end() ) 
    3.73 +		{
    3.74 +			fn = *it;
    3.75 +			fileLoad(*it, NewMap);				   
    3.76 +			++it;
    3.77 +		}
    3.78 +	}
    3.79 +	delete (fd);
    3.80 +}
    3.81 +
    3.82 +
    3.83  void Main::helpAbout()
    3.84  {
    3.85  	AboutDialog ad;
     4.1 --- a/mainwindow.h	Thu Jun 14 10:21:46 2007 +0000
     4.2 +++ b/mainwindow.h	Mon Jun 18 15:10:18 2007 +0000
     4.3 @@ -204,6 +204,7 @@
     4.4      void testCommand();
     4.5  
     4.6      void helpDoc();
     4.7 +    void helpDemo();
     4.8      void helpAbout();
     4.9      void helpAboutQT();
    4.10  
     5.1 --- a/mapeditor.cpp	Thu Jun 14 10:21:46 2007 +0000
     5.2 +++ b/mapeditor.cpp	Mon Jun 18 15:10:18 2007 +0000
     5.3 @@ -310,6 +310,12 @@
     5.4  	return s;
     5.5  }
     5.6  
     5.7 +QString MapEditor::getHistoryDir()
     5.8 +{
     5.9 +	QString histName=QDir::convertSeparators (QString("history-%1").arg(curStep));
    5.10 +	return QDir::convertSeparators (tmpMapDir +"/"+histName);
    5.11 +}
    5.12 +
    5.13  void MapEditor::saveState(const SaveMode &savemode, const QString &undoSelection, const QString &undoCom, const QString &redoSelection, const QString &redoCom, const QString &comment, LinkableMapObj *saveSel)
    5.14  {
    5.15  	// Main saveState
    5.16 @@ -324,18 +330,17 @@
    5.17  	if (curStep>stepsTotal) curStep=1;
    5.18  	
    5.19  	QString backupXML="";
    5.20 -	QString bakMapName=QDir::convertSeparators (QString("history-%1").arg(curStep));
    5.21 -	QString bakMapDir=QDir::convertSeparators (tmpMapDir +"/"+bakMapName);
    5.22 -	QString bakMapPath=QDir::convertSeparators(bakMapDir+"/map.xml");
    5.23 -
    5.24 -	// Create bakMapDir if not available
    5.25 -	QDir d(bakMapDir);
    5.26 +	QString histDir=getHistoryDir();
    5.27 +	QString bakMapPath=QDir::convertSeparators(histDir+"/map.xml");
    5.28 +
    5.29 +	// Create histDir if not available
    5.30 +	QDir d(histDir);
    5.31  	if (!d.exists()) 
    5.32 -		makeSubDirs (bakMapDir);
    5.33 +		makeSubDirs (histDir);
    5.34  
    5.35  	// Save depending on how much needs to be saved	
    5.36  	if (saveSel)
    5.37 -		backupXML=saveToDir (bakMapDir,mapName+"-",false, QPointF (),saveSel);
    5.38 +		backupXML=saveToDir (histDir,mapName+"-",false, QPointF (),saveSel);
    5.39  		
    5.40  	QString undoCommand="";
    5.41  	if (savemode==UndoCommand)
    5.42 @@ -1699,7 +1704,7 @@
    5.43  		{
    5.44  			// Copy to history
    5.45  			QString s=sel->getSelectString();
    5.46 -			saveState (PartOfMap, s, "nop ()", s, "copy ()","Copy to clipboard",sel  );
    5.47 +			saveState (PartOfMap, s, "nop ()", s, "copy ()","Copy selection to clipboard",sel  );
    5.48  			curClipboard=curStep;
    5.49  		}
    5.50  
    5.51 @@ -4451,10 +4456,9 @@
    5.52  	BranchObj *sel=xelection.getBranch();
    5.53  	if (sel)
    5.54  	{
    5.55 -		foreach (QString format,event->mimeData()->formats()) 
    5.56 -		{
    5.57 -			cout << "Dropped format: "<<format.ascii()<<endl;
    5.58 -		}
    5.59 +		if (debug)
    5.60 +			foreach (QString format,event->mimeData()->formats()) 
    5.61 +				cout << "MapEditor: Dropped format: "<<format.ascii()<<endl;
    5.62  
    5.63  
    5.64  		QList <QUrl> uris;
    5.65 @@ -4604,7 +4608,10 @@
    5.66    {
    5.67  	FloatImageObj *fio=bo->addFloatImage();
    5.68      fio->load(img);
    5.69 -    fio->setOriginalFilename("Image added by Drag and Drop");	// FIXME savestate missing
    5.70 +    fio->setOriginalFilename("No original filename (image added by dropevent)");	
    5.71 +	QString s=bo->getSelectString();
    5.72 +	saveState (PartOfMap, s, "nop ()", s, "copy ()","Copy dropped image to clipboard",fio  );
    5.73 +	saveState (fio,"delete ()", bo,QString("paste(%1)").arg(curStep),"Pasting dropped image");
    5.74      mapCenter->reposition();
    5.75      scene()->update();
    5.76    }
     6.1 --- a/mapeditor.h	Thu Jun 14 10:21:46 2007 +0000
     6.2 +++ b/mapeditor.h	Mon Jun 18 15:10:18 2007 +0000
     6.3 @@ -55,6 +55,12 @@
     6.4  	*/	
     6.5      QString saveToDir (const QString &tmpdir, const QString &prefix, bool writeflags, const QPointF &offset, LinkableMapObj *saveSel);
     6.6  
     6.7 +	/*! \brief Get directory, where current step in history is save
     6.8 +
     6.9 +		saveState creates a directory for each step in history. This function returns the
    6.10 +		path of the current directory
    6.11 +	*/
    6.12 +	QString getHistoryDir();
    6.13  
    6.14  	/*! \brief Save the current changes in map 
    6.15  
     7.1 --- a/version.h	Thu Jun 14 10:21:46 2007 +0000
     7.2 +++ b/version.h	Mon Jun 18 15:10:18 2007 +0000
     7.3 @@ -4,10 +4,10 @@
     7.4  #include <QString>
     7.5  
     7.6  #define __VYM_NAME "VYM"
     7.7 -#define __VYM_VERSION "1.8.72"
     7.8 -//#define __VYM_CODENAME "Codename: 1.9.0-beta-1"
     7.9 -#define __VYM_CODENAME "Codename: development version"
    7.10 -#define __VYM_BUILD_DATE "June 14, 2007"
    7.11 +#define __VYM_VERSION "1.8.73"
    7.12 +#define __VYM_CODENAME "Codename: 1.9.0-beta-1"
    7.13 +//#define __VYM_CODENAME "Codename: development version"
    7.14 +#define __VYM_BUILD_DATE "June 18, 2007"
    7.15  
    7.16  
    7.17  bool checkVersion(const QString &);