1 /* ============================================================ 2 * 3 * This file is a part of digiKam project 4 * https://www.digikam.org 5 * 6 * Date : 2009-12-08 7 * Description : Internal part of the Marble-backend for geolocation interface 8 * 9 * Copyright (C) 2010-2021 by Gilles Caulier <caulier dot gilles at gmail dot com> 10 * Copyright (C) 2009-2010 by Michael G. Hansen <mike at mghansen dot de> 11 * 12 * This program is free software; you can redistribute it 13 * and/or modify it under the terms of the GNU General 14 * Public License as published by the Free Software Foundation; 15 * either version 2, or (at your option) 16 * any later version. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU General Public License for more details. 22 * 23 * ============================================================ */ 24 25 #include "backendmarblelayer.h" 26 27 // Marble includes 28 29 #include <marble/GeoPainter.h> 30 31 // Local includes 32 33 #include "backendmarble.h" 34 35 namespace Digikam 36 { 37 BackendMarbleLayer(BackendMarble * const pMarbleBackend)38BackendMarbleLayer::BackendMarbleLayer(BackendMarble* const pMarbleBackend) 39 : marbleBackend(pMarbleBackend) 40 { 41 } 42 ~BackendMarbleLayer()43BackendMarbleLayer::~BackendMarbleLayer() 44 { 45 } 46 render(Marble::GeoPainter * painter,Marble::ViewportParams *,const QString & renderPos,Marble::GeoSceneLayer *)47bool BackendMarbleLayer::render(Marble::GeoPainter* painter, 48 Marble::ViewportParams* /*viewport*/, 49 const QString& renderPos, 50 Marble::GeoSceneLayer* /*layer*/) 51 { 52 if (marbleBackend && (renderPos == QLatin1String("HOVERS_ABOVE_SURFACE"))) 53 { 54 marbleBackend->marbleCustomPaint(painter); 55 56 return true; 57 } 58 59 return false; 60 } 61 renderPosition() const62QStringList BackendMarbleLayer::renderPosition () const 63 { 64 QStringList layerNames; 65 layerNames << QLatin1String("HOVERS_ABOVE_SURFACE" ); 66 67 return layerNames; 68 } 69 setBackend(BackendMarble * const pMarbleBackend)70void BackendMarbleLayer::setBackend(BackendMarble* const pMarbleBackend) 71 { 72 marbleBackend = pMarbleBackend; 73 } 74 75 } // namespace Digikam 76