You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.5 KiB

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