8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import pyqtSlot |
10 from PyQt6.QtCore import pyqtSlot |
11 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
11 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
12 |
12 |
13 from E5Gui import E5MessageBox |
13 from E5Gui import EricMessageBox |
14 |
14 |
15 from .Ui_SubstyleDefinitionDialog import Ui_SubstyleDefinitionDialog |
15 from .Ui_SubstyleDefinitionDialog import Ui_SubstyleDefinitionDialog |
16 |
16 |
17 |
17 |
18 class SubstyleDefinitionDialog(QDialog, Ui_SubstyleDefinitionDialog): |
18 class SubstyleDefinitionDialog(QDialog, Ui_SubstyleDefinitionDialog): |
77 @pyqtSlot() |
77 @pyqtSlot() |
78 def on_resetButton_clicked(self): |
78 def on_resetButton_clicked(self): |
79 """ |
79 """ |
80 Private slot to reset the dialog contents. |
80 Private slot to reset the dialog contents. |
81 """ |
81 """ |
82 ok = E5MessageBox.yesNo( |
82 ok = EricMessageBox.yesNo( |
83 self, |
83 self, |
84 self.tr("Reset Sub-Style Data"), |
84 self.tr("Reset Sub-Style Data"), |
85 self.tr("""Shall the entered sub-style data be reset?""")) |
85 self.tr("""Shall the entered sub-style data be reset?""")) |
86 if ok: |
86 if ok: |
87 if self.__substyle >= 0: |
87 if self.__substyle >= 0: |
101 filled = ( |
101 filled = ( |
102 bool(self.descriptionEdit.text().strip()) or |
102 bool(self.descriptionEdit.text().strip()) or |
103 bool(self.wordsEdit.toPlainText().strip()) |
103 bool(self.wordsEdit.toPlainText().strip()) |
104 ) |
104 ) |
105 ok = ( |
105 ok = ( |
106 E5MessageBox.yesNo( |
106 EricMessageBox.yesNo( |
107 self, |
107 self, |
108 self.tr("Set Sub-Style Data to Default"), |
108 self.tr("Set Sub-Style Data to Default"), |
109 self.tr("""Shall the sub-style data be set to default""" |
109 self.tr("""Shall the sub-style data be set to default""" |
110 """ values?""")) |
110 """ values?""")) |
111 if filled else |
111 if filled else |