eric7/E5Gui/E5ErrorMessageFilterDialog.py

branch
eric7
changeset 8312
800c432b34c8
parent 8218
7c09585bd960
child 8318
962bce857696
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eric7/E5Gui/E5ErrorMessageFilterDialog.py	Sat May 15 18:45:04 2021 +0200
@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2013 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing a dialog to manage the list of messages to be ignored.
+"""
+
+from PyQt5.QtWidgets import QDialog
+
+from .Ui_E5ErrorMessageFilterDialog import Ui_E5ErrorMessageFilterDialog
+
+
+class E5ErrorMessageFilterDialog(QDialog, Ui_E5ErrorMessageFilterDialog):
+    """
+    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