File indexing completed on 2024-04-14 03:48:10
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Mihail Ivchenko <ematirov@gmail.com> 0004 // SPDX-FileCopyrightText: 2014 Sanjiban Bairagya <sanjiban22393@gmail.com> 0005 // 0006 0007 #ifndef MARBLE_TOURWIDGET_H 0008 #define MARBLE_TOURWIDGET_H 0009 0010 #include "marble_export.h" 0011 0012 #include <QWidget> 0013 0014 class QModelIndex; 0015 0016 namespace Marble 0017 { 0018 0019 class GeoDataFeature; 0020 class GeoDataContainer; 0021 class MarbleWidget; 0022 0023 class TourWidgetPrivate; 0024 0025 class MARBLE_EXPORT TourWidget : public QWidget 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 explicit TourWidget( QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags() ); 0031 ~TourWidget() override; 0032 0033 void setMarbleWidget( MarbleWidget *widget ); 0034 bool openTour( const QString &filename ); 0035 bool isPlaying() const; 0036 0037 bool eventFilter( QObject *watched, QEvent *event ) override; 0038 0039 public Q_SLOTS: 0040 void startPlaying(); 0041 void pausePlaying(); 0042 void togglePlaying(); 0043 void stopPlaying(); 0044 void handleSliderMove( int ); 0045 /** 0046 * Highlights the item currently being played. 0047 */ 0048 void setHighlightedItemIndex( int index ); 0049 0050 Q_SIGNALS: 0051 void featureUpdated( GeoDataFeature *feature ); 0052 void featureAdded( GeoDataContainer *parent, GeoDataFeature *feature, int row ); 0053 void featureRemoved( const GeoDataFeature *feature ); 0054 0055 private Q_SLOTS: 0056 void moveUp(); 0057 void moveDown(); 0058 void addFlyTo(); 0059 void addWait(); 0060 void addSoundCue(); 0061 void addPlacemark(); 0062 void addRemovePlacemark(); 0063 void addChangePlacemark(); 0064 void deleteSelected(); 0065 void updateDuration(); 0066 void finishAddingItem(); 0067 void stopLooping(); 0068 0069 protected: 0070 void closeEvent( QCloseEvent *event ) override; 0071 0072 private: 0073 Q_PRIVATE_SLOT( d, void openFile() ) 0074 Q_PRIVATE_SLOT( d, void createTour() ) 0075 Q_PRIVATE_SLOT( d, void saveTour() ) 0076 Q_PRIVATE_SLOT( d, void saveTourAs() ) 0077 Q_PRIVATE_SLOT( d, void captureTour() ) 0078 Q_PRIVATE_SLOT( d, void updateButtonsStates() ) 0079 Q_PRIVATE_SLOT( d, void mapCenterOn( const QModelIndex &index ) ) 0080 Q_PRIVATE_SLOT( d, void handlePlaybackProgress( const double position ) ) 0081 Q_DISABLE_COPY( TourWidget ) 0082 0083 void removeHighlight(); 0084 TourWidgetPrivate * const d; 0085 }; 0086 0087 } 0088 0089 #endif