File indexing completed on 2024-04-28 15:15:40

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2010 Bastian Holst <bastianholst@gmx.de>
0004 //
0005 
0006 #ifndef MARBLE_FILEVIEWWIDGET_H
0007 #define MARBLE_FILEVIEWWIDGET_H
0008 
0009 // Marble
0010 #include "marble_export.h"
0011 
0012 // Qt
0013 #include <QWidget>
0014 
0015 class QModelIndex;
0016 
0017 namespace Marble
0018 {
0019 
0020 class GeoDataPlacemark;
0021 class GeoDataLatLonBox;
0022 class MarbleWidget;
0023 
0024 class FileViewWidgetPrivate;
0025 
0026 class MARBLE_EXPORT FileViewWidget : public QWidget
0027 {
0028     Q_OBJECT
0029 
0030  public:
0031     explicit FileViewWidget( QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags() );
0032     ~FileViewWidget() override;
0033 
0034 
0035     void setMarbleWidget( MarbleWidget *widget );
0036 
0037  Q_SIGNALS:
0038     void centerOn( const GeoDataPlacemark &, bool animated );
0039     void centerOn( const GeoDataLatLonBox &, bool animated );
0040 
0041  private Q_SLOTS:
0042     void mapCenterOnTreeViewModel( const QModelIndex & );
0043 
0044  private:
0045     Q_PRIVATE_SLOT( d, void enableFileViewActions() )
0046     Q_PRIVATE_SLOT( d, void saveFile() )
0047     Q_PRIVATE_SLOT( d, void closeFile() )
0048     Q_PRIVATE_SLOT( d, void contextMenu(const QPoint&) )
0049     Q_PRIVATE_SLOT( d, void showPlacemarkDialog() )
0050     Q_DISABLE_COPY( FileViewWidget )
0051 
0052     FileViewWidgetPrivate * const d;
0053 };
0054 
0055 }
0056 
0057 #endif