Marble

MarblePhysics.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2008 Torsten Rahn <[email protected]>
4 //
5 
6 #ifndef MARBLE_MARBLEPHYSICS_H
7 #define MARBLE_MARBLEPHYSICS_H
8 
9 #include <QObject>
10 
11 #include "MarbleGlobal.h"
12 
13 namespace Marble
14 {
15 
16 class MarblePhysicsPrivate;
17 class MarbleAbstractPresenter;
18 class GeoDataLookAt;
19 
20 class MarblePhysics : public QObject
21 {
22  Q_OBJECT
23 
24  public:
25  /**
26  * @brief Constructor
27  * @param presenter the MarbleWidget that is being animated
28  */
29  explicit MarblePhysics( MarbleAbstractPresenter *presenter );
30 
31  /**
32  * @brief Destructor
33  */
34  ~MarblePhysics() override;
35 
36  /**
37  * @brief Initiate an animation to the target according to the given mode.
38  * @param target camera position indicating the target of the animation
39  * @param mode animation mode; @code Instant @endcode means no animation
40  */
41  void flyTo( const GeoDataLookAt &target, FlyToMode mode = Instant );
42 
43 private Q_SLOTS:
44  void updateProgress(qreal progress);
45 
46  /**
47  * @brief Switch to still mode when an animation is finished
48  */
49  void startStillMode();
50 
51  private:
52  Q_DISABLE_COPY( MarblePhysics )
53 
54  MarblePhysicsPrivate* d;
55 };
56 
57 }
58 
59 #endif
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
Binds a QML item to a specific geodetic location in screen coordinates.
FlyToMode
Describes possible flight mode (interpolation between source and target camera positions)
Definition: MarbleGlobal.h:162
@ Instant
Change camera position immediately (no interpolation)
Definition: MarbleGlobal.h:164
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.