• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • graphicsitem
GeoTrackGraphicsItem.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Guillaume Martres <smarter@ubuntu.com>
9 //
10 
11 #include "GeoTrackGraphicsItem.h"
12 
13 #include "GeoDataLineString.h"
14 #include "GeoDataTrack.h"
15 #include "MarbleDebug.h"
16 
17 using namespace Marble;
18 
19 GeoTrackGraphicsItem::GeoTrackGraphicsItem( const GeoDataFeature *feature, const GeoDataTrack *track )
20  : GeoLineStringGraphicsItem( feature, new GeoDataLineString() )
21 {
22  setTrack( track );
23 }
24 
25 void GeoTrackGraphicsItem::setTrack( const GeoDataTrack* track )
26 {
27  m_track = track;
28  update();
29 }
30 
31 void GeoTrackGraphicsItem::paint( GeoPainter *painter, const ViewportParams *viewport )
32 {
33  update();
34 
35  GeoLineStringGraphicsItem::paint( painter, viewport );
36 }
37 
38 void GeoTrackGraphicsItem::update()
39 {
40  setLineString( m_track->lineString() );
41 }
Marble::GeoDataTrack
A geometry for tracking objects made of (time, coordinates) pairs.
Definition: GeoDataTrack.h:54
Marble::GeoLineStringGraphicsItem::setLineString
void setLineString(const GeoDataLineString *lineString)
Definition: GeoLineStringGraphicsItem.cpp:28
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::GeoLineStringGraphicsItem::paint
virtual void paint(GeoPainter *painter, const ViewportParams *viewport)
Paints the item using the given GeoPainter.
Definition: GeoLineStringGraphicsItem.cpp:38
Marble::GeoDataTrack::lineString
const GeoDataLineString * lineString() const
Return the GeoDataLineString representing the current track.
Definition: GeoDataTrack.cpp:256
MarbleDebug.h
GeoDataTrack.h
GeoDataLineString.h
Marble::GeoTrackGraphicsItem::GeoTrackGraphicsItem
GeoTrackGraphicsItem(const GeoDataFeature *feature, const GeoDataTrack *track)
Definition: GeoTrackGraphicsItem.cpp:19
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::GeoLineStringGraphicsItem
Definition: GeoLineStringGraphicsItem.h:23
Marble::GeoDataFeature
A base class for all geodata features.
Definition: GeoDataFeature.h:57
Marble::GeoTrackGraphicsItem::setTrack
void setTrack(const GeoDataTrack *track)
Definition: GeoTrackGraphicsItem.cpp:25
Marble::GeoTrackGraphicsItem::paint
virtual void paint(GeoPainter *painter, const ViewportParams *viewport)
Paints the item using the given GeoPainter.
Definition: GeoTrackGraphicsItem.cpp:31
GeoTrackGraphicsItem.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal