Salome HOME
style: black format
[tools/sat.git] / data / templates / PythonComponent8 / src / Dialog / EditRadiusDialog.py
1 from DialogEdit import *
2 from qtsalome import *
3
4
5 class EditRadiusDialog(DialogEdit):
6     def __init__(self, helpFile, controller, widgetDialogBox, model, oldRadius):
7         """Constructor"""
8
9         # Initializing parent widget
10         DialogEdit.__init__(self, helpFile, controller, widgetDialogBox)
11
12         self._model = model
13         self.entryRadius.setText(oldRadius)
14         pass
15
16     def addSpecialWidgets(self):
17         floatValidator = QDoubleValidator(self)
18
19         lRadius = QLabel("Radius", self)
20         self.v11.addWidget(lRadius)
21         self.entryRadius = QLineEdit(self)
22         self.entryRadius.setValidator(floatValidator)
23         self.v12.addWidget(self.entryRadius)
24         pass
25
26     def execApply(self):
27         newRadius = self.newRadius
28         self.getController().editRadius(self._model, newRadius)
29         return
30
31     def retrieveUserEntries(self):
32         self.newRadius = str(self.entryRadius.text())
33         pass
34
35     def checkUserEntries(self):
36         if self.newRadius == "":
37             self.errMessage = "All attributes must be filled"
38             return False
39         return True
40
41
42 pass