15 |
15 |
16 class EditWatchpointDialog(QDialog, Ui_EditWatchpointDialog): |
16 class EditWatchpointDialog(QDialog, Ui_EditWatchpointDialog): |
17 """ |
17 """ |
18 Class implementing a dialog to edit watch expression properties. |
18 Class implementing a dialog to edit watch expression properties. |
19 """ |
19 """ |
20 def __init__(self, properties, parent = None, name = None, modal = False): |
20 def __init__(self, properties, parent=None, name=None, modal=False): |
21 """ |
21 """ |
22 Constructor |
22 Constructor |
23 |
23 |
24 @param properties properties for the watch expression (tuple) |
24 @param properties properties for the watch expression (tuple) |
25 (expression, temporary flag, enabled flag, ignore count, special condition) |
25 (expression, temporary flag, enabled flag, ignore count, special condition) |
26 @param parent the parent of this dialog |
26 @param parent the parent of this dialog |
27 @param name the widget name of this dialog |
27 @param name the widget name of this dialog |
28 @param modal flag indicating a modal dialog |
28 @param modal flag indicating a modal dialog |
29 """ |
29 """ |
30 QDialog.__init__(self,parent) |
30 QDialog.__init__(self, parent) |
31 self.setupUi(self) |
31 self.setupUi(self) |
32 if name: |
32 if name: |
33 self.setObjectName(name) |
33 self.setObjectName(name) |
34 self.setModal(modal) |
34 self.setModal(modal) |
35 |
35 |
88 |
88 |
89 @return a tuple containing the watch expressions new properties |
89 @return a tuple containing the watch expressions new properties |
90 (expression, temporary flag, enabled flag, ignore count, special condition) |
90 (expression, temporary flag, enabled flag, ignore count, special condition) |
91 """ |
91 """ |
92 if self.conditionButton.isChecked(): |
92 if self.conditionButton.isChecked(): |
93 return (self.conditionEdit.text(), |
93 return (self.conditionEdit.text(), |
94 self.temporaryCheckBox.isChecked(), |
94 self.temporaryCheckBox.isChecked(), |
95 self.enabledCheckBox.isChecked(), |
95 self.enabledCheckBox.isChecked(), |
96 self.ignoreSpinBox.value(), |
96 self.ignoreSpinBox.value(), |
97 "") |
97 "") |
98 elif self.specialButton.isChecked(): |
98 elif self.specialButton.isChecked(): |
99 return (self.specialEdit.text(), |
99 return (self.specialEdit.text(), |
100 self.temporaryCheckBox.isChecked(), |
100 self.temporaryCheckBox.isChecked(), |
101 self.enabledCheckBox.isChecked(), |
101 self.enabledCheckBox.isChecked(), |
102 self.ignoreSpinBox.value(), |
102 self.ignoreSpinBox.value(), |
103 self.specialCombo.currentText()) |
103 self.specialCombo.currentText()) |
104 else: |
104 else: |
105 # should not happen |
105 # should not happen |
106 return ("", False, False, 0, "") |
106 return ("", False, False, 0, "") |