E5Gui/E5TextSpinBox.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1131
7781e396c903
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
3 # Copyright (c) 2010 - 2011 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2010 - 2011 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 from PyQt4.QtGui import QSpinBox 6 from PyQt4.QtGui import QSpinBox
7 7
8
8 class E5TextSpinBox(QSpinBox): 9 class E5TextSpinBox(QSpinBox):
9 """ 10 """
10 Class implementing a spinbox with textual entries. 11 Class implementing a spinbox with textual entries.
11 """ 12 """
12 def __init__(self, parent = None): 13 def __init__(self, parent=None):
13 """ 14 """
14 Constructor 15 Constructor
15 16
16 @param parent reference to the parent widget (QWidget) 17 @param parent reference to the parent widget (QWidget)
17 """ 18 """
20 self.__items = [] 21 self.__items = []
21 22
22 self.setMinimum(0) 23 self.setMinimum(0)
23 self.setMaximum(0) 24 self.setMaximum(0)
24 25
25 def addItem(self, txt, data = None): 26 def addItem(self, txt, data=None):
26 """ 27 """
27 Public method to add an item with item data. 28 Public method to add an item with item data.
28 29
29 @param txt text to be shown (string) 30 @param txt text to be shown (string)
30 @param data associated data 31 @param data associated data

eric ide

mercurial