Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
674 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 CURVE_H
27
#define CURVE_H
28
 
29
#include "geometry.h"
30
#include "point.h"
31
 
32
namespace qmapcontrol
33
{
34
    //! A Curve Geometry, implemented to fullfil OGC Spec
35
    /*!
36
     * The Curve class is used by LineString as parent class.
37
     * This class could not be used directly.
38
     *
39
     * From the OGC Candidate Implementation Specification:
40
     * "A Curve is a 1-dimensional geometric object usually stored as a sequence of Points, with the subtype of Curve
41
     * specifying the form of the interpolation between Points. This specification defines only one subclass of Curve,
42
     * LineString, which uses a linear interpolation between Points."
43
     *  @author Kai Winter <kaiwinter@gmx.de>
44
     */
45
    class Curve : public Geometry
46
    {
47
        Q_OBJECT
48
    public:
49
        virtual ~Curve();
50
 
51
        double Length;
52
 
53
        //  virtual Geometry Clone();
54
        //  virtual QRectF GetBoundingBox();
55
 
56
        //  virtual Point EndPoint() = 0;
57
        //  virtual Point StartPoint() = 0;
58
        //  virtual Point Value() = 0;
59
 
60
    protected:
61
        Curve(QString name = QString());
62
        virtual void draw(QPainter* painter, const MapAdapter* mapadapter, const QRect &screensize, const QPoint offset) = 0;
63
    };
64
}
65
#endif