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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/QScintilla/GotoForm.ui'
#
# Created: Mon Jan 20 20:44:58 2003
#      by: The PyQt User Interface Compiler (pyuic)
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


class GotoForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

        if not name:
            self.setName("GotoForm")


        GotoFormLayout = QVBoxLayout(self,6,6,"GotoFormLayout")

        Layout2 = QHBoxLayout(None,0,6,"Layout2")

        self.linenumberLabel = QLabel(self,"linenumberLabel")
        Layout2.addWidget(self.linenumberLabel)

        self.linenumberSpinBox = QSpinBox(self,"linenumberSpinBox")
        self.linenumberSpinBox.setSizePolicy(QSizePolicy(3,0,0,0,self.linenumberSpinBox.sizePolicy().hasHeightForWidth()))
        self.linenumberSpinBox.setMaxValue(99999)
        self.linenumberSpinBox.setMinValue(1)
        Layout2.addWidget(self.linenumberSpinBox)
        GotoFormLayout.addLayout(Layout2)

        Layout1 = QHBoxLayout(None,0,6,"Layout1")
        spacer = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout1.addItem(spacer)

        self.gotoButton = QPushButton(self,"gotoButton")
        self.gotoButton.setDefault(1)
        Layout1.addWidget(self.gotoButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout1.addWidget(self.cancelButton)
        spacer_2 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout1.addItem(spacer_2)
        GotoFormLayout.addLayout(Layout1)

        self.languageChange()

        self.resize(QSize(175,78).expandedTo(self.minimumSizeHint()))

        self.connect(self.gotoButton,SIGNAL("clicked()"),self,SLOT("accept()"))
        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("reject()"))

        self.linenumberLabel.setBuddy(self.linenumberSpinBox)

    def languageChange(self):
        self.setCaption(self.tr("Goto"))
        self.linenumberLabel.setText(self.tr("&Line Number:"))
        QToolTip.add(self.linenumberSpinBox,self.tr("Enter linenumber to go to"))
        QWhatsThis.add(self.linenumberSpinBox,self.tr("<b>Linenumber</b>\n"
"<p>Enter the linenumber to go to in this entry field.</p>"))
        self.gotoButton.setText(self.tr("&Goto"))
        QToolTip.add(self.gotoButton,self.tr("Go to the entered line"))
        QWhatsThis.add(self.gotoButton,self.tr("<b>Goto</b>\n"
"<p>Go to the entered line.</p>"))
        self.cancelButton.setText(self.tr("&Cancel"))
        QToolTip.add(self.cancelButton,self.tr("Cancel the dialog"))
        QWhatsThis.add(self.cancelButton,self.tr("<b>Cancel</b>\n"
"<p>Cancels the goto dialog.</p>"))


if __name__ == "__main__":
    a = QApplication(sys.argv)
    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
    w = GotoForm()
    a.setMainWidget(w)
    w.show()
    a.exec_loop()
