Marble
9 #include "MarbleSplashLayer.h"
11 #include "GeoPainter.h"
12 #include "MarbleDirs.h"
14 #include "RenderState.h"
21 MarbleSplashLayer::MarbleSplashLayer()
25 QStringList MarbleSplashLayer::renderPosition()
const
30 bool MarbleSplashLayer::render( GeoPainter *painter, ViewportParams *viewport,
31 const QString &renderPos, GeoSceneLayer *layer )
33 Q_UNUSED( renderPos );
38 QPixmap logoPixmap(MarbleDirs::path(QStringLiteral(
"svg/marble-logo-inverted-72dpi.png")));
40 if ( logoPixmap.width() > viewport->width() * 0.7
41 || logoPixmap.height() > viewport->height() * 0.7 )
43 logoPixmap = logoPixmap.scaled(
QSize( viewport->width(), viewport->height() ) * 0.7,
47 QPoint logoPosition( ( viewport->width() - logoPixmap.width() ) / 2,
48 ( viewport->height() - logoPixmap.height() ) / 2 );
49 painter->drawPixmap( logoPosition, logoPixmap );
55 int yTop = logoPosition.y() + logoPixmap.height() + 10;
56 QRect textRect( 0, yTop,
57 viewport->width(), viewport->height() - yTop );
65 RenderState MarbleSplashLayer::renderState()
const
67 return RenderState(QStringLiteral(
"Splash Screen"));
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:09 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.