12 |
12 |
13 class NetworkReply(QNetworkReply): |
13 class NetworkReply(QNetworkReply): |
14 """ |
14 """ |
15 Class implementing a QNetworkReply subclass for special data. |
15 Class implementing a QNetworkReply subclass for special data. |
16 """ |
16 """ |
17 def __init__(self, request, fileData, mimeType): |
17 def __init__(self, request, fileData, mimeType, parent = None): |
18 """ |
18 """ |
19 Constructor |
19 Constructor |
20 |
20 |
21 @param request reference to the request object (QNetworkRequest) |
21 @param request reference to the request object (QNetworkRequest) |
22 @param fileData reference to the data buffer (QByteArray) |
22 @param fileData reference to the data buffer (QByteArray) |
23 @param mimeType for the reply (string) |
23 @param mimeType for the reply (string) |
|
24 @param parent reference to the parent object (QObject) |
24 """ |
25 """ |
25 QNetworkReply.__init__(self) |
26 QNetworkReply.__init__(self, parent) |
26 |
27 |
27 self.__data = fileData |
28 self.__data = fileData |
28 |
29 |
29 self.setRequest(request) |
30 self.setRequest(request) |
30 self.setOpenMode(QIODevice.ReadOnly) |
31 self.setOpenMode(QIODevice.ReadOnly) |