QScintilla/GotoDialog.py

changeset 0
de9c2efb9d02
child 12
1d8dd9706f46
equal deleted inserted replaced
-1:000000000000 0:de9c2efb9d02
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2002 - 2009 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the Goto dialog.
8 """
9
10 from PyQt4.QtGui import QDialog
11
12 from Ui_GotoDialog import Ui_GotoDialog
13
14 class GotoDialog(QDialog, Ui_GotoDialog):
15 """
16 Class implementing the Goto dialog.
17 """
18 def __init__(self, maximum, parent, name = None, modal = False):
19 """
20 Constructor
21
22 @param maximum the maximum allowed for the spinbox (int)
23 @param parent parent widget of this dialog (QWidget)
24 @param name name of this dialog (string)
25 @param modal flag indicating a modal dialog (boolean)
26 """
27 QDialog.__init__(self, parent)
28 if name:
29 self.setObjectName(name)
30 self.setupUi(self)
31 self.setModal(modal)
32
33 self.linenumberSpinBox.setMaximum(maximum)
34 self.linenumberSpinBox.selectAll()
35
36 def getLinenumber(self):
37 """
38 Public method to retrieve the linenumber.
39
40 @return line number (int)
41 """
42 return self.linenumberSpinBox.value()

eric ide

mercurial