mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Wired in qprocess launch of mapserver export dialog
git-svn-id: http://svn.osgeo.org/qgis/trunk@5804 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
a42798e61d
commit
ad44151095
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user