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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/Debugger/StartForm.ui'
#
# Created: So Jan 15 12:46:40 2006
#      by: The PyQt User Interface Compiler (pyuic) 3.15.1
#
# 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 = QGridLayout(self,1,1,6,6,"StartFormLayout")

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

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

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

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

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

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

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

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

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

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

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

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

        self.environmentCombo = QComboBox(0,self,"environmentCombo")
        self.environmentCombo.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.environmentCombo.sizePolicy().hasHeightForWidth()))
        self.environmentCombo.setEditable(1)
        self.environmentCombo.setInsertionPolicy(QComboBox.AtTop)
        self.environmentCombo.setAutoCompletion(1)
        self.environmentCombo.setDuplicatesEnabled(0)

        StartFormLayout.addMultiCellWidget(self.environmentCombo,2,2,1,2)

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

        StartFormLayout.addMultiCellWidget(self.exceptionCheckBox,3,3,0,2)

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

        StartFormLayout.addMultiCellWidget(self.tracePythonCheckBox,4,4,0,2)

        Layout1 = QHBoxLayout(None,0,6,"Layout1")
        Spacer1 = QSpacerItem(30,0,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(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout1.addItem(Spacer2)

        StartFormLayout.addMultiCellLayout(Layout1,8,8,0,2)

        self.cyclopsFrame = QFrame(self,"cyclopsFrame")
        self.cyclopsFrame.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Preferred,0,0,self.cyclopsFrame.sizePolicy().hasHeightForWidth()))
        self.cyclopsFrame.setFrameShape(QFrame.StyledPanel)
        self.cyclopsFrame.setFrameShadow(QFrame.Plain)
        self.cyclopsFrame.setLineWidth(0)
        cyclopsFrameLayout = QVBoxLayout(self.cyclopsFrame,0,0,"cyclopsFrameLayout")

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

        self.modFuncLabel = QLabel(self.cyclopsFrame,"modFuncLabel")
        layout5.addWidget(self.modFuncLabel)

        self.modFuncCombo = QComboBox(0,self.cyclopsFrame,"modFuncCombo")
        self.modFuncCombo.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.modFuncCombo.sizePolicy().hasHeightForWidth()))
        self.modFuncCombo.setEditable(1)
        self.modFuncCombo.setInsertionPolicy(QComboBox.AtTop)
        self.modFuncCombo.setAutoCompletion(1)
        self.modFuncCombo.setDuplicatesEnabled(0)
        layout5.addWidget(self.modFuncCombo)
        cyclopsFrameLayout.addLayout(layout5)

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

        self.cyclopsCyclesCheckBox = QCheckBox(self.cyclopsFrame,"cyclopsCyclesCheckBox")
        self.cyclopsCyclesCheckBox.setChecked(1)

        layout6.addWidget(self.cyclopsCyclesCheckBox,1,0)

        self.cyclopsSCCSCheckBox = QCheckBox(self.cyclopsFrame,"cyclopsSCCSCheckBox")
        self.cyclopsSCCSCheckBox.setChecked(1)

        layout6.addWidget(self.cyclopsSCCSCheckBox,0,1)

        self.cyclopsArcsCheckBox = QCheckBox(self.cyclopsFrame,"cyclopsArcsCheckBox")
        self.cyclopsArcsCheckBox.setChecked(1)

        layout6.addWidget(self.cyclopsArcsCheckBox,1,1)

        self.cyclopsIterateCheckBox = QCheckBox(self.cyclopsFrame,"cyclopsIterateCheckBox")
        self.cyclopsIterateCheckBox.setChecked(1)

        layout6.addWidget(self.cyclopsIterateCheckBox,2,1)

        self.cyclopsCycleObjsCheckBox = QCheckBox(self.cyclopsFrame,"cyclopsCycleObjsCheckBox")
        self.cyclopsCycleObjsCheckBox.setChecked(1)

        layout6.addWidget(self.cyclopsCycleObjsCheckBox,2,0)

        self.cyclopsStatsCheckBox = QCheckBox(self.cyclopsFrame,"cyclopsStatsCheckBox")
        self.cyclopsStatsCheckBox.setChecked(1)

        layout6.addWidget(self.cyclopsStatsCheckBox,0,0)
        cyclopsFrameLayout.addLayout(layout6)

        StartFormLayout.addMultiCellWidget(self.cyclopsFrame,7,7,0,2)

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

        StartFormLayout.addMultiCellWidget(self.eraseCheckBox,6,6,0,2)

        self.coverageFrame = QFrame(self,"coverageFrame")
        self.coverageFrame.setFrameShape(QFrame.StyledPanel)
        self.coverageFrame.setFrameShadow(QFrame.Plain)
        self.coverageFrame.setLineWidth(0)
        coverageFrameLayout = QVBoxLayout(self.coverageFrame,0,0,"coverageFrameLayout")

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

        self.textLabel1_2 = QLabel(self.coverageFrame,"textLabel1_2")
        layout5_2.addWidget(self.textLabel1_2)

        self.covexcCombo = QComboBox(0,self.coverageFrame,"covexcCombo")
        self.covexcCombo.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.covexcCombo.sizePolicy().hasHeightForWidth()))
        self.covexcCombo.setEditable(1)
        self.covexcCombo.setInsertionPolicy(QComboBox.AtTop)
        self.covexcCombo.setAutoCompletion(1)
        self.covexcCombo.setDuplicatesEnabled(0)
        layout5_2.addWidget(self.covexcCombo)
        coverageFrameLayout.addLayout(layout5_2)

        StartFormLayout.addMultiCellWidget(self.coverageFrame,5,5,0,2)

        self.languageChange()

        self.resize(QSize(488,328).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.modFuncCombo,SIGNAL("textChanged(const QString&)"),self.enableOkButton)
        self.connect(self.dirButton,SIGNAL("clicked()"),self.handleDir)

        self.setTabOrder(self.cmdlineCombo,self.workdirCombo)
        self.setTabOrder(self.workdirCombo,self.dirButton)
        self.setTabOrder(self.dirButton,self.environmentCombo)
        self.setTabOrder(self.environmentCombo,self.exceptionCheckBox)
        self.setTabOrder(self.exceptionCheckBox,self.tracePythonCheckBox)
        self.setTabOrder(self.tracePythonCheckBox,self.covexcCombo)
        self.setTabOrder(self.covexcCombo,self.eraseCheckBox)
        self.setTabOrder(self.eraseCheckBox,self.modFuncCombo)
        self.setTabOrder(self.modFuncCombo,self.cyclopsStatsCheckBox)
        self.setTabOrder(self.cyclopsStatsCheckBox,self.cyclopsCyclesCheckBox)
        self.setTabOrder(self.cyclopsCyclesCheckBox,self.cyclopsCycleObjsCheckBox)
        self.setTabOrder(self.cyclopsCycleObjsCheckBox,self.cyclopsSCCSCheckBox)
        self.setTabOrder(self.cyclopsSCCSCheckBox,self.cyclopsArcsCheckBox)
        self.setTabOrder(self.cyclopsArcsCheckBox,self.cyclopsIterateCheckBox)
        self.setTabOrder(self.cyclopsIterateCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.TextLabel1.setBuddy(self.cmdlineCombo)
        self.TextLabel2.setBuddy(self.workdirCombo)
        self.textLabel1.setBuddy(self.environmentCombo)
        self.modFuncLabel.setBuddy(self.modFuncCombo)
        self.textLabel1_2.setBuddy(self.covexcCombo)


    def languageChange(self):
        self.setCaption(self.__tr("Start debugging"))
        self.TextLabel1.setText(self.__tr("Command&line:"))
        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.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>"))
        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("&Environment:"))
        QToolTip.add(self.environmentCombo,self.__tr("Enter the environment variables to be set."))
        QWhatsThis.add(self.environmentCombo,self.__tr("<b>Environment</b>\n"
"<p>Enter the environment variables to be set for the program. The individual settings must be separate by whitespace and be given in the form 'var=value'.</p>\n"
"<p>Example: var1=1 var2=\"hello world\"</p>"))
        self.exceptionCheckBox.setText(self.__tr("Report &exceptions"))
        self.exceptionCheckBox.setAccel(self.__tr("Alt+E"))
        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.tracePythonCheckBox.setText(self.__tr("&Trace into interpreter libraries"))
        self.tracePythonCheckBox.setAccel(self.__tr("Alt+T"))
        QToolTip.add(self.tracePythonCheckBox,self.__tr("Select to trace into the Python library"))
        self.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(self.__tr("Alt+O"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))
        self.modFuncLabel.setText(self.__tr("&Main function:"))
        QToolTip.add(self.modFuncCombo,self.__tr("Enter the main function of the script"))
        QWhatsThis.add(self.modFuncCombo,self.__tr("<b>Main function</b>\n"
"<p>Enter the main function of the script to be run through Cyclops.</p>"))
        self.cyclopsCyclesCheckBox.setText(self.__tr("Report Cycles"))
        QToolTip.add(self.cyclopsCyclesCheckBox,self.__tr("Select to report cycles found"))
        self.cyclopsSCCSCheckBox.setText(self.__tr("Report maximal SCCs"))
        QToolTip.add(self.cyclopsSCCSCheckBox,self.__tr("Select to report maximal SCCs"))
        self.cyclopsArcsCheckBox.setText(self.__tr("Report Arc Types"))
        QToolTip.add(self.cyclopsArcsCheckBox,self.__tr("Select to report arc types"))
        self.cyclopsIterateCheckBox.setText(self.__tr("Iterate until steady state"))
        QToolTip.add(self.cyclopsIterateCheckBox,self.__tr("Select to iterate until there are no dead roots"))
        self.cyclopsCycleObjsCheckBox.setText(self.__tr("Report Objects in Cycles"))
        QToolTip.add(self.cyclopsCycleObjsCheckBox,self.__tr("Select to report objects found in cycles"))
        self.cyclopsStatsCheckBox.setText(self.__tr("Report Statistics"))
        QToolTip.add(self.cyclopsStatsCheckBox,self.__tr("Select to report cyclops statistics"))
        self.eraseCheckBox.setText(self.__tr("Erase &coverage information"))
        self.eraseCheckBox.setAccel(self.__tr("Alt+C"))
        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.textLabel1_2.setText(self.__tr("E&xclude pattern:"))
        QToolTip.add(self.covexcCombo,self.__tr("Enter a regexp pattern marking lines to exclude from coverage"))
        QWhatsThis.add(self.covexcCombo,self.__tr("<b>Exclude pattern</b>\n"
"<p>Enter a regular expression pattern. Lines matching this pattern are excluded from the coverage analysis. The default pattern is '#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]'. If the pattern is found on a line containing the colon that introduces a suite of statements, the entire suite is excluded.</p>"))


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

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

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

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