|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2013 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to manage the list of messages to be ignored. |
|
8 """ |
|
9 |
|
10 from PyQt6.QtWidgets import QDialog |
|
11 |
|
12 from .Ui_EricErrorMessageFilterDialog import Ui_EricErrorMessageFilterDialog |
|
13 |
|
14 |
|
15 class EricErrorMessageFilterDialog(QDialog, Ui_EricErrorMessageFilterDialog): |
|
16 """ |
|
17 Class implementing a dialog to manage the list of messages to be ignored. |
|
18 """ |
|
19 def __init__(self, messageFilters, parent=None): |
|
20 """ |
|
21 Constructor |
|
22 |
|
23 @param messageFilters list of message filters to be edited |
|
24 @type list of str |
|
25 @param parent reference to the parent widget |
|
26 @type QWidget |
|
27 """ |
|
28 super().__init__(parent) |
|
29 self.setupUi(self) |
|
30 |
|
31 self.filtersEditWidget.setList(messageFilters) |
|
32 self.filtersEditWidget.setListWhatsThis(self.tr( |
|
33 "<b>Error Message Filters</b>" |
|
34 "<p>This list shows the configured message filters used to" |
|
35 " suppress error messages from within Qt.</p>" |
|
36 "<p>A default list of message filters is added to this" |
|
37 " user list.</p>" |
|
38 )) |
|
39 |
|
40 def getFilters(self): |
|
41 """ |
|
42 Public method to get the list of message filters. |
|
43 |
|
44 @return error message filters (list of strings) |
|
45 """ |
|
46 return self.filtersEditWidget.getList() |