• 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
  • examples
  • cpp
  • squad-interpolation
squad-interpolation.h
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 2014 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef SQUAD_INTERPOLATION
12 #define SQUAD_INTERPOLATION
13 
14 #include <marble/MarbleWidget.h>
15 #include <marble/MarbleMap.h>
16 #include <marble/MarbleModel.h>
17 #include <marble/GeoPainter.h>
18 #include <GeoDataLineString.h>
19 #include <marble/LayerInterface.h>
20 
21 #include <QTime>
22 #include <QTimer>
23 #include <QApplication>
24 #include <QKeyEvent>
25 
26 namespace Marble {
27 
28 class MyPaintLayer : public QObject, public LayerInterface
29 {
30  Q_OBJECT
31 
32 public:
33  // Constructor
34  MyPaintLayer( MarbleWidget* widget );
35 
36  // LayerInterface
37  QStringList renderPosition() const;
38  bool render( GeoPainter *painter, ViewportParams *viewport,
39  const QString& renderPos = "NONE", GeoSceneLayer * layer = 0 );
40  GeoDataLatLonBox center() const;
41 
42 private Q_SLOTS:
43  void addInterpolatedPoint();
44 
45 private:
46  void addRandomCity( double minDistanceKm=500, double maxDistanceKm=1500 );
47  static GeoDataCoordinates basePoint( const GeoDataCoordinates &q1, const GeoDataCoordinates &q2, const GeoDataCoordinates &q3 );
48 
49  MarbleWidget* m_widget;
50  GeoDataLineString m_cities;
51  GeoDataLineString m_interpolated;
52  double m_fraction;
53  double m_delta;
54  int m_index;
55 };
56 
57 }
58 
59 #endif // SQUAD_INTERPOLATION
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
MarbleModel.h
This file contains the headers for MarbleModel.
LayerInterface.h
Marble::LayerInterface
Definition: LayerInterface.h:26
Marble::MyPaintLayer::MyPaintLayer
MyPaintLayer(MarbleWidget *widget)
Definition: examples/cpp/custom-layers/main.cpp:49
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
MarbleMap.h
This file contains the headers for MarbleMap.
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
Marble::MyPaintLayer::renderPosition
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: examples/cpp/custom-layers/main.cpp:54
QObject
GeoDataLineString.h
QString
GeoPainter.h
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
QStringList
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::MyPaintLayer
Definition: squad-interpolation.h:28
Marble::MyPaintLayer::render
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
MarbleWidget.h
This file contains the headers for MarbleWidget.
Marble::MyPaintLayer::center
GeoDataLatLonBox center() const
Definition: squad-interpolation.cpp:130
Marble::GeoDataLatLonBox
A class that defines a 2D bounding box for geographic data.
Definition: GeoDataLatLonBox.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 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