src/eric7/IconEditor/IconSizeDialog.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
14 14
15 class IconSizeDialog(QDialog, Ui_IconSizeDialog): 15 class IconSizeDialog(QDialog, Ui_IconSizeDialog):
16 """ 16 """
17 Class implementing a dialog to enter the icon size. 17 Class implementing a dialog to enter the icon size.
18 """ 18 """
19
19 def __init__(self, width, height, parent=None): 20 def __init__(self, width, height, parent=None):
20 """ 21 """
21 Constructor 22 Constructor
22 23
23 @param width width to be set (integer) 24 @param width width to be set (integer)
24 @param height height to be set (integer) 25 @param height height to be set (integer)
25 @param parent reference to the parent widget (QWidget) 26 @param parent reference to the parent widget (QWidget)
26 """ 27 """
27 super().__init__(parent) 28 super().__init__(parent)
28 self.setupUi(self) 29 self.setupUi(self)
29 30
30 self.widthSpin.setValue(width) 31 self.widthSpin.setValue(width)
31 self.heightSpin.setValue(height) 32 self.heightSpin.setValue(height)
32 33
33 self.widthSpin.selectAll() 34 self.widthSpin.selectAll()
34 35
35 msh = self.minimumSizeHint() 36 msh = self.minimumSizeHint()
36 self.resize(max(self.width(), msh.width()), msh.height()) 37 self.resize(max(self.width(), msh.width()), msh.height())
37 38
38 def getData(self): 39 def getData(self):
39 """ 40 """
40 Public method to get the entered data. 41 Public method to get the entered data.
41 42
42 @return tuple with width and height (tuple of two integers) 43 @return tuple with width and height (tuple of two integers)
43 """ 44 """
44 return self.widthSpin.value(), self.heightSpin.value() 45 return self.widthSpin.value(), self.heightSpin.value()

eric ide

mercurial