E5Network/E5NetworkMonitor.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2401
4f428de32b69
child 3057
10516539f238
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a network monitor dialog. 7 Module implementing a network monitor dialog.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 from PyQt4.QtCore import Qt, QAbstractTableModel, QModelIndex, QUrl 12 from PyQt4.QtCore import Qt, QAbstractTableModel, QModelIndex, QUrl
11 from PyQt4.QtGui import QDialog, QStandardItemModel, QSortFilterProxyModel 13 from PyQt4.QtGui import QDialog, QStandardItemModel, QSortFilterProxyModel
12 from PyQt4.QtNetwork import QNetworkRequest, QNetworkAccessManager 14 from PyQt4.QtNetwork import QNetworkRequest, QNetworkAccessManager
13 15
67 69
68 @param networkAccessManager reference to the network access manager 70 @param networkAccessManager reference to the network access manager
69 (QNetworkAccessManager) 71 (QNetworkAccessManager)
70 @param parent reference to the parent widget (QWidget) 72 @param parent reference to the parent widget (QWidget)
71 """ 73 """
72 super().__init__(parent) 74 super(E5NetworkMonitor, self).__init__(parent)
73 self.setupUi(self) 75 self.setupUi(self)
74 76
75 self.__requestHeaders = QStandardItemModel(self) 77 self.__requestHeaders = QStandardItemModel(self)
76 self.__requestHeaders.setHorizontalHeaderLabels( 78 self.__requestHeaders.setHorizontalHeaderLabels(
77 [self.trUtf8("Name"), self.trUtf8("Value")]) 79 [self.trUtf8("Name"), self.trUtf8("Value")])
117 Protected method called upon closing the dialog. 119 Protected method called upon closing the dialog.
118 120
119 @param evt reference to the close event object (QCloseEvent) 121 @param evt reference to the close event object (QCloseEvent)
120 """ 122 """
121 self.__class__._monitor = None 123 self.__class__._monitor = None
122 super().closeEvent(evt) 124 super(E5NetworkMonitor, self).closeEvent(evt)
123 125
124 def reject(self): 126 def reject(self):
125 """ 127 """
126 Public slot to close the dialog with a Reject status. 128 Public slot to close the dialog with a Reject status.
127 """ 129 """
128 self.__class__._monitor = None 130 self.__class__._monitor = None
129 super().reject() 131 super(E5NetworkMonitor, self).reject()
130 132
131 def __currentChanged(self, current, previous): 133 def __currentChanged(self, current, previous):
132 """ 134 """
133 Private slot to handle a change of the current index. 135 Private slot to handle a change of the current index.
134 136
204 206
205 @param networkAccessManager reference to the network access manager 207 @param networkAccessManager reference to the network access manager
206 (QNetworkAccessManager) 208 (QNetworkAccessManager)
207 @param parent reference to the parent object (QObject) 209 @param parent reference to the parent object (QObject)
208 """ 210 """
209 super().__init__(parent) 211 super(E5RequestModel, self).__init__(parent)
210 212
211 self.__headerData = [ 213 self.__headerData = [
212 self.trUtf8("Method"), 214 self.trUtf8("Method"),
213 self.trUtf8("Address"), 215 self.trUtf8("Address"),
214 self.trUtf8("Response"), 216 self.trUtf8("Response"),

eric ide

mercurial