QGIS/tools/mapserver_export/qgsmapserverexport.h
gsherman 26d058741c Python wrapper code -- testing only
git-svn-id: http://svn.osgeo.org/qgis/trunk@4273 c8812cc2-4d05-0410-92ff-de0c093fc19c
2005-11-26 22:23:23 +00:00

69 lines
2.3 KiB
C++

/***************************************************************************
qgsmapserverexport.h - Export QGIS MapCanvas to MapServer
--------------------------------------
Date : 08-Nov-2003
Copyright : (C) 2003 by Gary E.Sherman
email : sherman at mrcc.com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
$Id: qgsmapserverexport.h 2175 2004-10-26 17:28:03Z mcoletti $
*/
#ifndef QGSMAPSERVEREXPORT_H
#define QGSMAPSERVEREXPORT_H
#include "ui_qgsmapserverexportbase.h"
class QgsMapCanvas;
/*! \class QgsMapServerExport
* \brief Class to handle reading and writing a Qgis project file
*/
class QgsMapserverExport:public QDialog, private Ui::QgsMapserverExportBase
{
Q_OBJECT
public:
QgsMapserverExport(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~QgsMapserverExport();
//! Read the file and create the map
bool read();
//! Write the contents of the map to a file
bool write();
void setMapCanvas(QgsMapCanvas *map);
//! Open a file dialog, the type determined by action (SAVE AS or OPEN)
QString selectFileName();
//! get the basename of the file (no path, just the file name)
QString baseName();
//! get the full path name of the map file
QString fullPathName();
//! Set the full path to the file
void setFileName(QString filename);
enum ACTION {
SAVE,
SAVEAS,
OPEN
};
public slots:
void showHelp();
void on_btnChooseFile_clicked();
void on_chkExpLayersOnly_clicked(bool);
void on_btnChooseProjectFile_clicked();
private:
void initPy();
void writeMapFile(void);
QString mapFile;
QString qgisProjectFile;
bool neverSaved;
int action;
};
#endif //QGSMAPSERVEREXPORT_H