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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_7/eric3/Debugger/EditBreakpointForm.ui'
#
# Created: Sa Mär 12 16:35:42 2005
#      by: The PyQt User Interface Compiler (pyuic) 3.14
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


        EditBreakpointFormLayout = QGridLayout(self,1,1,6,6,"EditBreakpointFormLayout")

        self.textLabel2 = QLabel(self,"textLabel2")

        EditBreakpointFormLayout.addWidget(self.textLabel2,3,0)

        self.textLabel1 = QLabel(self,"textLabel1")

        EditBreakpointFormLayout.addWidget(self.textLabel1,2,0)

        self.textLabel1_2 = QLabel(self,"textLabel1_2")

        EditBreakpointFormLayout.addWidget(self.textLabel1_2,0,0)

        self.textLabel2_2 = QLabel(self,"textLabel2_2")

        EditBreakpointFormLayout.addWidget(self.textLabel2_2,1,0)

        self.fileButton = QPushButton(self,"fileButton")

        EditBreakpointFormLayout.addWidget(self.fileButton,1,3)

        layout1 = QHBoxLayout(None,0,6,"layout1")
        spacer1 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer1)

        self.okButton = QPushButton(self,"okButton")
        self.okButton.setDefault(1)
        layout1.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        layout1.addWidget(self.cancelButton)
        spacer2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer2)

        EditBreakpointFormLayout.addMultiCellLayout(layout1,6,6,0,3)
        spacer4 = QSpacerItem(200,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        EditBreakpointFormLayout.addItem(spacer4,1,2)

        self.linenoSpinBox = QSpinBox(self,"linenoSpinBox")
        self.linenoSpinBox.setMaxValue(99999)
        self.linenoSpinBox.setMinValue(1)

        EditBreakpointFormLayout.addWidget(self.linenoSpinBox,1,1)
        spacer3 = QSpacerItem(250,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        EditBreakpointFormLayout.addMultiCell(spacer3,3,3,2,3)

        self.ignoreSpinBox = QSpinBox(self,"ignoreSpinBox")
        self.ignoreSpinBox.setMaxValue(9999)

        EditBreakpointFormLayout.addWidget(self.ignoreSpinBox,3,1)

        self.conditionCombo = QComboBox(0,self,"conditionCombo")
        self.conditionCombo.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.conditionCombo.sizePolicy().hasHeightForWidth()))
        self.conditionCombo.setEditable(1)
        self.conditionCombo.setAutoCompletion(1)

        EditBreakpointFormLayout.addMultiCellWidget(self.conditionCombo,2,2,1,3)

        self.filenameCombo = QComboBox(0,self,"filenameCombo")
        self.filenameCombo.setEditable(1)
        self.filenameCombo.setAutoCompletion(1)

        EditBreakpointFormLayout.addMultiCellWidget(self.filenameCombo,0,0,1,3)

        self.temporaryCheckBox = QCheckBox(self,"temporaryCheckBox")

        EditBreakpointFormLayout.addMultiCellWidget(self.temporaryCheckBox,4,4,0,3)

        self.enabledCheckBox = QCheckBox(self,"enabledCheckBox")
        self.enabledCheckBox.setChecked(1)

        EditBreakpointFormLayout.addMultiCellWidget(self.enabledCheckBox,5,5,0,3)

        self.languageChange()

        self.resize(QSize(428,218).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
        self.connect(self.fileButton,SIGNAL("clicked()"),self.handleSelectFile)
        self.connect(self.filenameCombo,SIGNAL("textChanged(const QString&)"),self.filenameChanged)

        self.setTabOrder(self.fileButton,self.linenoSpinBox)
        self.setTabOrder(self.linenoSpinBox,self.conditionCombo)
        self.setTabOrder(self.conditionCombo,self.ignoreSpinBox)
        self.setTabOrder(self.ignoreSpinBox,self.temporaryCheckBox)
        self.setTabOrder(self.temporaryCheckBox,self.enabledCheckBox)
        self.setTabOrder(self.enabledCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Edit Breakpoint"))
        self.textLabel2.setText(self.__tr("Ignore Count:"))
        self.textLabel1.setText(self.__tr("Condition:"))
        self.textLabel1_2.setText(self.__tr("Filename:"))
        self.textLabel2_2.setText(self.__tr("Linenumber:"))
        self.fileButton.setText(self.__tr("..."))
        QToolTip.add(self.fileButton,self.__tr("Press to open a file selection dialog"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        QToolTip.add(self.linenoSpinBox,self.__tr("Enter the linenumber of the breakpoint"))
        QToolTip.add(self.ignoreSpinBox,self.__tr("Enter an ignore count for the breakpoint"))
        QToolTip.add(self.conditionCombo,self.__tr("Enter or select a condition for the breakpoint"))
        QToolTip.add(self.filenameCombo,self.__tr("Enter the filename of the breakpoint"))
        self.temporaryCheckBox.setText(self.__tr("Temporary Breakpoint"))
        QToolTip.add(self.temporaryCheckBox,self.__tr("Select whether this is a temporary breakpoint"))
        self.enabledCheckBox.setText(self.__tr("Enabled"))
        QToolTip.add(self.enabledCheckBox,self.__tr("Select, whether the breakpoint is enabled"))


    def handleSelectFile(self):
        print "EditBreakpointForm.handleSelectFile(): Not implemented yet"

    def filenameChanged(self,a0):
        print "EditBreakpointForm.filenameChanged(const QString&): Not implemented yet"

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

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