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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/UI/ToolConfigurationForm.ui'
#
# Created: So Nov 27 16:12:51 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 ToolConfigurationForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

        layout3 = QGridLayout(None,1,1,0,6,"layout3")
        Spacer3 = QSpacerItem(20,20,QSizePolicy.Minimum,QSizePolicy.Expanding)
        layout3.addItem(Spacer3,6,3)

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

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

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

        layout3.addMultiCellWidget(self.redirectCheckBox,10,10,0,1)

        self.downButton = QPushButton(self,"downButton")
        self.downButton.setEnabled(0)

        layout3.addWidget(self.downButton,5,3)

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

        layout3.addWidget(self.addButton,1,3)

        self.toolsListBox = QListBox(self,"toolsListBox")

        layout3.addMultiCellWidget(self.toolsListBox,0,6,0,2)

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

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

        self.menuEdit = QLineEdit(self,"menuEdit")

        layout3.addWidget(self.menuEdit,8,1)

        self.deleteButton = QPushButton(self,"deleteButton")
        self.deleteButton.setEnabled(0)

        layout3.addWidget(self.deleteButton,3,3)

        self.executableButton = QPushButton(self,"executableButton")
        self.executableButton.setFocusPolicy(QPushButton.NoFocus)

        layout3.addWidget(self.executableButton,7,2)

        self.argumentsEdit = QLineEdit(self,"argumentsEdit")

        layout3.addWidget(self.argumentsEdit,9,1)

        self.changeButton = QPushButton(self,"changeButton")
        self.changeButton.setEnabled(0)

        layout3.addWidget(self.changeButton,2,3)

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

        layout3.addWidget(self.TextLabel3,9,0)

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

        layout3.addWidget(self.newButton,0,3)

        self.executableEdit = QLineEdit(self,"executableEdit")

        layout3.addWidget(self.executableEdit,7,1)

        self.upButton = QPushButton(self,"upButton")
        self.upButton.setEnabled(0)

        layout3.addWidget(self.upButton,4,3)
        ToolConfigurationFormLayout.addLayout(layout3)

        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)
        ToolConfigurationFormLayout.addLayout(Layout1)

        self.languageChange()

        self.resize(QSize(475,391).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
        self.connect(self.addButton,SIGNAL("clicked()"),self.handleAdd)
        self.connect(self.deleteButton,SIGNAL("clicked()"),self.handleDelete)
        self.connect(self.upButton,SIGNAL("clicked()"),self.handleUp)
        self.connect(self.downButton,SIGNAL("clicked()"),self.handleDown)
        self.connect(self.executableButton,SIGNAL("clicked()"),self.handleExeSelect)
        self.connect(self.toolsListBox,SIGNAL("highlighted(int)"),self.handleToolEntrySelected)
        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.changeButton,SIGNAL("clicked()"),self.handleChange)
        self.connect(self.newButton,SIGNAL("clicked()"),self.handleNew)

        self.setTabOrder(self.toolsListBox,self.executableEdit)
        self.setTabOrder(self.executableEdit,self.menuEdit)
        self.setTabOrder(self.menuEdit,self.argumentsEdit)
        self.setTabOrder(self.argumentsEdit,self.redirectCheckBox)
        self.setTabOrder(self.redirectCheckBox,self.newButton)
        self.setTabOrder(self.newButton,self.addButton)
        self.setTabOrder(self.addButton,self.changeButton)
        self.setTabOrder(self.changeButton,self.deleteButton)
        self.setTabOrder(self.deleteButton,self.upButton)
        self.setTabOrder(self.upButton,self.downButton)
        self.setTabOrder(self.downButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)
        self.setTabOrder(self.cancelButton,self.executableButton)

        self.TextLabel1.setBuddy(self.executableEdit)
        self.TextLabel2.setBuddy(self.menuEdit)
        self.TextLabel3.setBuddy(self.argumentsEdit)


    def languageChange(self):
        self.setCaption(self.__tr("Configure Tools Menu"))
        self.TextLabel1.setText(self.__tr("&Executable file:"))
        self.redirectCheckBox.setText(self.__tr("&Redirect output"))
        self.redirectCheckBox.setAccel(self.__tr("Alt+R"))
        QToolTip.add(self.redirectCheckBox,self.__tr("Select whether the output of the tool should be redirected"))
        QWhatsThis.add(self.redirectCheckBox,self.__tr("<b>Redirect output</b>\n"
"<p>Select whether the output of the tool should be redirected to our StdOut and StdErr windows.</p>"))
        self.downButton.setText(self.__tr("Do&wn"))
        self.downButton.setAccel(self.__tr("Alt+W"))
        QToolTip.add(self.downButton,self.__tr("Move down"))
        QWhatsThis.add(self.downButton,self.__tr("<b>Move Down</b>\n"
"<p>Move the selected entry down.</p>"))
        self.addButton.setText(self.__tr("&Add"))
        self.addButton.setAccel(self.__tr("Alt+A"))
        QToolTip.add(self.addButton,self.__tr("Add a new tools entry"))
        QWhatsThis.add(self.addButton,self.__tr("<b>Add</b>\n"
"<p>Add a new tools entry with the values entered below.</p>"))
        self.TextLabel2.setText(self.__tr("&Menu text:"))
        QToolTip.add(self.menuEdit,self.__tr("Enter the menu text"))
        QWhatsThis.add(self.menuEdit,self.__tr("<b>Menu text</b>\n"
"<p>Enter the menu text. Precede the accelerator key with an & character.</p>"))
        self.deleteButton.setText(self.__tr("&Delete"))
        self.deleteButton.setAccel(self.__tr("Alt+D"))
        QToolTip.add(self.deleteButton,self.__tr("Delete the selected entry"))
        QWhatsThis.add(self.deleteButton,self.__tr("<b>Delete</b>\n"
"<p>Delete the selected entry.</p>"))
        self.executableButton.setText(self.__tr("..."))
        QToolTip.add(self.executableButton,self.__tr("Select the executable via a file selection dialog"))
        QWhatsThis.add(self.executableButton,self.__tr("<b>Executable</b>\n"
"<p>Select the executable via a file selection dialog.</p>"))
        QToolTip.add(self.argumentsEdit,self.__tr("Enter the arguments for the executable"))
        QWhatsThis.add(self.argumentsEdit,self.__tr("<b>Arguments</b>\n"
"<p>Enter the arguments for the executable.</p>"))
        self.changeButton.setText(self.__tr("C&hange"))
        self.changeButton.setAccel(self.__tr("Alt+H"))
        QToolTip.add(self.changeButton,self.__tr("Change the values of the selected entry"))
        QWhatsThis.add(self.changeButton,self.__tr("<b>Change</b>\n"
"<p>Change the values of the selected entry.</p>"))
        self.TextLabel3.setText(self.__tr("Ar&guments:"))
        self.newButton.setText(self.__tr("&New"))
        self.newButton.setAccel(self.__tr("Alt+N"))
        QToolTip.add(self.newButton,self.__tr("Clear all entry fields"))
        QWhatsThis.add(self.newButton,self.__tr("<b>New</b>\n"
"<p>Clear all entry fields for entering a new tools entry.</p>"))
        QToolTip.add(self.executableEdit,self.__tr("Enter the filename of the executable"))
        QWhatsThis.add(self.executableEdit,self.__tr("<b>Executable</b>\n"
"<p>Enter the filename of the executable.</p>"))
        self.upButton.setText(self.__tr("&Up"))
        self.upButton.setAccel(self.__tr("Alt+U"))
        QToolTip.add(self.upButton,self.__tr("Move up"))
        QWhatsThis.add(self.upButton,self.__tr("<b>Move Up</b>\n"
"<p>Move the selected entry up.</p>"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


    def handleAdd(self):
        print "ToolConfigurationForm.handleAdd(): Not implemented yet"

    def handleDelete(self):
        print "ToolConfigurationForm.handleDelete(): Not implemented yet"

    def handleDown(self):
        print "ToolConfigurationForm.handleDown(): Not implemented yet"

    def handleExeSelect(self):
        print "ToolConfigurationForm.handleExeSelect(): Not implemented yet"

    def handleToolEntrySelected(self,a0):
        print "ToolConfigurationForm.handleToolEntrySelected(int): Not implemented yet"

    def handleUp(self):
        print "ToolConfigurationForm.handleUp(): Not implemented yet"

    def handleChange(self):
        print "ToolConfigurationForm.handleChange(): Not implemented yet"

    def handleNew(self):
        print "ToolConfigurationForm.handleNew(): Not implemented yet"

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

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