diff --git a/src/qgsmapserverexportbase.ui b/src/qgsmapserverexportbase.ui
new file mode 100644
index 00000000000..f3b07099ae3
--- /dev/null
+++ b/src/qgsmapserverexportbase.ui
@@ -0,0 +1,596 @@
+
+QgsMapserverExportBase
+
+
+ QgsMapserverExportBase
+
+
+
+ 0
+ 0
+ 511
+ 393
+
+
+
+ Export to Mapserver
+
+
+ true
+
+
+
+ textLabel7
+
+
+
+ 10
+ 10
+ 57
+ 20
+
+
+
+ Map file
+
+
+
+
+ chkExpLayersOnly
+
+
+
+ 10
+ 40
+ 241
+ 21
+
+
+
+ Export LAYER information only
+
+
+
+
+ grpMap
+
+
+
+ 10
+ 70
+ 490
+ 141
+
+
+
+ Map
+
+
+
+ textLabel1
+
+
+
+ 20
+ 20
+ 40
+ 20
+
+
+
+ Name
+
+
+
+
+
+
+
+ textLabel2_2
+
+
+
+ 310
+ 20
+ 40
+ 20
+
+
+
+ Height
+
+
+
+
+ textLabel2
+
+
+
+ 210
+ 20
+ 40
+ 20
+
+
+
+ Width
+
+
+
+ -
+
+ dd
+
+
+ -
+
+ feet
+
+
+ -
+
+ meters
+
+
+ -
+
+ miles
+
+
+ -
+
+ inches
+
+
+ -
+
+ kilometers
+
+
+
+ cmbMapUnits
+
+
+
+ 60
+ 50
+ 85
+ 22
+
+
+
+
+
+ textLabel3
+
+
+
+ 20
+ 50
+ 40
+ 20
+
+
+
+ Units
+
+
+
+
+ textLabel4
+
+
+
+ 160
+ 50
+ 61
+ 20
+
+
+
+ Image type
+
+
+
+ -
+
+ gif
+
+
+ -
+
+ gtiff
+
+
+ -
+
+ jpeg
+
+
+ -
+
+ png
+
+
+ -
+
+ swf
+
+
+ -
+
+ userdefined
+
+
+ -
+
+ wbmp
+
+
+
+ cmbMapImageType
+
+
+
+ 230
+ 50
+ 85
+ 22
+
+
+
+
+
+ textLabel6
+
+
+
+ 20
+ 80
+ 57
+ 20
+
+
+
+ MinScale
+
+
+
+
+ textLabel6_2
+
+
+
+ 230
+ 80
+ 57
+ 20
+
+
+
+ MaxScale
+
+
+
+
+ txtMinScale
+
+
+
+ 80
+ 80
+ 106
+ 22
+
+
+
+
+
+ txtMaxScale
+
+
+
+ 300
+ 80
+ 106
+ 22
+
+
+
+
+
+ txtMapName
+
+
+
+ 70
+ 20
+ 131
+ 21
+
+
+
+ Prefix attached to map, scalebar and legend GIF filenames created using this MapFile. It should be kept short.
+
+
+
+
+ txtMapWidth
+
+
+
+ 250
+ 20
+ 50
+ 22
+
+
+
+
+
+ txtMapHeight
+
+
+
+ 360
+ 20
+ 50
+ 22
+
+
+
+
+
+
+ grpWeb
+
+
+
+ 10
+ 220
+ 270
+ 120
+
+
+
+ Web Interface Definition
+
+
+
+ textLabel5
+
+
+
+ 20
+ 20
+ 57
+ 20
+
+
+
+ Header
+
+
+
+
+ textLabel5_3
+
+
+
+ 20
+ 80
+ 57
+ 20
+
+
+
+ Footer
+
+
+
+
+ textLabel5_2
+
+
+
+ 20
+ 50
+ 57
+ 20
+
+
+
+ Template
+
+
+
+
+ txtWebHeader
+
+
+
+ 80
+ 20
+ 160
+ 22
+
+
+
+
+
+ txtWebTemplate
+
+
+
+ 80
+ 50
+ 160
+ 22
+
+
+
+
+
+ txtWebFooter
+
+
+
+ 80
+ 80
+ 160
+ 22
+
+
+
+
+
+
+ Layout1
+
+
+
+ 10
+ 350
+ 476
+ 33
+
+
+
+
+ unnamed
+
+
+ 0
+
+
+ 6
+
+
+
+ buttonHelp
+
+
+ &Help
+
+
+ F1
+
+
+ true
+
+
+
+
+ Horizontal Spacing2
+
+
+ Horizontal
+
+
+ Expanding
+
+
+
+ 20
+ 20
+
+
+
+
+
+ buttonOk
+
+
+ &OK
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+
+ buttonCancel
+
+
+ &Cancel
+
+
+
+
+
+ true
+
+
+
+
+
+
+ btnChooseFile
+
+
+
+ 470
+ 10
+ 30
+ 21
+
+
+
+ ...
+
+
+
+
+ txtMapFilePath
+
+
+
+ 70
+ 10
+ 401
+ 21
+
+
+
+
+
+
+ buttonOk
+ clicked()
+ QgsMapserverExportBase
+ accept()
+
+
+ buttonCancel
+ clicked()
+ QgsMapserverExportBase
+ reject()
+
+
+ chkExpLayersOnly
+ clicked()
+ QgsMapserverExportBase
+ exportLayersOnly()
+
+
+ btnChooseFile
+ clicked()
+ QgsMapserverExportBase
+ chooseMapFile()
+
+
+
+ qgsmapserverexportbase.ui.h
+
+
+ exportLayersOnly()
+ chooseMapFile()
+
+
+
diff --git a/src/qgsmapserverexportbase.ui.h b/src/qgsmapserverexportbase.ui.h
new file mode 100644
index 00000000000..662288fa7c0
--- /dev/null
+++ b/src/qgsmapserverexportbase.ui.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** Qt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+#include
+
+void QgsMapserverExportBase::exportLayersOnly()
+{
+ // disable inputs if only layer objects are being written
+ grpMap->setEnabled(!chkExpLayersOnly->isChecked());
+ grpWeb->setEnabled(!chkExpLayersOnly->isChecked());
+}
+
+void QgsMapserverExportBase::chooseMapFile()
+{
+QString s = QFileDialog::getSaveFileName(
+ "./",
+ "Mapserver files (*.map)",
+ this,
+ "save file dialog",
+ "Choose a filename for the exported map file" );
+txtMapFilePath->setText(s);
+}