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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/UI/ToolConfigurationForm.ui'
#
# Created: Mon Jan 20 20:45:02 2003
#      by: The PyQt User Interface Compiler (pyuic)
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *

image0_data = [
"16 16 8 1",
". c None",
"# c #000000",
"f c #004040",
"d c #008080",
"c c #00c0c0",
"e c #00ffff",
"b c #c0ffff",
"a c #ffffff",
"................",
"....#######.....",
"....#aabbc#.....",
"....#acccd#.....",
"....#acccd#.....",
"....#bcccd#.....",
"#####ecccd#####.",
"#becccccccccdf#.",
".#becccccccdf#..",
"..#becccccdf#...",
"...#becccdf#....",
"....#becdf#.....",
".....#bdf#......",
"......#f#.......",
".......#........",
"................"
]
image1_data = [
"16 16 8 1",
". c None",
"# c #000000",
"d c #004040",
"f c #008080",
"e c #00c0c0",
"c c #00ffff",
"a c #c0ffff",
"b c #ffffff",
"................",
".......#........",
"......#a#.......",
".....#bcd#......",
"....#bcefd#.....",
"...#bceeefd#....",
"..#bceeeeefd#...",
".#bceeeeeeefd#..",
"#aceeeeeeeeefd#.",
"#####ceeef#####.",
"....#aeeef#.....",
"....#aeeef#.....",
"....#aeeef#.....",
"....#cffff#.....",
"....#######.....",
"................"
]

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

        image0 = QPixmap(image0_data)
        image1 = QPixmap(image1_data)

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


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

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

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

        Layout3.addWidget(self.addButton,0,3)

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

        Layout3.addWidget(self.deleteButton,2,3)

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

        Layout3.addWidget(self.changeButton,1,3)

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

        Layout3.addWidget(self.argumentsEdit,8,1)

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

        Layout3.addWidget(self.downButton,4,3)

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

        Layout3.addWidget(self.TextLabel2,7,0)

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

        Layout3.addMultiCellWidget(self.toolsListBox,0,5,0,2)

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

        Layout3.addWidget(self.menuEdit,7,1)

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

        Layout3.addWidget(self.executableButton,6,2)

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

        Layout3.addWidget(self.TextLabel3,8,0)

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

        Layout3.addMultiCellWidget(self.redirectCheckBox,9,9,0,1)

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

        Layout3.addWidget(self.upButton,3,3)

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

        Layout3.addWidget(self.executableEdit,6,1)
        spacer = QSpacerItem(0,40,QSizePolicy.Minimum,QSizePolicy.Expanding)
        Layout3.addItem(spacer,5,3)

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

        Layout3.addWidget(self.TextLabel1,6,0)
        ToolConfigurationFormLayout.addLayout(Layout3)

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

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

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

        self.languageChange()

        self.resize(QSize(475,391).expandedTo(self.minimumSizeHint()))

        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("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,SLOT("accept()"))
        self.connect(self.changeButton,SIGNAL("clicked()"),self.handleChange)

        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.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.TextLabel2.setBuddy(self.menuEdit)
        self.TextLabel3.setBuddy(self.argumentsEdit)
        self.TextLabel1.setBuddy(self.executableEdit)

    def languageChange(self):
        self.setCaption(self.tr("Configure Tools Menu"))
        self.addButton.setText(self.tr("&Add"))
        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.deleteButton.setText(self.tr("&Delete"))
        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.changeButton.setText(self.tr("C&hange"))
        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>"))
        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.downButton.setText(QString.null)
        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.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.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>"))
        self.TextLabel3.setText(self.tr("Ar&guments:"))
        self.redirectCheckBox.setText(self.tr("&Redirect output"))
        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.upButton.setText(QString.null)
        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>"))
        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.TextLabel1.setText(self.tr("&Executable file:"))
        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"


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