eric6/E5Network/E5NetworkHeaderDetailsDialog.py

Tue, 02 Mar 2021 17:17:09 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 02 Mar 2021 17:17:09 +0100
changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
permissions
-rw-r--r--

Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.

# -*- coding: utf-8 -*-

# Copyright (c) 2009 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing a dialog to show the data of a response or reply header.
"""

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog

from .Ui_E5NetworkHeaderDetailsDialog import Ui_E5NetworkHeaderDetailsDialog


class E5NetworkHeaderDetailsDialog(QDialog, Ui_E5NetworkHeaderDetailsDialog):
    """
    Class implementing a dialog to show the data of a response or reply header.
    """
    def __init__(self, parent=None):
        """
        Constructor
        
        @param parent reference to the parent object (QWidget)
        """
        super(E5NetworkHeaderDetailsDialog, self).__init__(parent)
        self.setupUi(self)
        self.setWindowFlags(Qt.WindowType.Window)
    
    def setData(self, name, value):
        """
        Public method to set the data to display.
        
        @param name name of the header (string)
        @param value value of the header (string)
        """
        self.nameEdit.setText(name)
        self.valueEdit.setPlainText(value)

eric ide

mercurial