E5Network/E5NetworkHeaderDetailsDialog.py

Sat, 18 Jul 2015 16:50:24 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 18 Jul 2015 16:50:24 +0200
changeset 4318
c2f374ca452b
parent 4278
ccd1e13cb9bd
child 4631
5c1a96925da4
permissions
-rw-r--r--

Improved parsing of the content disposition header analog to the way it is done in qutebrowser.

52
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
4021
195a471c327b Updated copyright for 2015.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
3 # Copyright (c) 2009 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
52
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to show the data of a response or reply header.
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2525
diff changeset
10 from __future__ import unicode_literals
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
11
4278
ccd1e13cb9bd Fixed issues where dialogs could not be minimized on some desktop environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
12 from PyQt5.QtCore import Qt
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3178
diff changeset
13 from PyQt5.QtWidgets import QDialog
52
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 from .Ui_E5NetworkHeaderDetailsDialog import Ui_E5NetworkHeaderDetailsDialog
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
17
52
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 class E5NetworkHeaderDetailsDialog(QDialog, Ui_E5NetworkHeaderDetailsDialog):
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 Class implementing a dialog to show the data of a response or reply header.
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
22 def __init__(self, parent=None):
52
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 Constructor
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param parent reference to the parent object (QWidget)
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
28 super(E5NetworkHeaderDetailsDialog, self).__init__(parent)
52
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 self.setupUi(self)
4278
ccd1e13cb9bd Fixed issues where dialogs could not be minimized on some desktop environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
30 self.setWindowFlags(Qt.Window)
52
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 def setData(self, name, value):
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 """
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 Public method to set the data to display.
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 @param name name of the header (string)
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 @param value value of the header (string)
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 """
ba69827929ee Renamed E4Network to E5Network.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.nameEdit.setText(name)
96
9624a110667d Started to clean up the code supported by py3flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 52
diff changeset
40 self.valueEdit.setPlainText(value)

eric ide

mercurial