QScintilla/GotoDialog.py

branch
5_1_x
changeset 959
3b5ad7224945
parent 791
9ec2ac20e54e
child 1510
e75ecf2bd9dd
equal deleted inserted replaced
957:ff469c60f5fe 959:3b5ad7224945
13 13
14 class GotoDialog(QDialog, Ui_GotoDialog): 14 class GotoDialog(QDialog, Ui_GotoDialog):
15 """ 15 """
16 Class implementing the Goto dialog. 16 Class implementing the Goto dialog.
17 """ 17 """
18 def __init__(self, maximum, parent, name = None, modal = False): 18 def __init__(self, maximum, curLine, parent, name = None, modal = False):
19 """ 19 """
20 Constructor 20 Constructor
21 21
22 @param maximum the maximum allowed for the spinbox (int) 22 @param maximum maximum allowed for the spinbox (integer)
23 @param curLine current line number (integer)
23 @param parent parent widget of this dialog (QWidget) 24 @param parent parent widget of this dialog (QWidget)
24 @param name name of this dialog (string) 25 @param name name of this dialog (string)
25 @param modal flag indicating a modal dialog (boolean) 26 @param modal flag indicating a modal dialog (boolean)
26 """ 27 """
27 QDialog.__init__(self, parent) 28 QDialog.__init__(self, parent)
29 self.setObjectName(name) 30 self.setObjectName(name)
30 self.setupUi(self) 31 self.setupUi(self)
31 self.setModal(modal) 32 self.setModal(modal)
32 33
33 self.linenumberSpinBox.setMaximum(maximum) 34 self.linenumberSpinBox.setMaximum(maximum)
35 self.linenumberSpinBox.setValue(curLine)
34 self.linenumberSpinBox.selectAll() 36 self.linenumberSpinBox.selectAll()
35 37
36 def getLinenumber(self): 38 def getLinenumber(self):
37 """ 39 """
38 Public method to retrieve the linenumber. 40 Public method to retrieve the linenumber.

eric ide

mercurial