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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/Debugger/StartForm.ui'
#
# Created: Mon Mai 5 21:01:36 2003
#      by: The PyQt User Interface Compiler (pyuic) 3.6
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

        layout3 = QGridLayout(None,1,1,0,6,"layout3")

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

        layout3.addMultiCellWidget(self.exceptionCheckBox,2,2,0,1)

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

        layout3.addWidget(self.dirButton,1,2)

        self.cmdlineCombo = QComboBox(0,self,"cmdlineCombo")
        self.cmdlineCombo.setSizePolicy(QSizePolicy(7,0,0,0,self.cmdlineCombo.sizePolicy().hasHeightForWidth()))
        self.cmdlineCombo.setEditable(1)
        self.cmdlineCombo.setInsertionPolicy(QComboBox.AtTop)
        self.cmdlineCombo.setAutoCompletion(1)
        self.cmdlineCombo.setDuplicatesEnabled(0)

        layout3.addMultiCellWidget(self.cmdlineCombo,0,0,1,2)

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

        layout3.addWidget(self.TextLabel2,1,0)

        self.workdirCombo = QComboBox(0,self,"workdirCombo")
        self.workdirCombo.setSizePolicy(QSizePolicy(7,0,0,0,self.workdirCombo.sizePolicy().hasHeightForWidth()))
        self.workdirCombo.setEditable(1)
        self.workdirCombo.setInsertionPolicy(QComboBox.AtTop)
        self.workdirCombo.setAutoCompletion(1)
        self.workdirCombo.setDuplicatesEnabled(0)

        layout3.addWidget(self.workdirCombo,1,1)

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

        layout3.addWidget(self.TextLabel1,0,0)

        self.eraseCheckBox = QCheckBox(self,"eraseCheckBox")
        self.eraseCheckBox.setEnabled(0)

        layout3.addMultiCellWidget(self.eraseCheckBox,3,3,0,1)
        StartFormLayout.addLayout(layout3)

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

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

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

        self.languageChange()

        self.resize(QSize(488,160).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.okButton,SIGNAL("clicked()"),self,SLOT("accept()"))
        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("reject()"))
        self.connect(self.dirButton,SIGNAL("clicked()"),self.handleDir)

        self.setTabOrder(self.cmdlineCombo,self.workdirCombo)
        self.setTabOrder(self.workdirCombo,self.exceptionCheckBox)
        self.setTabOrder(self.exceptionCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)
        self.setTabOrder(self.cancelButton,self.dirButton)

        self.TextLabel2.setBuddy(self.workdirCombo)
        self.TextLabel1.setBuddy(self.cmdlineCombo)


    def languageChange(self):
        self.setCaption(self.tr("Start debugging"))
        self.exceptionCheckBox.setText(self.tr("Report &exceptions"))
        QToolTip.add(self.exceptionCheckBox,self.tr("Uncheck to disable exception reporting"))
        QWhatsThis.add(self.exceptionCheckBox,self.tr("<b>Report exceptions</b>\n"
"<p>Uncheck this in order to disable exception reporting.</p>"))
        self.dirButton.setText(self.tr("..."))
        QToolTip.add(self.dirButton,self.tr("Select directory using a directory selection dialog"))
        QWhatsThis.add(self.dirButton,self.tr("<b>Select directory</b>\n"
"<p>Select the working directory via a directory selection dialog.</p>"))
        QToolTip.add(self.cmdlineCombo,self.tr("Enter the commandline parameters"))
        QWhatsThis.add(self.cmdlineCombo,self.tr("<b>Commandline</b>\n"
"<p>Enter the commandline parameters in this field.</p>"))
        self.TextLabel2.setText(self.tr("&Working directory:"))
        QToolTip.add(self.workdirCombo,self.tr("Enter the working directory"))
        QWhatsThis.add(self.workdirCombo,self.tr("<b>Working directory</b>\n"
"<p>Enter the working directory of the application to be debugged. Leave it empty to set the working directory to the executable directory.</p>"))
        self.TextLabel1.setText(self.tr("Command&line:"))
        self.eraseCheckBox.setText(self.tr("Erase coverage information"))
        QToolTip.add(self.eraseCheckBox,self.tr("Select this to erase the collected coverage information"))
        QWhatsThis.add(self.eraseCheckBox,self.tr("<b>Erase coverage information</b>\n"
"<p>Select this to erase the collected coverage information before the next coverage run.</p>"))
        self.okButton.setText(self.tr("&OK"))
        self.cancelButton.setText(self.tr("&Cancel"))


    def handleDir(self):
        print "StartForm.handleDir(): Not implemented yet"

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