23#include <QGeoRectangle>
28#include "units/ByteSize.h"
31namespace DataManagement {
152 [[nodiscard]] QGeoRectangle
boundingBox()
const {
return m_boundingBox;}
176 [[nodiscard]]
virtual auto files() -> QStringList = 0;
182 [[nodiscard]]
bool hasFile()
const {
return m_hasFile.value();}
194 [[nodiscard]]
virtual auto infoText() -> QString = 0;
206 [[nodiscard]] QString
section()
const {
return m_section; }
248 void setSection(
const QString& sectionName) {m_sectionBuffer = sectionName;}
262 emitFileContentChanged_delayedTimer.stop();
299 void error(QString objectName, QString message);
338 QGeoRectangle m_boundingBox;
345 QProperty<QString> m_sectionBuffer;
348 void emitFileContentChanged_delayed();
349 QTimer emitFileContentChanged_delayedTimer;
Abstract base class for Downloadable_SingleFile and Downloadable_MultiFile.
QString section
Headline name for the Downloadable.
virtual Q_INVOKABLE void startDownload()=0
Initiate download(s)
void error(QString objectName, QString message)
Download error.
void downloadingChanged()
Notifier signal.
QString section() const
Getter function for the property with the same name.
void remoteFileSizeChanged()
Notifier signal.
void filesChanged()
Notifier signal.
virtual auto downloading() -> bool=0
Getter method for the property with the same name.
bool hasFile
Indicates if (at least one) local file exists.
void boundingBoxChanged()
Notifier signal.
void contentTypeChanged()
Notifier signal.
void setContentType(DataManagement::Downloadable_Abstract::ContentType contentType)
Setter function for the property with the same name.
ContentType
Type of content managed by this instance.
@ VAC
Visual Approach Chart.
@ BaseMapVector
Base Map, in vector format.
@ AviationMap
Aviation Map.
@ BaseMapRaster
Base Map, in raster format.
virtual auto updateSizeString() -> QString
Getter function for the property with the same name.
Units::ByteSize updateSize
Update size.
Downloadable_Abstract(QObject *parent=nullptr)
Standard constructor.
Q_INVOKABLE void killFileContentChanged_delayed()
Kill pending emission of signal fileContentChanged_delayed.
virtual auto files() -> QStringList=0
Getter method for the property with the same name.
QString infoText
Short info text describing the state of the downloadable(s)
virtual auto description() -> QString=0
Getter method for the property with the same name.
virtual Q_INVOKABLE void stopDownload()=0
Stops download process(es)
virtual Q_INVOKABLE void update()=0
Starts download(s) if updatable.
QString description
Describe installed file(s)
void sectionChanged()
Notifier signal.
virtual auto remoteFileSize() -> qint64=0
Getter function for the property with the same name.
QBindable< QString > bindableSection() const
Getter function for the property with the same name.
void hasFileChanged()
Notifier signal.
void descriptionChanged()
Notifier signal.
qint64 remoteFileSize
Size of the remote file.
QBindable< bool > bindableHasFile() const
Getter method for the property with the same name.
void fileContentChanged_delayed()
Emitted some time after the content of one of the local files changes.
virtual auto updateSize() -> Units::ByteSize=0
Getter function for the property with the same name.
QString updateSizeString
Update size as a localized string.
void infoTextChanged()
Notifier signal.
virtual auto infoText() -> QString=0
Getter method for the property with the same name.
QGeoRectangle boundingBox
Geographic bounding box.
bool hasFile() const
Getter method for the property with the same name.
void setSection(const QString §ionName)
Setter function for the property with the same name.
void setBoundingBox(const QGeoRectangle &boundingBox)
Setter function for the property with the same name.
DataManagement::Downloadable_Abstract::ContentType contentType() const
Getter method for the property with the same name.
bool downloading
Indicates whether a download process is currently running.
QStringList files
Names of all files that have been downloaded by any of the Downloadble objects in this group (and the...
void updateSizeChanged()
Notifier signal.
virtual Q_INVOKABLE void deleteFiles()=0
Deletes all local file(s)
void fileContentChanged()
Indicates that the content of a local file (or several local files) has changed.
DataManagement::Downloadable_Abstract::ContentType contentType
Most probable content of file(s) managed by this object.
Convenience class for size_t.
Conversion between units used in aviation.