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
18class GeoDataScreenOverlay;
19
20class MARBLE_EXPORT ScreenOverlayGraphicsItem : public ScreenGraphicsItem
21{
22public:
23 explicit ScreenOverlayGraphicsItem( const GeoDataScreenOverlay *screenOverlay );
24
25 const GeoDataScreenOverlay* screenOverlay() const;
26
27 void setProjection( const ViewportParams *viewport ) override;
28
29protected:
30 void paint( QPainter* painter ) override;
31
32private:
33 static qreal pixelValue( GeoDataVec2::Unit unit, qreal screenSize, qreal imageSize, qreal value );
34
35 const GeoDataScreenOverlay *m_screenOverlay;
36
37 QPixmap m_pixmap;
38};
39
40}
41
42#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 Jun 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.