File indexing completed on 2025-01-05 03:59:03
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2012 Mohammed Nafees <nafees.technocool@gmail.com> 0004 // SPDX-FileCopyrightText: 2012 Dennis Nienhüser <nienhueser@kde.org> 0005 // 0006 0007 #ifndef SCREENOVERLAYGRAPHICSITEM_H 0008 #define SCREENOVERLAYGRAPHICSITEM_H 0009 0010 #include "GeoDataVec2.h" 0011 #include "ScreenGraphicsItem.h" 0012 #include "digikam_export.h" 0013 0014 #include <QPixmap> 0015 0016 namespace Marble { 0017 0018 class GeoDataScreenOverlay; 0019 0020 class DIGIKAM_EXPORT ScreenOverlayGraphicsItem : public ScreenGraphicsItem 0021 { 0022 public: 0023 explicit ScreenOverlayGraphicsItem( const GeoDataScreenOverlay *screenOverlay ); 0024 0025 const GeoDataScreenOverlay* screenOverlay() const; 0026 0027 void setProjection( const ViewportParams *viewport ) override; 0028 0029 protected: 0030 void paint( QPainter* painter ) override; 0031 0032 private: 0033 static qreal pixelValue( GeoDataVec2::Unit unit, qreal screenSize, qreal imageSize, qreal value ); 0034 0035 const GeoDataScreenOverlay *m_screenOverlay; 0036 0037 QPixmap m_pixmap; 0038 }; 0039 0040 } 0041 0042 #endif