Salome HOME
style: black format
[tools/sat.git] / data / templates / PythonComponent8 / src / Dialog / EditRadiusDialog.py
index 69c648ebd85836013db74a67d6f150509430b40b..a9c43c8c5971c548f66c5543bf0760c7a7d740b3 100755 (executable)
@@ -1,42 +1,42 @@
 from DialogEdit import *
 from qtsalome import *
 
-class EditRadiusDialog( DialogEdit ) :
 
-   def __init__( self, helpFile, controller, widgetDialogBox, model, oldRadius  ) :
-       """Constructor"""
+class EditRadiusDialog(DialogEdit):
+    def __init__(self, helpFile, controller, widgetDialogBox, model, oldRadius):
+        """Constructor"""
 
-       #Initializing parent widget
-       DialogEdit.__init__( self, helpFile, controller, widgetDialogBox )
+        # Initializing parent widget
+        DialogEdit.__init__(self, helpFile, controller, widgetDialogBox)
 
-       self._model = model
-       self.entryRadius.setText( oldRadius )
-       pass
+        self._model = model
+        self.entryRadius.setText(oldRadius)
+        pass
 
-   def addSpecialWidgets( self ) :
-       floatValidator = QDoubleValidator( self )
+    def addSpecialWidgets(self):
+        floatValidator = QDoubleValidator(self)
 
-       lRadius = QLabel( "Radius", self )
-       self.v11.addWidget( lRadius )
-       self.entryRadius = QLineEdit( self )
-       self.entryRadius.setValidator( floatValidator )
-       self.v12.addWidget( self.entryRadius )
-       pass
+        lRadius = QLabel("Radius", self)
+        self.v11.addWidget(lRadius)
+        self.entryRadius = QLineEdit(self)
+        self.entryRadius.setValidator(floatValidator)
+        self.v12.addWidget(self.entryRadius)
+        pass
 
-   def execApply( self ) :
-       newRadius = self.newRadius
-       self.getController().editRadius( self._model, newRadius )
-       return
+    def execApply(self):
+        newRadius = self.newRadius
+        self.getController().editRadius(self._model, newRadius)
+        return
 
+    def retrieveUserEntries(self):
+        self.newRadius = str(self.entryRadius.text())
+        pass
 
-   def retrieveUserEntries( self ) :
-       self.newRadius = str( self.entryRadius.text() )
-       pass
+    def checkUserEntries(self):
+        if self.newRadius == "":
+            self.errMessage = "All attributes must be filled"
+            return False
+        return True
 
-   def checkUserEntries( self ) :
-       if self.newRadius == "" :
-          self.errMessage = 'All attributes must be filled'
-          return False
-       return True
 
 pass