Marble

ScreenOverlayGraphicsItem.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2012 Mohammed Nafees <[email protected]>
4 // SPDX-FileCopyrightText: 2012 Dennis Nienhüser <[email protected]>
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 
16 namespace Marble {
17 
18 class GeoDataScreenOverlay;
19 
20 class MARBLE_EXPORT ScreenOverlayGraphicsItem : public ScreenGraphicsItem
21 {
22 public:
23  explicit ScreenOverlayGraphicsItem( const GeoDataScreenOverlay *screenOverlay );
24 
25  const GeoDataScreenOverlay* screenOverlay() const;
26 
27  void setProjection( const ViewportParams *viewport ) override;
28 
29 protected:
30  void paint( QPainter* painter ) override;
31 
32 private:
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
Binds a QML item to a specific geodetic location in screen coordinates.
Q_INVOKABLE void setProjection(uint proj)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.