6#ifndef SWIFT_GUI_COMPONENTS_DOWNLOADCOMPONENT_H
7#define SWIFT_GUI_COMPONENTS_DOWNLOADCOMPONENT_H
11#include <QNetworkReply>
12#include <QScopedPointer>
22 class CDownloadComponent;
42 Q_DECLARE_FLAGS(Mode, ModeFlag)
85 static constexpr std::chrono::milliseconds OverlayMsgTimeout { 5000 };
95 void selectDownloadDirectory();
98 bool triggerDownloadingOfNextFile();
107 void lastFileDownloaded();
110 void startDownloadedExecutable();
113 bool existsDownloadDir()
const;
116 void openDownloadDir();
119 void resetDownloadDir();
128 void downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
135Q_DECLARE_METATYPE(swift::gui::components::CDownloadComponent::Mode)
137Q_DECLARE_OPERATORS_FOR_FLAGS(swift::gui::components::CDownloadComponent::Mode)
CLoadIndicatorEnabled(QWidget *usingWidget)
Ctor.
COverlayMessagesFrame(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Constructor.
@ ShutdownSwift
for installers, stop swift before running
@ StartAfterDownload
download, then install
@ JustDownload
download, that's it
bool triggerDownloadingOfFiles(int delayMs=-1)
Trigger downloading of the file.
bool setDownloadFile(const swift::misc::network::CRemoteFile &remoteFile)
Set file to be downloaded.
void allDownloadsCompleted()
All downloads have been completed.
~CDownloadComponent()
Dtor.
void clear()
Clear all values.
bool haveAllDownloadsCompleted() const
Have all downloads completed?
CDownloadComponent(QWidget *parent=nullptr)
Default constructor.
bool setDownloadDirectory(const QString &path)
Set donwload directory.
Mode getMode() const
Get the mode.
bool isDownloading() const
Downloads in progress.
void setMode(Mode mode)
Set the mode.
bool setDownloadFiles(const swift::misc::network::CRemoteFileList &remoteFiles)
Set files to be downloaded.
void cancelOngoingDownloads()
Cancel ongoing downloads.
Streamable status message, e.g.
Value object encapsulating a list of remote files.
High level reusable GUI components.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.