scripted exports (continued)
authorinsilmaril
Wed, 20 Jun 2007 11:05:39 +0000
changeset 5200ccc00c05a22
parent 519 24691cdacc02
child 521 27cb122a88a6
scripted exports (continued)
flags/flag-url-16x16.png
mapeditor.cpp
mapeditor.h
     1.1 Binary file flags/flag-url-16x16.png has changed
     2.1 --- a/mapeditor.cpp	Wed Jun 20 10:51:46 2007 +0000
     2.2 +++ b/mapeditor.cpp	Wed Jun 20 11:05:39 2007 +0000
     2.3 @@ -716,7 +716,7 @@
     2.4  			parser.setError (Aborted,"Could not read filename");
     2.5  		} else
     2.6  		{
     2.7 -			exportXHTML (fname);
     2.8 +			exportXHTML (fname,false);
     2.9  		}
    2.10  	/////////////////////////////////////////////////////////////////////
    2.11  	} else if (com=="importDir")
    2.12 @@ -1794,17 +1794,16 @@
    2.13  	}
    2.14  }
    2.15  
    2.16 -void MapEditor::exportXHTML (const QString &dir)
    2.17 +void MapEditor::exportXHTML (const QString &dir, bool askForName)
    2.18  {
    2.19  			ExportXHTMLDialog dia(this);
    2.20  			dia.setFilePath (filePath );
    2.21  			dia.setMapName (mapName );
    2.22  			dia.readSettings();
    2.23 -			dia.setDir(dir);
    2.24  
    2.25  			bool ok=true;
    2.26  			
    2.27 -			if (dir=="")
    2.28 +			if (askForName)
    2.29  			{
    2.30  				if (dia.exec()!=QDialog::Accepted) 
    2.31  					ok=false;
     3.1 --- a/mapeditor.h	Wed Jun 20 10:51:46 2007 +0000
     3.2 +++ b/mapeditor.h	Wed Jun 20 11:05:39 2007 +0000
     3.3 @@ -135,14 +135,24 @@
     3.4  	void setHideTmpMode (BranchObj::HideTmpMode);	// temporary hide stuff
     3.5  	BranchObj::HideTmpMode getHideTmpMode();		// temporary hide stuff
     3.6  public:
     3.7 -	void setExportMode (bool);			//!< Set or unset temporary hiding of objects during export
     3.8 -	void exportASCII (QString fname="",bool askForName=true);  	//!< Export as ASCII
     3.9 +	/*! Set or unset temporary hiding of objects during export  */
    3.10 +	void setExportMode (bool);
    3.11 +
    3.12 +	/*! Export as ASCII text to file */
    3.13 +	void exportASCII (QString fname="",bool askForName=true);  
    3.14  
    3.15  	/*! Save as image */
    3.16      void exportImage (QString fname="",bool askForName=true,QString format="PNG");
    3.17 -    void exportOOPresentation(const QString &,const QString &);	//!< Export as OpenOfficeOrg presentation
    3.18 -    void exportXHTML(const QString& dir="");//!< Export as XHTML to directory
    3.19 -    void exportXML(const QString& dir="");	//!< Export as XML to directory
    3.20 +
    3.21 +    /*! Export as OpenOfficeOrg presentation */
    3.22 +    void exportOOPresentation(const QString &,const QString &);	
    3.23 +
    3.24 +	/*! Export as XHTML to directory */
    3.25 +    void exportXHTML(const QString& dir="", bool askForName=true);	
    3.26 +
    3.27 +	/*! Export as XTML to directory */
    3.28 +    void exportXML(const QString& dir="");
    3.29 +
    3.30      void clear();						//!< Clear map
    3.31      void copy();						//!< Copy to clipboard
    3.32      void redo();						//!< Redo last action