Changeset View
Changeset View
Standalone View
Standalone View
examples/cpp/squad-interpolation/squad-interpolation.cpp
Show All 35 Lines | 35 | { | |||
---|---|---|---|---|---|
36 | GeoDataCoordinates::Unit const degree = GeoDataCoordinates::Degree; | 36 | GeoDataCoordinates::Unit const degree = GeoDataCoordinates::Degree; | ||
37 | m_cities << GeoDataCoordinates( 7.64573, 45.04981, 0.0, degree ); // Torino | 37 | m_cities << GeoDataCoordinates( 7.64573, 45.04981, 0.0, degree ); // Torino | ||
38 | m_cities << GeoDataCoordinates( 8.33439, 49.01673, 0.0, degree ); // Karlsruhe | 38 | m_cities << GeoDataCoordinates( 8.33439, 49.01673, 0.0, degree ); // Karlsruhe | ||
39 | m_cities << GeoDataCoordinates( 14.41637, 50.09329, 0.0, degree ); // Praha | 39 | m_cities << GeoDataCoordinates( 14.41637, 50.09329, 0.0, degree ); // Praha | ||
40 | m_cities << GeoDataCoordinates( 15.97254, 45.80268, 0.0, degree ); // Zagred | 40 | m_cities << GeoDataCoordinates( 15.97254, 45.80268, 0.0, degree ); // Zagred | ||
41 | addInterpolatedPoint(); | 41 | addInterpolatedPoint(); | ||
42 | } | 42 | } | ||
43 | 43 | | |||
44 | QStringList MyPaintLayer::renderPosition() const | 44 | RenderPositions MyPaintLayer::renderPositions() const | ||
45 | { | 45 | { | ||
46 | return QStringList() << "USER_TOOLS"; | 46 | return UserToolsRenderPosition; | ||
47 | } | 47 | } | ||
48 | 48 | | |||
49 | bool MyPaintLayer::render ( GeoPainter *painter, ViewportParams *viewport, const QString &, GeoSceneLayer * ) | 49 | bool MyPaintLayer::render(GeoPainter *painter, ViewportParams *viewport, RenderPosition, GeoSceneLayer *) | ||
50 | { | 50 | { | ||
51 | if ( m_index < 20 ) { | 51 | if ( m_index < 20 ) { | ||
52 | // Gray dotted line connects all current cities | 52 | // Gray dotted line connects all current cities | ||
53 | QPen grayPen = Marble::Oxygen::aluminumGray4; | 53 | QPen grayPen = Marble::Oxygen::aluminumGray4; | ||
54 | grayPen.setWidth ( 3 ); | 54 | grayPen.setWidth ( 3 ); | ||
55 | grayPen.setStyle ( Qt::DotLine ); | 55 | grayPen.setStyle ( Qt::DotLine ); | ||
56 | painter->setPen ( grayPen ); | 56 | painter->setPen ( grayPen ); | ||
57 | painter->drawPolyline ( m_cities ); | 57 | painter->drawPolyline ( m_cities ); | ||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |