Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
801 - 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 IMAGEPOINT_H
27
#define IMAGEPOINT_H
28
 
29
#include "point.h"
30
 
31
namespace qmapcontrol
32
{
33
 
34
    //! Draws an image into the map
35
    /*! This is a convenience class for Point.
36
     * It configures the pixmap of a Point to draw the given image.
37
     * The image will be loaded from the given path and written in the points pixmap.
38
     *
39
     * @author Kai Winter <kaiwinter@gmx.de>
40
     */
41
    class ImagePoint : public Point
42
    {
43
    public:
44
        //! Creates a point which loads and displays the given image file
45
        /*!
46
         * Use this contructor to load the given image file and let the point display it.
47
         * When you want multiple points to display the same image, use the other contructor and pass a pointer to that image.
48
         * @param x longitude
49
         * @param y latitude
50
         * @param filename the file which should be loaded and displayed
51
         * @param name the name of the image point
52
         * @param alignment alignment (Middle or TopLeft)
53
         */
54
        ImagePoint(qreal x, qreal y, QString filename, QString name = QString(), Alignment alignment = Middle);
55
 
56
        //! Creates a point which displays the given image
57
        /*!
58
         * Use this contructor to display the given image.
59
         * You have to load that image yourself, but can use it for multiple points.
60
         * @param x longitude
61
         * @param y latitude
62
         * @param pixmap pointer to the image pixmap
63
         * @param name the name of the image point
64
         * @param alignment alignment (Middle or TopLeft)
65
         */
66
        ImagePoint(qreal x, qreal y, QPixmap* pixmap, QString name = QString(), Alignment alignment = Middle);
67
        virtual ~ImagePoint();
68
    };
69
}
70
#endif