~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to src/app/qgsmapserverexport.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    qgsmapserverexport.h - Export QGIS MapCanvas to MapServer
 
3
     --------------------------------------
 
4
    Date                 : 08-Nov-2003
 
5
    Copyright            : (C) 2003 by Gary E.Sherman
 
6
    email                : sherman at mrcc.com
 
7
 ***************************************************************************
 
8
 *                                                                         *
 
9
 *   This program is free software; you can redistribute it and/or modify  *
 
10
 *   it under the terms of the GNU General Public License as published by  *
 
11
 *   the Free Software Foundation; either version 2 of the License, or     *
 
12
 *   (at your option) any later version.                                   *
 
13
 *                                                                         *
 
14
 ***************************************************************************
 
15
 
 
16
  $Id$
 
17
 
 
18
*/
 
19
 
 
20
#ifndef QGSMAPSERVEREXPORT_H
 
21
#define QGSMAPSERVEREXPORT_H
 
22
#include "ui_qgsmapserverexportbase.h"
 
23
#include "qgisgui.h"
 
24
class QgsMapCanvas;
 
25
 
 
26
/*! \class QgsMapServerExport
 
27
* \brief Class to handle reading and writing a Qgis project file
 
28
*/
 
29
class QgsMapserverExport: public QDialog, private Ui::QgsMapserverExportBase
 
30
{
 
31
    Q_OBJECT
 
32
  public:
 
33
    QgsMapserverExport( QgsMapCanvas *map = 0, QWidget* parent = 0,
 
34
                        Qt::WFlags fl = QgisGui::ModalDialogFlags );
 
35
    ~QgsMapserverExport();
 
36
    //! Read the file and create the map
 
37
    bool read();
 
38
    //! Write the contents of the map to a file
 
39
    bool write();
 
40
    void setMapCanvas( QgsMapCanvas *map );
 
41
    //! Open a file dialog, the type determined by action (SAVE AS or OPEN)
 
42
    QString selectFileName();
 
43
    //! get the basename of the file (no path, just the file name)
 
44
    QString baseName();
 
45
    //! get the full path name of the map file
 
46
    QString fullPathName();
 
47
    //! Set the full path to the file
 
48
    void setFileName( QString fileName );
 
49
    enum ACTION
 
50
    {
 
51
      SAVE,
 
52
      SAVEAS,
 
53
      OPEN
 
54
    };
 
55
  public slots:
 
56
    void on_chkExpLayersOnly_clicked();
 
57
    void on_btnChooseFile_clicked();
 
58
    void help();
 
59
 
 
60
  private:
 
61
    void writeMapFile( void );
 
62
    QString fileName;
 
63
    QString fullPath;
 
64
    bool neverSaved;
 
65
    QgsMapCanvas *map;
 
66
    int action;
 
67
    static const int context_id = 0;
 
68
};
 
69
 
 
70
#endif //QGSMAPSERVEREXPORT_H
 
71