~ubuntu-branches/ubuntu/saucy/qgis/saucy

« back to all changes in this revision

Viewing changes to src/mapserver/qgsmslayerbuilder.h

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-04-24 15:12:20 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120424151220-r88g00af5fpn5fc3
Tags: 1.7.4+1.7.5~20120320-1
The "Sometimes they come back" release.

* Branching from Qgis tree and adapting to current Debian Policy and
  standards. The target tree is currently set to release-1.7.
  (closes: #661491, #606304, #615683, #616182, #600308)
* Policy bumped to 3.9.3.
* Moving to debhelper compatibility level 9.
* Source format is now 3.0 with quilt support.
* Merged with 2bf42287 upstream git snapshot.
* Migrated to dh_python2 instead of python-central.
  (closes: #617048)
* Snapshot in qgis.org release-1.7: c936d031
* Added an automagic creation of a lintian override for sqlite embedding.
  This is required for uploading currently.
* Added missing ${misc:Depends} to make lintian happy.
* Copyright notes updated and debian/copyright moved to format 1.0.
* More licenses notices now reported in debian/copyright. Thanks ftpmasters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                              qgsmslayerbuilder.h
 
3
                              -------------------
 
4
  begin                : July, 2008
 
5
  copyright            : (C) 2008 by Marco Hugentobler
 
6
  email                : marco dot hugentobler at karto dot baug dot ethz dot ch
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef QGSMSLAYERBUILDER_H
 
19
#define QGSMSLAYERBUILDER_H
 
20
 
 
21
class QgsMapLayer;
 
22
class QgsRasterLayer;
 
23
class QDomElement;
 
24
class QTemporaryFile;
 
25
 
 
26
#include <QList>
 
27
 
 
28
/**Abstract base class for layer builders.
 
29
 Provides the possibility to create QGIS maplayers
 
30
from xml tag*/
 
31
class QgsMSLayerBuilder
 
32
{
 
33
  public:
 
34
    QgsMSLayerBuilder();
 
35
    virtual ~QgsMSLayerBuilder();
 
36
 
 
37
    /**Creates a maplayer from xml tag
 
38
       @param elem xml element containing description of datasource
 
39
       @param layerName sld name of the maplayer
 
40
       @param filesToRemove list to append files that should be removed after the request
 
41
       @param layersToRemove list to append layers that should be removed after the request
 
42
       @param allowCaching flag if layers are allowed to be fetched from layer cache or not
 
43
     @return the created layer or 0 in case of error*/
 
44
    virtual QgsMapLayer* createMapLayer( const QDomElement& elem, const QString& layerName, QList<QTemporaryFile*>& filesToRemove, QList<QgsMapLayer*>& layersToRemove, bool allowCaching = true ) const = 0;
 
45
  protected:
 
46
    /**Tries to create a suitable layer name from a URL. */
 
47
    virtual QString layerNameFromUri( const QString& uri ) const;
 
48
    /**Helper function that creates a new temporary file with random name under /tmp/qgis_wms_serv/
 
49
    and returns the path of the file (Unix). On Windows, it is created in the current working directory \
 
50
    and returns the filename only*/
 
51
    QString createTempFile() const;
 
52
    /**Resets the former symbology of a raster layer. This is important for single band layers (e.g. dems)
 
53
     coming from the cash*/
 
54
    void clearRasterSymbology( QgsRasterLayer* rl ) const;
 
55
};
 
56
 
 
57
#endif