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.

63 lines
2.4 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 GEOMETRYLAYER_H
  26. #define GEOMETRYLAYER_H
  27. #include "qmapcontrol_global.h"
  28. #include "layer.h"
  29. //! GeometryLayer class
  30. /*!
  31. * There are two different layer types:
  32. * - MapLayer: Displays Maps, but also Geometries. The configuration for displaying maps have to be done in the MapAdapter
  33. * - GeometryLayer: Only displays Geometry objects.
  34. *
  35. * MapLayers also can display Geometry objects. The difference to the GeometryLayer is the repainting. Objects that are
  36. * added to a MapLayer are "baken" on the map. This means, when you change it´s position for example the changes are
  37. * not visible until a new offscreen image has been drawn. If you have "static" Geometries which won´t change their
  38. * position this is fine. But if you want to change the objects position or pen you should use a GeometryLayer. Those
  39. * are repainted immediately on changes.
  40. *
  41. * @author Kai Winter <kaiwinter@gmx.de>
  42. */
  43. class GeometryLayer : public Layer {
  44. //Q_OBJECT
  45. public:
  46. //! GeometryLayer constructor
  47. /*!
  48. * This is used to construct a map layer.
  49. *
  50. * @param layername The name of the Layer
  51. * @param mapadapter The MapAdapter which does coordinate translation and Query-String-Forming
  52. * @param takeevents Should the Layer receive MouseEvents? This is set to true by default. Setting it to false could
  53. * be something like a "speed up hint"
  54. */
  55. GeometryLayer(QString layername, MapAdapter* mapadapter, bool takeevents=true);
  56. virtual ~GeometryLayer();
  57. };
  58. #endif