mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 11:45:40 +08:00
65 lines
1.6 KiB
C++
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
|