File indexing completed on 2025-01-05 03:59:35
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2008 Patrick Spendrin <ps_ml@gmx.de> 0004 // 0005 #ifndef MARBLE_FILELOADER_H 0006 #define MARBLE_FILELOADER_H 0007 0008 #include "GeoDataDocument.h" 0009 0010 #include <QThread> 0011 0012 class QString; 0013 0014 namespace Marble 0015 { 0016 class FileLoaderPrivate; 0017 class PluginManager; 0018 class GeoDataStyle; 0019 0020 class FileLoader : public QThread 0021 { 0022 Q_OBJECT 0023 public: 0024 FileLoader(QObject* parent, const PluginManager *pluginManager, bool recenter, const QString& file, 0025 const QString& property, const GeoDataStyle::Ptr &style, DocumentRole role, int renderOrder ); 0026 FileLoader( QObject* parent, const PluginManager *pluginManager, 0027 const QString& contents, const QString& name, DocumentRole role ); 0028 ~FileLoader() override; 0029 0030 void run() override; 0031 bool recenter() const; 0032 QString path() const; 0033 GeoDataDocument *document(); 0034 QString error() const; 0035 0036 Q_SIGNALS: 0037 void loaderFinished( FileLoader* ); 0038 void newGeoDataDocumentAdded( GeoDataDocument* ); 0039 0040 private: 0041 Q_PRIVATE_SLOT ( d, void documentParsed( GeoDataDocument *, QString) ) 0042 0043 friend class FileLoaderPrivate; 0044 0045 FileLoaderPrivate *d; 0046 0047 }; 0048 0049 } // namespace Marble 0050 0051 #endif