marble
examples/cpp/custom-layers/main.cpp
Go to the documentation of this file.
82 GeoDataCoordinates MyPaintLayer::approximate(const GeoDataCoordinates &base, qreal angle, qreal dist)
106 painter->setPen( QPen(QBrush(QColor::fromRgb(255,255,255,200)), 3.0, Qt::SolidLine, Qt::RoundCap ) );
111 painter->drawPolyline(GeoDataLineString() << home << approximate(home, M_PI * now.minute() / 30.0, 0.75));
112 painter->drawPolyline(GeoDataLineString() << home << approximate(home, M_PI * now.hour() / 6.0, 0.5));
114 painter->drawPolyline(GeoDataLineString() << home << approximate(home, M_PI * now.second() / 30.0, 1.0));
void setInterval(int msec)
int minute() const
void setRenderHint(RenderHint hint, bool on)
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
This file contains the headers for MarbleModel.
const T & at(int i) const
Definition: LayerInterface.h:26
void drawPolyline(const GeoDataLineString &lineString, const QString &labelText=QString(), LabelPositionFlags labelPositionFlags=LineCenter)
Draws a given line string (a "polyline").
Definition: GeoPainter.cpp:474
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
void drawEllipse(const GeoDataCoordinates ¢erPosition, qreal width, qreal height, bool isGeoProjected=false)
Draws an ellipse at the given position. The ellipse is placed with its center located at the given ce...
Definition: GeoPainter.cpp:289
int second() const
int size() const
MyPaintLayer(MarbleWidget *widget)
Definition: examples/cpp/custom-layers/main.cpp:49
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
virtual bool event(QEvent *e)
QColor fromRgb(QRgb rgb)
This file contains the headers for MarbleMap.
void installEventFilter(QObject *filterObj)
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: examples/cpp/custom-layers/main.cpp:54
void setPen(const QColor &color)
virtual bool eventFilter(QObject *watched, QEvent *event)
void addLayer(LayerInterface *layer)
Add a layer to be included in rendering.
Definition: MarbleWidget.cpp:370
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Definition: squad-interpolation.h:28
int hour() const
int key() const
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
bool render(GeoPainter *painter, ViewportParams *viewport, const QString &renderPos="NONE", GeoSceneLayer *layer=0)
Renders the content provided by the layer on the viewport.
Definition: examples/cpp/custom-layers/main.cpp:91
QTime currentTime()
int exec()
void setWindowTitle(const QString &)
This file contains the headers for MarbleWidget.
void start(int msec)
void show()
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.