Salome HOME
Mise à jour du template PythonComponent:
[tools/sat.git] / data / templates / PythonComponent / src / Dialog / EditRadiusDialog.py
1 from DialogEdit import *
2 from qtsalome import *
3
4 class EditRadiusDialog( DialogEdit ) :
5
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
32    def retrieveUserEntries( self ) :
33        self.newRadius = str( self.entryRadius.text() )
34        pass
35
36    def checkUserEntries( self ) :
37        if self.newRadius == "" :
38           self.errMessage = 'All attributes must be filled'
39           return False
40        return True
41
42 pass