Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qSlicerExtensionDownloadTask.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright 2014 Kitware Inc.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 This file was originally developed by Matthew Woehlke, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __qSlicerExtensionDownloadTask_h
22#define __qSlicerExtensionDownloadTask_h
23
24// Qt includes
25#include <QNetworkReply>
26
27// QtGUI includes
28#include "qSlicerBaseQTCoreExport.h"
29
30class qSlicerExtensionDownloadTaskPrivate;
31
32class Q_SLICER_BASE_QTCORE_EXPORT qSlicerExtensionDownloadTask : public QObject
33{
34 Q_OBJECT
36 Q_PROPERTY(QString extensionName READ extensionName WRITE setExtensionName)
37 Q_PROPERTY(QString archiveName READ archiveName WRITE setArchiveName)
38 Q_PROPERTY(QNetworkReply* reply READ reply)
40
41public:
46 explicit qSlicerExtensionDownloadTask(QNetworkReply* reply,
47 QObject* parent = nullptr);
48
51
54
63
65 QString extensionName() const;
66
68 void setExtensionName(const QString&);
69
71 QString archiveName() const;
72
74 void setArchiveName(const QString&);
75
77 QNetworkReply* reply() const;
78
81 bool installDependencies() const;
82 void setInstallDependencies(bool confirm);
83
84signals:
86 void error(qSlicerExtensionDownloadTask*, QNetworkReply::NetworkError);
87 void progress(qSlicerExtensionDownloadTask*, qint64 received, qint64 total);
88
89protected slots:
91 void emitError(QNetworkReply::NetworkError);
92 void emitProgress(qint64, qint64);
93
94protected:
95 QScopedPointer<qSlicerExtensionDownloadTaskPrivate> d_ptr;
96
97private:
98 Q_DECLARE_PRIVATE(qSlicerExtensionDownloadTask);
99 Q_DISABLE_COPY(qSlicerExtensionDownloadTask);
100};
101
102#endif
void setArchiveName(const QString &)
Set archive name.
qSlicerExtensionDownloadTask(QNetworkReply *reply, QObject *parent=nullptr)
void setMetadata(const QVariantMap &)
void setInstallDependencies(bool confirm)
void setExtensionName(const QString &)
Set extension name.
void emitError(QNetworkReply::NetworkError)
void finished(qSlicerExtensionDownloadTask *)
QScopedPointer< qSlicerExtensionDownloadTaskPrivate > d_ptr
void error(qSlicerExtensionDownloadTask *, QNetworkReply::NetworkError)
void progress(qSlicerExtensionDownloadTask *, qint64 received, qint64 total)
void emitProgress(qint64, qint64)
QMap< QString, QVariant > QVariantMap