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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/QScintilla/GotoForm.ui'
#
# Created: So Nov 27 16:12:50 2005
#      by: The PyQt User Interface Compiler (pyuic) 3.15
#
# 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(QSizePolicy.MinimumExpanding,QSizePolicy.Fixed,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")
        Spacer1 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout1.addItem(Spacer1)

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

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

        self.languageChange()

        self.resize(QSize(175,78).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.gotoButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.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>"))


    def __tr(self,s,c = None):
        return qApp.translate("GotoForm",s,c)

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()
