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 <QObject>
10#include "LayerInterface.h"
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
28 public:
29 explicit FloatItemsLayer(QObject *parent = nullptr);
30
31 QStringList renderPosition() const override;
32
33 bool render(GeoPainter *painter, ViewportParams *viewport,
34 const QString &renderPos = "NONE", GeoSceneLayer *layer = nullptr) override;
35
36 void addFloatItem(AbstractFloatItem *floatItem);
37
38 /**
39 * @brief Returns a list of all FloatItems of the layer
40 * @return the list of the floatItems
41 */
43
44 QString runtimeTrace() const override;
45
47 /**
48 * @brief Signal that a render item has been initialized
49 */
51
52 /**
53 * This signal is emitted when the repaint of the view was requested by a plugin.
54 * If available with the @p dirtyRegion which is the region the view will change in.
55 * If dirtyRegion.isEmpty() returns true, the whole viewport has to be repainted.
56 */
58
59 void visibilityChanged(const QString &nameId, bool visible);
60
61 void pluginSettingsChanged();
62
63 private Q_SLOTS:
64 void updateVisibility(bool visible, const QString &nameId);
65
66 private:
67 QList<AbstractFloatItem *> m_floatItems;
68};
69
70}
71
72#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:89
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
T qobject_cast(QObject *object)
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.