25#include "dataManagement/Downloadable_Abstract.h" 
   27namespace DataManagement {
 
   63    Q_PROPERTY(QStringList files READ files NOTIFY 
filesChanged)
 
   94    [[nodiscard]] auto downloading() -> 
bool override { 
return m_downloading; }
 
  100    [[nodiscard]] 
auto files() -> QStringList 
override { 
return m_files; }
 
  112    [[nodiscard]] 
auto remoteFileSize() -> qint64 
override { 
return m_remoteFileSize; }
 
  145    Q_INVOKABLE 
void add(
const QVector<DataManagement::Downloadable_Abstract*>& maps);
 
  159    [[nodiscard]] Q_INVOKABLE QList<DataManagement::Downloadable_Abstract*> 
downloadables4Location(
const QGeoCoordinate& location);
 
  167    [[nodiscard]] Q_INVOKABLE QList<DataManagement::Downloadable_Abstract*> 
downloadablesByDistance(
const QGeoCoordinate& location);
 
  190    bool computeHasFile();
 
  191    void evaluateDownloading();
 
  192    void evaluateFiles();
 
  193    void evaluateRemoteFileSize();
 
  194    void evaluateUpdateSize();
 
  200    bool m_downloading {
false};
 
  202    qint64 m_remoteFileSize {-1};
 
  203    qint64 m_updateSize {0};
 
  205    QProperty<QVector<QPointer<DataManagement::Downloadable_Abstract>>> m_downloadables;
 
 
Abstract base class for Downloadable_SingleFile and Downloadable_MultiFile.
void downloadingChanged()
Notifier signal.
void filesChanged()
Notifier signal.
Downloadable_Abstract(QObject *parent=nullptr)
Standard constructor.
void hasFileChanged()
Notifier signal.
QBindable< bool > bindableHasFile() const
Getter method for the property with the same name.
void updateSizeChanged()
Notifier signal.
Q_INVOKABLE void update() override
Implementation of pure virtual method from Downloadable_Abstract.
QVector< DataManagement::Downloadable_Abstract * > downloadables
List of Downloadables in this group.
auto infoText() -> QString override
Implementation of pure virtual getter method from Downloadable_Abstract.
Q_INVOKABLE void add(DataManagement::Downloadable_Abstract *map)
Add a Downloadable_SingleFile to this Downloadable_MultiFile.
Downloadable_MultiFile(DataManagement::Downloadable_MultiFile::UpdatePolicy updatePolicy, QObject *parent=nullptr)
Standard constructor.
Q_INVOKABLE void clear()
Removes all children.
Q_INVOKABLE void deleteFiles() override
Implementation of pure virtual method from Downloadable_Abstract.
auto description() -> QString override
Implementation of pure virtual getter method from Downloadable_Abstract.
UpdatePolicy
Update Policy.
@ MultiUpdate
Update children that are updatable. If one local file exist, download all other files on update.
@ SingleUpdate
Update children that are updatable.
Q_INVOKABLE void startDownload() override
Implementation of pure virtual method from Downloadable_Abstract.
Q_INVOKABLE QList< DataManagement::Downloadable_Abstract * > downloadables4Location(const QGeoCoordinate &location)
Downloadables for a given location.
auto updateSize() -> Units::ByteSize override
Implementation of pure virtual getter method from Downloadable_Abstract.
void downloadablesChanged()
Notifier signal.
Q_INVOKABLE void add(const QVector< DataManagement::Downloadable_Abstract * > &maps)
Add 'Downloadable_SingleFile's to this Downloadable_MultiFile.
Q_INVOKABLE void remove(DataManagement::Downloadable_Abstract *map)
Remove a Downloadable_SingleFile from this Downloadable_MultiFile.
auto files() -> QStringList override
Implementation of pure virtual getter method from Downloadable_Abstract.
auto remoteFileSize() -> qint64 override
Getter function for the property with the same name.
Q_INVOKABLE void stopDownload() override
Implementation of pure virtual method from Downloadable_Abstract.
Q_INVOKABLE QList< DataManagement::Downloadable_Abstract * > downloadablesByDistance(const QGeoCoordinate &location)
Downloadables, sorted by distance to a given location.
Convenience class for size_t.
Conversion between units used in aviation.