|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2009 - 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to show the data of a response or reply header. |
|
8 """ |
|
9 |
|
10 from __future__ import unicode_literals |
|
11 |
|
12 from PyQt5.QtCore import Qt |
|
13 from PyQt5.QtWidgets import QDialog |
|
14 |
|
15 from .Ui_E5NetworkHeaderDetailsDialog import Ui_E5NetworkHeaderDetailsDialog |
|
16 |
|
17 |
|
18 class E5NetworkHeaderDetailsDialog(QDialog, Ui_E5NetworkHeaderDetailsDialog): |
|
19 """ |
|
20 Class implementing a dialog to show the data of a response or reply header. |
|
21 """ |
|
22 def __init__(self, parent=None): |
|
23 """ |
|
24 Constructor |
|
25 |
|
26 @param parent reference to the parent object (QWidget) |
|
27 """ |
|
28 super(E5NetworkHeaderDetailsDialog, self).__init__(parent) |
|
29 self.setupUi(self) |
|
30 self.setWindowFlags(Qt.Window) |
|
31 |
|
32 def setData(self, name, value): |
|
33 """ |
|
34 Public method to set the data to display. |
|
35 |
|
36 @param name name of the header (string) |
|
37 @param value value of the header (string) |
|
38 """ |
|
39 self.nameEdit.setText(name) |
|
40 self.valueEdit.setPlainText(value) |