Marble

ScreenOverlayGraphicsItem.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Mohammed Nafees <nafees.technocool@gmail.com>
4// SPDX-FileCopyrightText: 2012 Dennis Nienhüser <nienhueser@kde.org>
5//
6
7#ifndef SCREENOVERLAYGRAPHICSITEM_H
8#define SCREENOVERLAYGRAPHICSITEM_H
9
10#include "GeoDataVec2.h"
11#include "ScreenGraphicsItem.h"
12#include "marble_export.h"
13
14#include <QPixmap>
15
16namespace Marble
17{
18
19class GeoDataScreenOverlay;
20
21class MARBLE_EXPORT ScreenOverlayGraphicsItem : public ScreenGraphicsItem
22{
23public:
24 explicit ScreenOverlayGraphicsItem(const GeoDataScreenOverlay *screenOverlay);
25
26 const GeoDataScreenOverlay *screenOverlay() const;
27
28 void setProjection(const ViewportParams *viewport) override;
29
30protected:
31 void paint(QPainter *painter) override;
32
33private:
34 static qreal pixelValue(GeoDataVec2::Unit unit, qreal screenSize, qreal imageSize, qreal value);
35
36 const GeoDataScreenOverlay *m_screenOverlay;
37
38 QPixmap m_pixmap;
39};
40
41}
42
43#endif
Q_INVOKABLE void setProjection(uint proj)
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 Fri Nov 8 2024 12:02:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.