File indexing completed on 2024-09-15 03:34:45
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2009 Bastian Holst <bastianholst@gmx.de> 0004 // 0005 0006 #ifndef PANORAMIOMODEL_H 0007 #define PANORAMIOMODEL_H 0008 0009 #include "AbstractDataPluginModel.h" 0010 0011 namespace Marble 0012 { 0013 0014 class MarbleWidget; 0015 0016 const quint32 numberOfImagesPerFetch = 7; 0017 0018 class PanoramioModel : public AbstractDataPluginModel 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit PanoramioModel( const MarbleModel *marbleModel, QObject *parent = 0 ); 0024 0025 void setMarbleWidget( MarbleWidget *widget ); 0026 0027 protected: 0028 /** 0029 * Generates the download url for the description file from the web service depending on 0030 * the @p box surrounding the view and the @p number of files to show. 0031 **/ 0032 void getAdditionalItems( const GeoDataLatLonAltBox &box, qint32 number = 10 ); 0033 0034 /** 0035 * The reimplementation has to parse the @p file and should generate widgets. This widgets 0036 * have to be scheduled to downloadWidgetData or could be directly added to the list, 0037 * depending on if they have to download information to be shown. 0038 **/ 0039 void parseFile( const QByteArray &file ); 0040 0041 private: 0042 MarbleWidget *m_marbleWidget; 0043 }; 0044 0045 } 0046 0047 #endif // PANORAMIOMODEL_H