Marble

TourWidget.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2013 Mihail Ivchenko <[email protected]>
4 // SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <[email protected]>
5 //
6 
7 #ifndef MARBLE_TOURWIDGET_H
8 #define MARBLE_TOURWIDGET_H
9 
10 #include "marble_export.h"
11 
12 #include <QWidget>
13 
14 class QModelIndex;
15 
16 namespace Marble
17 {
18 
19 class GeoDataFeature;
20 class GeoDataContainer;
21 class MarbleWidget;
22 
23 class TourWidgetPrivate;
24 
25 class MARBLE_EXPORT TourWidget : public QWidget
26 {
27  Q_OBJECT
28 
29 public:
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 
39 public 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 
50 Q_SIGNALS:
51  void featureUpdated( GeoDataFeature *feature );
52  void featureAdded( GeoDataContainer *parent, GeoDataFeature *feature, int row );
53  void featureRemoved( const GeoDataFeature *feature );
54 
55 private 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 
69 protected:
70  void closeEvent( QCloseEvent *event ) override;
71 
72 private:
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
typedef WindowFlags
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:43 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.