Skip to content
Permalink
Browse files

Added message box to display status of the MapServer export.

Fixes bug #520


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7444 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gsherman
gsherman committed Nov 17, 2007
1 parent ed197ac commit c00764862095674b1875beb5cd97167232b5fdc3
Showing with 14 additions and 4 deletions.
  1. +11 −3 tools/mapserver_export/ms_export.py
  2. +3 −1 tools/mapserver_export/qgsmapserverexport.cpp
@@ -20,7 +20,7 @@
# CHANGES SHOULD NOT BE MADE TO THE writeMapFile METHOD UNLESS YOU
# ARE CHANGING THE QgsMapserverExport CLASS AND YOU KNOW WHAT YOU ARE
# DOING
import sys, string
import sys, string, os
from xml.dom import minidom, Node

# symbol map
@@ -69,42 +69,50 @@ def writeMapFile(self):
# write the general map and web settings
print " --- python : map section "
self.writeMapSection()
logmsg = "Wrote map section\n"
print " --- python : map section done"
# write the projection section
print " --- python : proj section "
self.writeProjectionSection()
logmsg += "Wrote projection section\n"
print " --- python : proj section done"
# write the output format section
print " --- python : outputformat section "
self.writeOutputFormat()
logmsg += "Wrote output format section\n"
print " --- python : outputformat section done"
# write the legend section
print " --- python : legend section"
self.writeLegendSection()
logmsg += "Wrote legend section\n"
print " --- python : legend section done"

# write the WEB section
print " --- python : web section "
self.writeWebSection()
logmsg += "Wrote web section\n"
print " --- python : web section done"

# write the LAYER sections
print " --- python : layer section "
self.writeMapLayers()
logmsg += "Wrote map layers\n"
print " --- python : layer section done"

# write the symbol defs section
# must happen after layers so we can build a symbol queue
print " --- python : symbol section "
self.writeSymbolSection()
logmsg += "Wrote symbol section\n"
print " --- python : symbol section done"

# END and close the map file
self.outFile.write("END")
self.outFile.close()

ret = "Writing the map file using " + self.project + " " + self.mapFile
return ret
logmsg += "Map file completed for " + os.path.basename(self.project) + "\n"
logmsg += "Map file saved as " + os.path.basename(self.mapFile) + "\n"
return logmsg

# Write the general parts of the map section
def writeMapSection(self):
@@ -169,7 +169,9 @@ void QgsMapserverExport::apply()
pstr = PyEval_CallObject(pmeth, pargs);
// Show the return value
PyArg_Parse(pstr, "s", &cstr);
std::cout << cstr << std::endl;
std::cout << "Result: " << std::endl << cstr << std::endl;
// Show the results to the user
QMessageBox::information(this, "Results of Export", QString(cstr));

Py_DECREF(pstr);

0 comments on commit c007648

Please sign in to comment.
You can’t perform that action at this time.