Marble

BillboardGraphicsItem.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
4//
5
6#ifndef MARBLE_BILLBOARDGRAPHICSITEM_H
7#define MARBLE_BILLBOARDGRAPHICSITEM_H
8
9#include "MarbleGraphicsItem.h"
10#include "marble_export.h"
11
12#include <Qt>
13
14class QPointF;
15
16namespace Marble
17{
18class GeoDataCoordinates;
19class BillboardGraphicsItemPrivate;
20
21/**
22 * @brief Base class for all 2D labels (a.k.a. billboards) in 3D space.
23 *
24 * A BillboardGraphicsItem represents a point of interest on a planet with a geo location.
25 * As a result, it may appear more than once on the map, depending on the projection and
26 * the zoom level.
27 */
28class MARBLE_EXPORT BillboardGraphicsItem : public MarbleGraphicsItem
29{
30 public:
32
33 GeoDataCoordinates coordinate() const;
34 void setCoordinate( const GeoDataCoordinates &coordinates );
35
36 Qt::Alignment alignment() const;
37 void setAlignment( Qt::Alignment alignment );
38
39 /**
40 * @brief Returns the absolute screen positions of the item.
41 *
42 * All elements indicate the position of the topleft corner in screen coordinates and are
43 * based on the viewport of the last paintEvent(). Note that the result list may contain
44 * an unbound number of elements, including zero, depending on the item's visibility,
45 * the projection and zoom level.
46 * @since 0.26.0
47 */
48 QVector<QPointF> positions() const;
49
50 /**
51 * @brief Returns the absolute screen bounding boxes of the item.
52 * @since 0.26.0
53 */
54 QVector<QRectF> boundingRects() const;
55
56 /**
57 * Returns the rect of one representation of the object that is at the given position.
58 */
59 QRectF containsRect( const QPointF &point ) const;
60
61 private:
62 Q_DECLARE_PRIVATE(BillboardGraphicsItem)
63};
64
65} // Marble namespace
66
67#endif
Base class for all 2D labels (a.k.a.
A 3d point representation.
Binds a QML item to a specific geodetic location in screen coordinates.
typedef Alignment
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 12:00:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.