Marble

TourWidget.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Mihail Ivchenko <ematirov@gmail.com>
4// SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <sanjiban22393@gmail.com>
5//
6
7#ifndef MARBLE_TOURWIDGET_H
8#define MARBLE_TOURWIDGET_H
9
10#include "marble_export.h"
11
12#include <QWidget>
13
14class QModelIndex;
15
16namespace Marble
17{
18
19class GeoDataFeature;
20class GeoDataContainer;
21class MarbleWidget;
22
23class TourWidgetPrivate;
24
25class MARBLE_EXPORT TourWidget : public QWidget
26{
27 Q_OBJECT
28
29public:
30 explicit TourWidget(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
31 ~TourWidget() override;
32
33 void setMarbleWidget(MarbleWidget *widget);
34 bool openTour(const QString &filename);
35 bool isPlaying() const;
36
37 bool eventFilter(QObject *watched, QEvent *event) override;
38
39public Q_SLOTS:
40 void startPlaying();
41 void pausePlaying();
42 void togglePlaying();
43 void stopPlaying();
44 void handleSliderMove(int);
45 /**
46 * Highlights the item currently being played.
47 */
48 void setHighlightedItemIndex(int index);
49
50Q_SIGNALS:
51 void featureUpdated(GeoDataFeature *feature);
52 void featureAdded(GeoDataContainer *parent, GeoDataFeature *feature, int row);
53 void featureRemoved(const GeoDataFeature *feature);
54
55private Q_SLOTS:
56 void moveUp();
57 void moveDown();
58 void addFlyTo();
59 void addWait();
60 void addSoundCue();
61 void addPlacemark();
62 void addRemovePlacemark();
63 void addChangePlacemark();
64 void deleteSelected();
65 void updateDuration();
66 void finishAddingItem();
67 void stopLooping();
68
69protected:
70 void closeEvent(QCloseEvent *event) override;
71
72private:
73 Q_PRIVATE_SLOT(d, void openFile())
74 Q_PRIVATE_SLOT(d, void createTour())
75 Q_PRIVATE_SLOT(d, void saveTour())
76 Q_PRIVATE_SLOT(d, void saveTourAs())
77 Q_PRIVATE_SLOT(d, void captureTour())
78 Q_PRIVATE_SLOT(d, void updateButtonsStates())
79 Q_PRIVATE_SLOT(d, void mapCenterOn(const QModelIndex &index))
80 Q_PRIVATE_SLOT(d, void handlePlaybackProgress(const double position))
81 Q_DISABLE_COPY(TourWidget)
82
83 void removeHighlight();
84 TourWidgetPrivate *const d;
85};
86
87}
88
89#endif
Binds a QML item to a specific geodetic location in screen coordinates.
typedef WindowFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.