Files
pilotclient/src/blackgui/components/downloaddialog.h
Lars Toenning bcc4bdd31e Add SPDX identifiers for REUSE compliance
Co-authored-by: Mat Sutcliffe <oktal3700@gmail.com>
2023-10-03 09:29:49 +02:00

65 lines
1.6 KiB
C++

// SPDX-FileCopyrightText: Copyright (C) 2017 swift Project Community / Contributors
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
//! \file
#ifndef BLACKGUI_COMPONENTS_DOWNLOADDIALOG_H
#define BLACKGUI_COMPONENTS_DOWNLOADDIALOG_H
#include "blackgui/blackguiexport.h"
#include "blackgui/components/downloadcomponent.h"
#include <QDialog>
#include <QScopedPointer>
namespace Ui
{
class CDownloadDialog;
}
namespace BlackMisc::Network
{
class CRemoteFile;
class CRemoteFileList;
}
namespace BlackGui::Components
{
/*!
* CDownloadComponent as dialog
*/
class BLACKGUI_EXPORT CDownloadDialog : public QDialog
{
Q_OBJECT
public:
//! Constructor
explicit CDownloadDialog(QWidget *parent = nullptr);
//! Destructor
virtual ~CDownloadDialog() override;
//! \copydoc CDownloadComponent::setDownloadFile
void setDownloadFile(const BlackMisc::Network::CRemoteFile &remoteFile);
//! \copydoc CDownloadComponent::setDownloadFiles
void setDownloadFiles(const BlackMisc::Network::CRemoteFileList &remoteFiles);
//! \copydoc CDownloadComponent::triggerDownloadingOfFiles
void triggerDownloadingOfFiles(int delayMs);
//! \copydoc CDownloadComponent::setMode
void setMode(CDownloadComponent::Mode mode);
//! Show and start the downloading
void showAndStartDownloading();
protected:
//! \copydoc QDialog::accept
virtual void accept() override;
private:
QScopedPointer<Ui::CDownloadDialog> ui;
};
} // ns
#endif // guard