Skip to content

Commit 88b602b

Browse files
author
gsherman
committedNov 17, 2007
Added message box to display status of the MapServer export.
Fixes bug #520 git-svn-id: http://svn.osgeo.org/qgis/trunk@7444 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f35fb37 commit 88b602b

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed
 

‎tools/mapserver_export/ms_export.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# CHANGES SHOULD NOT BE MADE TO THE writeMapFile METHOD UNLESS YOU
2121
# ARE CHANGING THE QgsMapserverExport CLASS AND YOU KNOW WHAT YOU ARE
2222
# DOING
23-
import sys, string
23+
import sys, string, os
2424
from xml.dom import minidom, Node
2525

2626
# symbol map
@@ -69,42 +69,50 @@ def writeMapFile(self):
6969
# write the general map and web settings
7070
print " --- python : map section "
7171
self.writeMapSection()
72+
logmsg = "Wrote map section\n"
7273
print " --- python : map section done"
7374
# write the projection section
7475
print " --- python : proj section "
7576
self.writeProjectionSection()
77+
logmsg += "Wrote projection section\n"
7678
print " --- python : proj section done"
7779
# write the output format section
7880
print " --- python : outputformat section "
7981
self.writeOutputFormat()
82+
logmsg += "Wrote output format section\n"
8083
print " --- python : outputformat section done"
8184
# write the legend section
8285
print " --- python : legend section"
8386
self.writeLegendSection()
87+
logmsg += "Wrote legend section\n"
8488
print " --- python : legend section done"
8589

8690
# write the WEB section
8791
print " --- python : web section "
8892
self.writeWebSection()
93+
logmsg += "Wrote web section\n"
8994
print " --- python : web section done"
9095

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

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

102109
# END and close the map file
103110
self.outFile.write("END")
104111
self.outFile.close()
105112

106-
ret = "Writing the map file using " + self.project + " " + self.mapFile
107-
return ret
113+
logmsg += "Map file completed for " + os.path.basename(self.project) + "\n"
114+
logmsg += "Map file saved as " + os.path.basename(self.mapFile) + "\n"
115+
return logmsg
108116

109117
# Write the general parts of the map section
110118
def writeMapSection(self):

‎tools/mapserver_export/qgsmapserverexport.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ void QgsMapserverExport::apply()
169169
pstr = PyEval_CallObject(pmeth, pargs);
170170
// Show the return value
171171
PyArg_Parse(pstr, "s", &cstr);
172-
std::cout << cstr << std::endl;
172+
std::cout << "Result: " << std::endl << cstr << std::endl;
173+
// Show the results to the user
174+
QMessageBox::information(this, "Results of Export", QString(cstr));
173175

174176
Py_DECREF(pstr);
175177

0 commit comments

Comments
 (0)
Please sign in to comment.