Skip to content
Permalink
Browse files
Wired in qprocess launch of mapserver export dialog
git-svn-id: http://svn.osgeo.org/qgis/trunk@5804 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Sep 10, 2006
1 parent a42798e commit ad44151095ab9a97a602a06a36d133cf8a316b6e
Showing with 20 additions and 15 deletions.
  1. +20 −15 src/gui/qgisapp.cpp
@@ -87,7 +87,6 @@
#include "qgsmaplayerregistry.h"
#include "qgsmapoverviewcanvas.h"
#include "qgsmaprender.h"
#include "qgsmapserverexport.h"
#include "qgsmessageviewer.h"
#include "qgsoptions.h"
#include "qgspastetransformations.h"
@@ -3131,20 +3130,26 @@ void QgisApp::showAllLayers()
void QgisApp::exportMapServer()
{
// check to see if there are any layers to export
if (mMapCanvas->layerCount() > 0)
{
QgsMapserverExport *mse = new QgsMapserverExport(mMapCanvas, this);
if (mse->exec())
{
mse->write();
}
delete mse;
}
else
{
QMessageBox::warning(this, tr("No Map Layers"),
tr("No layers to export. You must add at least one layer to the map in order to export the view."));
}
// Possibly we may reinstate this in the future if we provide 'active project' export again
//if (mMapCanvas->layerCount() > 0)
//{
QString myMSExportPath = QgsApplication::msexportAppPath();
QProcess *process = new QProcess;
process->start(myMSExportPath);

// Delete this object if the process terminates
connect(process, SIGNAL(finished(int, QProcess::ExitStatus)),
SLOT(processExited()));

// Delete the process if the application quits
connect(qApp, SIGNAL(aboutToQuit()), process, SLOT(terminate()));

//}
//else
//{
// QMessageBox::warning(this, tr("No Map Layers"),
// tr("No layers to export. You must add at least one layer to the map in order to export the view."));
//}
}
void QgisApp::zoomIn()
{

0 comments on commit ad44151

Please sign in to comment.