Marble

FloatItemsLayer.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012-2016 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
4//
5
6#ifndef MARBLE_FLOATITEMSLAYER_H
7#define MARBLE_FLOATITEMSLAYER_H
8
9#include "LayerInterface.h"
10#include <QObject>
11
12#include <QList>
13#include <QRegion>
14
15namespace Marble
16{
17
18class AbstractFloatItem;
19class RenderPlugin;
20
21/**
22 * @brief Layer for handling the rendering of screen-positioned, 2D float items.
23 */
24class FloatItemsLayer : public QObject, public LayerInterface
25{
27
28public:
29 explicit FloatItemsLayer(QObject *parent = nullptr);
30
31 QStringList renderPosition() const override;
32
33 bool render(GeoPainter *painter, ViewportParams *viewport, const QString &renderPos = QStringLiteral("NONE"), GeoSceneLayer *layer = nullptr) override;
34
35 void addFloatItem(AbstractFloatItem *floatItem);
36
37 /**
38 * @brief Returns a list of all FloatItems of the layer
39 * @return the list of the floatItems
40 */
42
43 QString runtimeTrace() const override;
44
46 /**
47 * @brief Signal that a render item has been initialized
48 */
50
51 /**
52 * This signal is emitted when the repaint of the view was requested by a plugin.
53 * If available with the @p dirtyRegion which is the region the view will change in.
54 * If dirtyRegion.isEmpty() returns true, the whole viewport has to be repainted.
55 */
56 void repaintNeeded(const QRegion &dirtyRegion = QRegion());
57
58 void visibilityChanged(const QString &nameId, bool visible);
59
60 void pluginSettingsChanged();
61
62private Q_SLOTS:
63 void updateVisibility(bool visible, const QString &nameId);
64
65private:
66 QList<AbstractFloatItem *> m_floatItems;
67};
68
69}
70
71#endif
The abstract class for float item plugins.
Layer for handling the rendering of screen-positioned, 2D float items.
void renderPluginInitialized(RenderPlugin *renderPlugin)
Signal that a render item has been initialized.
QList< AbstractFloatItem * > floatItems() const
Returns a list of all FloatItems of the layer.
void repaintNeeded(const QRegion &dirtyRegion=QRegion())
This signal is emitted when the repaint of the view was requested by a plugin.
A painter that allows to draw geometric primitives on the map.
Definition GeoPainter.h:86
Layer of a GeoScene document.
The abstract class that creates a renderable item.
A public class that controls what is visible in the viewport of a Marble map.
Binds a QML item to a specific geodetic location in screen coordinates.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.