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.

76 lines
2.3 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 CIRCLEPOINT_H
  26. #define CIRCLEPOINT_H
  27. #include "qmapcontrol_global.h"
  28. #include "point.h"
  29. //! Draws a circle into the map
  30. /*! This is a conveniece class for Point.
  31. * It configures the pixmap of a Point to draw a circle.
  32. * A QPen could be used to change the color or line-width of the circle
  33. *
  34. * @author Kai Winter <kaiwinter@gmx.de>
  35. */
  36. class CirclePoint : public mapPoint {
  37. public:
  38. //!
  39. /*!
  40. *
  41. * @param x longitude
  42. * @param y latitude
  43. * @param name name of the circle point
  44. * @param alignment alignment (Middle or TopLeft)
  45. * @param pen QPen for drawing
  46. */
  47. CirclePoint(qreal x, qreal y, QString name = QString(), Alignment alignment = Middle, QPen* pen=0);
  48. //!
  49. /*!
  50. *
  51. * @param x longitude
  52. * @param y latitude
  53. * @param radius the radius of the circle
  54. * @param name name of the circle point
  55. * @param alignment alignment (Middle or TopLeft)
  56. * @param pen QPen for drawing
  57. */
  58. CirclePoint(qreal x, qreal y, int radius = 10, QString name = QString(), Alignment alignment = Middle, QPen* pen=0);
  59. virtual ~CirclePoint();
  60. //! sets the QPen which is used for drawing the circle
  61. /*!
  62. * A QPen can be used to modify the look of the drawn circle
  63. * @param pen the QPen which should be used for drawing
  64. * @see http://doc.trolltech.com/4.3/qpen.html
  65. */
  66. virtual void setPen(QPen* pen);
  67. private:
  68. void drawCircle();
  69. };
  70. #endif