IconEditor/IconZoomDialog.py

changeset 2334
fc69ad77e18a
parent 2331
9e623311630d
child 2336
d9e47b8ee1ef
child 2337
ba67938138b9
equal deleted inserted replaced
2331:9e623311630d 2334:fc69ad77e18a
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2009 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to select the zoom factor.
8 """
9
10 from PyQt4.QtGui import QDialog
11
12 from .Ui_IconZoomDialog import Ui_IconZoomDialog
13
14
15 class IconZoomDialog(QDialog, Ui_IconZoomDialog):
16 """
17 Class implementing a dialog to select the zoom factor.
18 """
19 def __init__(self, zoom, parent=None):
20 """
21 Constructor
22
23 @param zoom zoom factor to show in the spinbox
24 @param parent parent widget of this dialog (QWidget)
25 """
26 super().__init__(parent)
27 self.setupUi(self)
28
29 self.zoomSpinBox.setValue(zoom * 100)
30 self.zoomSpinBox.selectAll()
31
32 def getZoomFactor(self):
33 """
34 Public method to retrieve the zoom factor.
35
36 @return zoom factor (int)
37 """
38 return self.zoomSpinBox.value() // 100

eric ide

mercurial