# -*- coding: utf-8 -*-

# Copyright (c) 2002, 2003 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing the Goto dialog.
"""

from qt import *

from GotoForm import GotoForm

class GotoDialog(GotoForm):
    """
    Class implementing the Goto dialog.
    """
    def __init__(self,parent,name=None,modal=0,fl=0):
        """
        Constructor
        
        Arguments
        
            parent -- parent widget of this dialog (QWidget)
            
            name -- name of this dialog (string or QString)
            
            modal -- flag indicating a modal dialog
            
            fl -- window flags
        """
        GotoForm.__init__(self,parent,name,modal,fl)
        
        dummy = self.trUtf8('dummy')
        
    def getLinenumber(self):
        """
        Public method to retrieve the linenumber.
        
        Returns
        
            line number (int)
        """
        return self.linenumberSpinBox.value()
        
    def setMaxValue(self, lines):
        """
        Public method to set the highest selectable linenumber.
        
        Arguments
        
            lines -- max. number of lines of the editor
        """
        self.linenumberSpinBox.setMaxValue(lines)
