swift
downloaddialog.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2017 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_COMPONENTS_DOWNLOADDIALOG_H
7 #define SWIFT_GUI_COMPONENTS_DOWNLOADDIALOG_H
8 
9 #include <QDialog>
10 #include <QScopedPointer>
11 
13 #include "gui/swiftguiexport.h"
14 
15 namespace Ui
16 {
17  class CDownloadDialog;
18 }
19 namespace swift::misc::network
20 {
21  class CRemoteFile;
22  class CRemoteFileList;
23 } // namespace swift::misc::network
24 namespace swift::gui::components
25 {
29  class SWIFT_GUI_EXPORT CDownloadDialog : public QDialog
30  {
31  Q_OBJECT
32 
33  public:
35  explicit CDownloadDialog(QWidget *parent = nullptr);
36 
38  virtual ~CDownloadDialog() override;
39 
41  void setDownloadFile(const swift::misc::network::CRemoteFile &remoteFile);
42 
44  void setDownloadFiles(const swift::misc::network::CRemoteFileList &remoteFiles);
45 
47  void triggerDownloadingOfFiles(int delayMs);
48 
50  void setMode(CDownloadComponent::Mode mode);
51 
53  void showAndStartDownloading();
54 
55  protected:
57  virtual void accept() override;
58 
59  private:
60  QScopedPointer<Ui::CDownloadDialog> ui;
61  };
62 } // namespace swift::gui::components
63 
64 #endif // SWIFT_GUI_COMPONENTS_DOWNLOADDIALOG_H
CDownloadComponent as dialog.
Value object encapsulating a list of remote files.
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.