src/eric7/EricWidgets/EricErrorMessageFilterDialog.py

Thu, 07 Jul 2022 11:23:56 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 07 Jul 2022 11:23:56 +0200
branch
eric7
changeset 9209
b99e7fd55fd3
parent 8881
eric7/EricWidgets/EricErrorMessageFilterDialog.py@54e42bc2437a
child 9221
bf71ee032bb4
permissions
-rw-r--r--

Reorganized the project structure to use the source layout in order to support up-to-date build systems with "pyproject.toml".

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

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

"""
Module implementing a dialog to manage the list of messages to be ignored.
"""

from PyQt6.QtWidgets import QDialog

from .Ui_EricErrorMessageFilterDialog import Ui_EricErrorMessageFilterDialog


class EricErrorMessageFilterDialog(QDialog, Ui_EricErrorMessageFilterDialog):
    """
    Class implementing a dialog to manage the list of messages to be ignored.
    """
    def __init__(self, messageFilters, parent=None):
        """
        Constructor
        
        @param messageFilters list of message filters to be edited
        @type list of str
        @param parent reference to the parent widget
        @type QWidget
        """
        super().__init__(parent)
        self.setupUi(self)
        
        self.filtersEditWidget.setList(messageFilters)
        self.filtersEditWidget.setListWhatsThis(self.tr(
            "<b>Error Message Filters</b>"
            "<p>This list shows the configured message filters used to"
            " suppress error messages from within Qt.</p>"
            "<p>A default list of message filters is added to this"
            " user list.</p>"
        ))
    
    def getFilters(self):
        """
        Public method to get the list of message filters.
        
        @return error message filters (list of strings)
        """
        return self.filtersEditWidget.getList()

eric ide

mercurial