Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
305 KeyOz 1
/*
2
*
3
* This file is part of QMapControl,
4
* an open-source cross-platform map widget
5
*
6
* Copyright (C) 2007 - 2008 Kai Winter
7
*
8
* This program is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU Lesser General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
* GNU Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public License
19
* along with QMapControl. If not, see <http://www.gnu.org/licenses/>.
20
*
21
* Contact e-mail: kaiwinter@gmx.de
22
* Program URL   : http://qmapcontrol.sourceforge.net/
23
*
24
*/
25
 
26
#ifndef GEOMETRYLAYER_H
27
#define GEOMETRYLAYER_H
28
 
29
#include "layer.h"
30
 
31
namespace qmapcontrol
32
{
33
    //! GeometryLayer class
34
    /*!
35
         * There are two different layer types:
36
         *  - MapLayer: Displays Maps, but also Geometries. The configuration for displaying maps have to be done in the MapAdapter
37
         *  - GeometryLayer: Only displays Geometry objects.
38
         *
39
         * MapLayers also can display Geometry objects. The difference to the GeometryLayer is the repainting. Objects that are
40
         * added to a MapLayer are "baken" on the map. This means, when you change it´s position for example the changes are
41
         * not visible until a new offscreen image has been drawn. If you have "static" Geometries which won´t change their
42
         * position this is fine. But if you want to change the objects position or pen you should use a GeometryLayer. Those
43
         * are repainted immediately on changes.
44
         *
45
         *      @author Kai Winter <kaiwinter@gmx.de>
46
         */
47
    class GeometryLayer : public Layer
48
    {
49
        Q_OBJECT
50
 
51
    public:
52
        //! GeometryLayer constructor
53
        /*!
54
         * This is used to construct a map layer.
55
         *
56
         * @param layername The name of the Layer
57
         * @param mapadapter The MapAdapter which does coordinate translation and Query-String-Forming
58
         * @param takeevents Should the Layer receive MouseEvents? This is set to true by default. Setting it to false could
59
         * be something like a "speed up hint"
60
         */
61
        GeometryLayer(QString layername, MapAdapter* mapadapter, bool takeevents=true);
62
        virtual ~GeometryLayer();
63
    };
64
}
65
#endif