7#ifndef MARBLE_GEOGRAPHICSITEM_H
8#define MARBLE_GEOGRAPHICSITEM_H
11#include "GeoDataStyle.h"
12#include "marble_export.h"
20class GeoDataLatLonAltBox;
21class GeoDataCoordinates;
22class GeoGraphicsItemPrivate;
31 bool operator==(
const RenderContext &other)
const;
32 bool operator!=(
const RenderContext &other)
const;
34 explicit RenderContext(
int tileLevel = -1);
35 int tileLevel()
const;
41class MARBLE_EXPORT GeoGraphicsItem
44 explicit GeoGraphicsItem(
const GeoDataFeature *feature);
45 virtual ~GeoGraphicsItem();
47 enum GeoGraphicsItemFlag {
54 Q_DECLARE_FLAGS(GeoGraphicsItemFlags, GeoGraphicsItemFlag)
58 void setVisible(
bool visible);
64 GeoGraphicsItemFlags flags()
const;
71 void setFlag(GeoGraphicsItemFlag flag,
bool enabled =
true);
77 void setFlags(GeoGraphicsItemFlags flags);
82 int minZoomLevel()
const;
87 void setMinZoomLevel(
int zoomLevel);
92 const GeoDataFeature *feature()
const;
97 virtual const GeoDataLatLonAltBox &latLonAltBox()
const = 0;
102 GeoDataStyle::ConstPtr style()
const;
107 void setStyleBuilder(
const StyleBuilder *styleBuilder);
117 void setHighlightStyle(
const GeoDataStyle::ConstPtr &highlightStyle);
122 qreal zValue()
const;
127 void setZValue(qreal z);
129 static bool zValueLessThan(GeoGraphicsItem *one, GeoGraphicsItem *two);
130 static bool styleLessThan(GeoGraphicsItem *one, GeoGraphicsItem *two);
131 static bool zValueAndStyleLessThan(GeoGraphicsItem *one, GeoGraphicsItem *two);
139 virtual void paint(GeoPainter *painter,
const ViewportParams *viewport,
const QString &layer,
int tileZoomLevel) = 0;
141 void setHighlighted(
bool highlight);
143 bool isHighlighted()
const;
147 void setPaintLayers(
const QStringList &paintLayers);
149 void setRenderContext(
const RenderContext &renderContext);
157 virtual bool contains(
const QPoint &screenPosition,
const ViewportParams *viewport)
const;
164 GeoGraphicsItemPrivate *
const d;
KCRASH_EXPORT void setFlags(KCrash::CrashFlags flags)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.