20 |
20 |
21 def __init__(self, properties, parent=None, name=None, modal=False): |
21 def __init__(self, properties, parent=None, name=None, modal=False): |
22 """ |
22 """ |
23 Constructor |
23 Constructor |
24 |
24 |
25 @param properties properties for the watch expression (tuple) |
25 @param properties properties for the watch expression |
26 (expression, temporary flag, enabled flag, ignore count, |
26 (expression, temporary flag, enabled flag, ignore count, |
27 special condition) |
27 special condition) |
|
28 @type tuple of (str, bool, bool, int, str) |
28 @param parent the parent of this dialog |
29 @param parent the parent of this dialog |
|
30 @type QWidget |
29 @param name the widget name of this dialog |
31 @param name the widget name of this dialog |
|
32 @type str |
30 @param modal flag indicating a modal dialog |
33 @param modal flag indicating a modal dialog |
|
34 @type bool |
31 """ |
35 """ |
32 super().__init__(parent) |
36 super().__init__(parent) |
33 self.setupUi(self) |
37 self.setupUi(self) |
34 if name: |
38 if name: |
35 self.setObjectName(name) |
39 self.setObjectName(name) |
74 def __textChanged(self, txt): |
78 def __textChanged(self, txt): |
75 """ |
79 """ |
76 Private slot to handle the text changed signal of the condition line |
80 Private slot to handle the text changed signal of the condition line |
77 edit. |
81 edit. |
78 |
82 |
79 @param txt text of the line edit (string) |
83 @param txt text of the line edit |
|
84 @type str |
80 """ |
85 """ |
81 if self.conditionButton.isChecked(): |
86 if self.conditionButton.isChecked(): |
82 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
87 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
83 self.conditionEdit.text() != "" |
88 self.conditionEdit.text() != "" |
84 ) |
89 ) |
95 Public method to retrieve the entered data. |
100 Public method to retrieve the entered data. |
96 |
101 |
97 @return a tuple containing the watch expressions new properties |
102 @return a tuple containing the watch expressions new properties |
98 (expression, temporary flag, enabled flag, ignore count, |
103 (expression, temporary flag, enabled flag, ignore count, |
99 special condition) |
104 special condition) |
|
105 @rtype tuple of (str, bool, bool, int, str) |
100 """ |
106 """ |
101 if self.conditionButton.isChecked(): |
107 if self.conditionButton.isChecked(): |
102 return ( |
108 return ( |
103 self.conditionEdit.text(), |
109 self.conditionEdit.text(), |
104 self.temporaryCheckBox.isChecked(), |
110 self.temporaryCheckBox.isChecked(), |