Changeset - aa0e02ed3fd5
[Not reviewed]
default
0 2 0
Michael Guravage - 15 years ago 2010-11-30 11:39:36
michael.guravage@cwi.nl
Preface each image format extension with an asterisk so files with those
extensions to appear in the file dialogue.

--
user: Michael Guravage <michael.guravage@cwi.nl>
branch 'default'
changed src/ChangeLog
changed src/canvas.cpp
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/ChangeLog
Show inline comments
 
2010-11-30    <guravage@petitdru.sen.cwi.nl>
 

	
 
	* canvas.cpp (snapshot): Preface each image format extension with
 
	an asterisk so files with those extensions to appear in the file
 
	dialogue.
 

	
 
	* VirtualLeaf-install-windows.nsi: Include imageformats folder
 
	alongside executable.
 

	
 
	* canvas.cpp (snapshot): PNG is the default image format.
 

	
 
2010-11-29    <guravage@petitdru.sen.cwi.nl>
 

	
 
	* canvas.cpp (snapshot): Query and display supported snapshot file
 
	formats.
 

	
 
	* VirtualLeaf-install-windows.nsi: To facilitate debugging I added
 
	the debug versions of all the windows DLLs.
src/canvas.cpp
Show inline comments
 
@@ -731,25 +731,25 @@ void Main::snapshot()
 

	
 
#ifdef QDEBUG
 
  qDebug() << "Supported Image Formats: " << QImageWriter::supportedImageFormats() << endl;
 
#endif
 

	
 
  stopSimulation();
 
  Q3FileDialog *fd = new Q3FileDialog( this, "Save snapshot", TRUE );
 
  fd->setDir(par.datadir);
 
  fd->setMode( Q3FileDialog::AnyFile );
 

	
 
  QString supported_file_formats = " .pdf";
 
  foreach (QString format, QImageWriter::supportedImageFormats()){
 
    supported_file_formats += (" ." + format);
 
    supported_file_formats += (" *." + format);
 
  }
 

	
 
  fd->setFilter("Image files (" + supported_file_formats + " )");
 

	
 
  QString fileName;
 
  if ( fd->exec() == QDialog::Accepted ) {
 
    fileName = fd->selectedFile();
 
    
 
    // extract extension from filename
 
    QFileInfo fi(fileName);
 
    QString extension = fi.suffix();
 
    
0 comments (0 inline, 0 general)