Marble

TourPlayback.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <sanjiban22393@gmail.com>
4//
5
6#ifndef TOURPLAYBACK_H
7#define TOURPLAYBACK_H
8
9#include <QObject>
10
11#include "marble_export.h"
12
13class QUrl;
14
15namespace Marble
16{
17
18class MarbleWidget;
19class GeoDataCoordinates;
20class GeoDataTour;
21class GeoDataPlacemark;
22class GeoDataFeature;
23class GeoDataContainer;
24class PlaybackItem;
25
26class TourPlaybackPrivate;
27
28class MARBLE_EXPORT TourPlayback : public QObject
29{
30 Q_OBJECT
31public:
32 explicit TourPlayback(QObject *parent = nullptr);
33 ~TourPlayback() override;
34
35 void setTour(GeoDataTour *tour);
36 void setMarbleWidget(MarbleWidget *widget);
37
38 /**
39 * @brief setBaseUrl - sets base url for using in QWebView.
40 */
41 void setBaseUrl(const QUrl &baseUrl);
42
43 /**
44 * @brief baseUrl - gets base url which is using in QWebView.
45 */
46 QUrl baseUrl() const;
47
48 /** Tour duration in seconds */
49 double duration() const;
50 bool isPlaying() const;
51
52 void play();
53 void pause();
54 void stop();
55
56 /**
57 * Seek to the given timestamp (in seconds)
58 * @param offset Target timestamp in seconds in the range 0..duration()
59 */
60 void seek(double offset);
61
62 /** Size of main track (flyto, wait, tourcontrol primitives) **/
63 int mainTrackSize();
64 /**
65 * Element of main track (flyto, wait, tourcontrol primitives)
66 * @param i Position of element.
67 */
68 PlaybackItem *mainTrackItemAt(int i);
69
70public Q_SLOTS:
71 void updateTracks();
72 void clearTracks();
73
74Q_SIGNALS:
75 void finished();
76 void paused();
77 void stopped();
78 void progressChanged(double);
79 void updated(GeoDataFeature *);
80 void added(GeoDataContainer *parent, GeoDataFeature *feature, int row);
81 void removed(const GeoDataFeature *feature);
82 void itemFinished(int index);
83
84private Q_SLOTS:
85 void stopTour();
86 void showBalloon(GeoDataPlacemark *);
87 void hideBalloon();
88 void centerOn(const GeoDataCoordinates &coordinates);
89 void handleFinishedItem(int index);
90
91private:
92 TourPlaybackPrivate *const d;
93};
94
95} // namespace Marble
96
97#endif // TOURPLAYBACK_H
void stop(Ekos::AlignState mode)
Q_SCRIPTABLE Q_NOREPLY void pause()
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.