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
#include "geometry.h"
27
namespace qmapcontrol
28
{
29
    Geometry::Geometry(QString name)
30
        : GeometryType("Geometry"), myparentGeometry(0), mypen(0), visible(true), myname(name)
31
    {
32
    }
33
 
34
 
35
    Geometry::~Geometry()
36
    {
37
    }
38
 
39
    QString Geometry::name() const
40
    {
41
        return myname;
42
    }
43
    Geometry* Geometry::parentGeometry() const
44
    {
45
        return myparentGeometry;
46
    }
47
    void Geometry::setParentGeometry(Geometry* geom)
48
    {
49
        myparentGeometry = geom;
50
    }
51
    bool Geometry::hasPoints() const
52
    {
53
        return false;
54
    }
55
    bool Geometry::hasClickedPoints() const
56
    {
57
        return false;
58
    }
59
    QList<Geometry*> Geometry::clickedPoints()
60
    {
61
        QList<Geometry*> tmp;
62
        return tmp;
63
    }
64
 
65
    bool Geometry::isVisible() const
66
    {
67
        return visible;
68
    }
69
    void Geometry::setVisible(bool visible)
70
    {
71
        this->visible = visible;
72
        emit(updateRequest(boundingBox()));
73
    }
74
 
75
    void Geometry::setName(QString name)
76
    {
77
        myname = name;
78
    }
79
 
80
    void Geometry::setPen(QPen* pen)
81
    {
82
        mypen = pen;
83
    }
84
    QPen* Geometry::pen() const
85
    {
86
        return mypen;
87
    }
88
}