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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/Project/DebuggerPropertiesForm.ui'
#
# Created: Sa Jul 8 22:18:45 2006
#      by: The PyQt User Interface Compiler (pyuic) 3-snapshot-20060703
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

        self.debugClientGroup = QButtonGroup(self,"debugClientGroup")
        self.debugClientGroup.setColumnLayout(0,Qt.Vertical)
        self.debugClientGroup.layout().setSpacing(6)
        self.debugClientGroup.layout().setMargin(6)
        debugClientGroupLayout = QHBoxLayout(self.debugClientGroup.layout())
        debugClientGroupLayout.setAlignment(Qt.AlignTop)

        self.debugClientEdit = QLineEdit(self.debugClientGroup,"debugClientEdit")
        debugClientGroupLayout.addWidget(self.debugClientEdit)

        self.debugClientButton = QPushButton(self.debugClientGroup,"debugClientButton")
        debugClientGroupLayout.addWidget(self.debugClientButton)
        DebuggerPropertiesFormLayout.addWidget(self.debugClientGroup)

        self.interpreterGroup = QGroupBox(self,"interpreterGroup")
        self.interpreterGroup.setColumnLayout(0,Qt.Vertical)
        self.interpreterGroup.layout().setSpacing(6)
        self.interpreterGroup.layout().setMargin(6)
        interpreterGroupLayout = QGridLayout(self.interpreterGroup.layout())
        interpreterGroupLayout.setAlignment(Qt.AlignTop)

        self.interpreterButton = QPushButton(self.interpreterGroup,"interpreterButton")

        interpreterGroupLayout.addWidget(self.interpreterButton,1,1)

        self.interpreterEdit = QLineEdit(self.interpreterGroup,"interpreterEdit")

        interpreterGroupLayout.addWidget(self.interpreterEdit,1,0)
        DebuggerPropertiesFormLayout.addWidget(self.interpreterGroup)

        self.debugEnvironmentGroup = QGroupBox(self,"debugEnvironmentGroup")
        self.debugEnvironmentGroup.setColumnLayout(0,Qt.Vertical)
        self.debugEnvironmentGroup.layout().setSpacing(6)
        self.debugEnvironmentGroup.layout().setMargin(6)
        debugEnvironmentGroupLayout = QGridLayout(self.debugEnvironmentGroup.layout())
        debugEnvironmentGroupLayout.setAlignment(Qt.AlignTop)

        self.textLabel1_16 = QLabel(self.debugEnvironmentGroup,"textLabel1_16")

        debugEnvironmentGroupLayout.addWidget(self.textLabel1_16,1,0)

        self.debugEnvironmentEdit = QLineEdit(self.debugEnvironmentGroup,"debugEnvironmentEdit")

        debugEnvironmentGroupLayout.addWidget(self.debugEnvironmentEdit,1,1)

        self.debugEnvironmentOverrideCheckBox = QCheckBox(self.debugEnvironmentGroup,"debugEnvironmentOverrideCheckBox")

        debugEnvironmentGroupLayout.addMultiCellWidget(self.debugEnvironmentOverrideCheckBox,0,0,0,1)
        DebuggerPropertiesFormLayout.addWidget(self.debugEnvironmentGroup)

        self.remoteDebuggerGroup = QGroupBox(self,"remoteDebuggerGroup")
        self.remoteDebuggerGroup.setCheckable(1)
        self.remoteDebuggerGroup.setChecked(0)
        self.remoteDebuggerGroup.setColumnLayout(0,Qt.Vertical)
        self.remoteDebuggerGroup.layout().setSpacing(6)
        self.remoteDebuggerGroup.layout().setMargin(6)
        remoteDebuggerGroupLayout = QGridLayout(self.remoteDebuggerGroup.layout())
        remoteDebuggerGroupLayout.setAlignment(Qt.AlignTop)

        self.execLabel = QLabel(self.remoteDebuggerGroup,"execLabel")

        remoteDebuggerGroupLayout.addWidget(self.execLabel,1,0)

        self.hostLabel = QLabel(self.remoteDebuggerGroup,"hostLabel")

        remoteDebuggerGroupLayout.addWidget(self.hostLabel,0,0)

        self.remoteHostEdit = QLineEdit(self.remoteDebuggerGroup,"remoteHostEdit")

        remoteDebuggerGroupLayout.addWidget(self.remoteHostEdit,0,1)

        self.remoteCommandEdit = QLineEdit(self.remoteDebuggerGroup,"remoteCommandEdit")

        remoteDebuggerGroupLayout.addWidget(self.remoteCommandEdit,1,1)

        self.pathTranslationGroup = QGroupBox(self.remoteDebuggerGroup,"pathTranslationGroup")
        self.pathTranslationGroup.setCheckable(1)
        self.pathTranslationGroup.setChecked(0)
        self.pathTranslationGroup.setColumnLayout(0,Qt.Vertical)
        self.pathTranslationGroup.layout().setSpacing(6)
        self.pathTranslationGroup.layout().setMargin(6)
        pathTranslationGroupLayout = QGridLayout(self.pathTranslationGroup.layout())
        pathTranslationGroupLayout.setAlignment(Qt.AlignTop)

        self.textLabel2_9 = QLabel(self.pathTranslationGroup,"textLabel2_9")

        pathTranslationGroupLayout.addWidget(self.textLabel2_9,1,0)

        self.textLabel1_18 = QLabel(self.pathTranslationGroup,"textLabel1_18")

        pathTranslationGroupLayout.addWidget(self.textLabel1_18,0,0)

        self.translationLocalEdit = QLineEdit(self.pathTranslationGroup,"translationLocalEdit")

        pathTranslationGroupLayout.addWidget(self.translationLocalEdit,1,1)

        self.translationRemoteEdit = QLineEdit(self.pathTranslationGroup,"translationRemoteEdit")

        pathTranslationGroupLayout.addWidget(self.translationRemoteEdit,0,1)

        remoteDebuggerGroupLayout.addMultiCellWidget(self.pathTranslationGroup,2,2,0,1)
        DebuggerPropertiesFormLayout.addWidget(self.remoteDebuggerGroup)

        self.consoleDebuggerGroup = QGroupBox(self,"consoleDebuggerGroup")
        self.consoleDebuggerGroup.setCheckable(1)
        self.consoleDebuggerGroup.setChecked(0)
        self.consoleDebuggerGroup.setColumnLayout(0,Qt.Vertical)
        self.consoleDebuggerGroup.layout().setSpacing(6)
        self.consoleDebuggerGroup.layout().setMargin(6)
        consoleDebuggerGroupLayout = QGridLayout(self.consoleDebuggerGroup.layout())
        consoleDebuggerGroupLayout.setAlignment(Qt.AlignTop)

        self.textLabel1_17 = QLabel(self.consoleDebuggerGroup,"textLabel1_17")

        consoleDebuggerGroupLayout.addWidget(self.textLabel1_17,1,0)

        self.consoleCommandEdit = QLineEdit(self.consoleDebuggerGroup,"consoleCommandEdit")

        consoleDebuggerGroupLayout.addWidget(self.consoleCommandEdit,1,1)
        DebuggerPropertiesFormLayout.addWidget(self.consoleDebuggerGroup)

        self.redirectCheckBox = QCheckBox(self,"redirectCheckBox")
        DebuggerPropertiesFormLayout.addWidget(self.redirectCheckBox)

        self.noEncodingCheckBox = QCheckBox(self,"noEncodingCheckBox")
        DebuggerPropertiesFormLayout.addWidget(self.noEncodingCheckBox)

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

        self.okButton = QPushButton(self,"okButton")
        layout29.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        layout29.addWidget(self.cancelButton)
        spacer54 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout29.addItem(spacer54)
        DebuggerPropertiesFormLayout.addLayout(layout29)

        self.languageChange()

        self.resize(QSize(592,491).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.interpreterButton,SIGNAL("clicked()"),self.selectInterpreter)
        self.connect(self.debugClientButton,SIGNAL("clicked()"),self.selectDebugClient)

        self.setTabOrder(self.debugClientEdit,self.debugClientButton)
        self.setTabOrder(self.debugClientButton,self.interpreterEdit)
        self.setTabOrder(self.interpreterEdit,self.interpreterButton)
        self.setTabOrder(self.interpreterButton,self.debugEnvironmentOverrideCheckBox)
        self.setTabOrder(self.debugEnvironmentOverrideCheckBox,self.debugEnvironmentEdit)
        self.setTabOrder(self.debugEnvironmentEdit,self.remoteHostEdit)
        self.setTabOrder(self.remoteHostEdit,self.remoteCommandEdit)
        self.setTabOrder(self.remoteCommandEdit,self.translationRemoteEdit)
        self.setTabOrder(self.translationRemoteEdit,self.translationLocalEdit)
        self.setTabOrder(self.translationLocalEdit,self.consoleCommandEdit)
        self.setTabOrder(self.consoleCommandEdit,self.redirectCheckBox)
        self.setTabOrder(self.redirectCheckBox,self.noEncodingCheckBox)
        self.setTabOrder(self.noEncodingCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)
        self.setTabOrder(self.cancelButton,self.debugEnvironmentGroup)
        self.setTabOrder(self.debugEnvironmentGroup,self.remoteDebuggerGroup)
        self.setTabOrder(self.remoteDebuggerGroup,self.pathTranslationGroup)
        self.setTabOrder(self.pathTranslationGroup,self.consoleDebuggerGroup)


    def languageChange(self):
        self.setCaption(self.__tr("Debugger Properties"))
        self.debugClientGroup.setTitle(self.__tr("Debug Client"))
        QToolTip.add(self.debugClientEdit,self.__tr("Enter the path of the Debug Client to be used.  Leave empty to use the default."))
        self.debugClientButton.setText(self.__tr("..."))
        QToolTip.add(self.debugClientButton,self.__tr("Press to select the Debug Client via a file selection dialog"))
        self.interpreterGroup.setTitle(self.__tr("Interpreter for Debug Client"))
        self.interpreterButton.setText(self.__tr("..."))
        QToolTip.add(self.interpreterButton,self.__tr("Press to select the interpreter via a file selection dialog"))
        QToolTip.add(self.interpreterEdit,self.__tr("Enter the path of the interpreter to be used by the debug client."))
        self.debugEnvironmentGroup.setTitle(self.__tr("Environment for Debug Client"))
        self.textLabel1_16.setText(self.__tr("Environment:"))
        QToolTip.add(self.debugEnvironmentEdit,self.__tr("Enter the environment variables to be set."))
        QWhatsThis.add(self.debugEnvironmentEdit,self.__tr("<b>Environment</b>\n"
"<p>Enter the environment variables to be set for the debugger. 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.debugEnvironmentOverrideCheckBox.setText(self.__tr("Replace Environment"))
        QToolTip.add(self.debugEnvironmentOverrideCheckBox,self.__tr("Select, if the environment of the debug client should be replaced"))
        self.remoteDebuggerGroup.setTitle(self.__tr("Remote Debugger"))
        QToolTip.add(self.remoteDebuggerGroup,self.__tr("Select, if the debugger should be run remotely"))
        self.execLabel.setText(self.__tr("Remote Execution:"))
        self.hostLabel.setText(self.__tr("Remote Host:"))
        QToolTip.add(self.remoteHostEdit,self.__tr("Enter the hostname of the remote machine."))
        QWhatsThis.add(self.remoteHostEdit,self.__tr("<b>Remote Host</b>\n"
"<p>Enter the hostname of the remote machine.</p>"))
        QToolTip.add(self.remoteCommandEdit,self.__tr("Enter the remote execution command."))
        QWhatsThis.add(self.remoteCommandEdit,self.__tr("<b>Remote Execution</b>\n"
"<p>Enter the remote execution command (e.g. ssh). This command is used to log into the remote host and execute the remote debugger.</p>"))
        self.pathTranslationGroup.setTitle(self.__tr("Perform Path Translation"))
        QToolTip.add(self.pathTranslationGroup,self.__tr("Select, if path translation for remote debugging should be done"))
        self.textLabel2_9.setText(self.__tr("Local Path:"))
        self.textLabel1_18.setText(self.__tr("Remote Path:"))
        QToolTip.add(self.translationLocalEdit,self.__tr("Enter the local path"))
        QToolTip.add(self.translationRemoteEdit,self.__tr("Enter the remote path"))
        self.consoleDebuggerGroup.setTitle(self.__tr("Console Debugger"))
        QToolTip.add(self.consoleDebuggerGroup,self.__tr("Select, if the debugger should be executed in a console window"))
        self.textLabel1_17.setText(self.__tr("Console Command:"))
        QToolTip.add(self.consoleCommandEdit,self.__tr("Enter the console command (e.g. xterm -e)"))
        QWhatsThis.add(self.consoleCommandEdit,self.__tr("<b>Console Command</b>\n"
"<p>Enter the console command (e.g. xterm -e). This command is used to open a command window for the debugger.</p>"))
        self.redirectCheckBox.setText(self.__tr("Redirect stdin/stdout/stderr"))
        QToolTip.add(self.redirectCheckBox,self.__tr("Select to redirect stdin, stdout and stderr of the program being debugged to the eric3 IDE"))
        self.noEncodingCheckBox.setText(self.__tr("Don't set the encoding for the debug client"))
        QToolTip.add(self.noEncodingCheckBox,self.__tr("Select to not set the debug client encoding."))
        self.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(QKeySequence(self.__tr("Alt+O")))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(QKeySequence(self.__tr("Alt+C")))


    def selectInterpreter(self):
        print "DebuggerPropertiesForm.selectInterpreter(): Not implemented yet"

    def selectDebugClient(self):
        print "DebuggerPropertiesForm.selectDebugClient(): Not implemented yet"

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

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