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

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

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

        self.setSizeGripEnabled(1)

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

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

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

        Layout7.addMultiCellWidget(self.exceptionListBox,0,0,0,2)

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

        Layout7.addWidget(self.exceptionEdit,1,2)

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

        Layout7.addWidget(self.addButton,1,1)

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

        Layout7.addWidget(self.deleteButton,1,0)
        ExceptionsFilterFormLayout.addLayout(Layout7)

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

        self.languageChange()

        self.resize(QSize(464,306).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.deleteButton,SIGNAL("clicked()"),self.handleDelete)
        self.connect(self.addButton,SIGNAL("clicked()"),self.handleAdd)
        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
        self.connect(self.exceptionEdit,SIGNAL("textChanged(const QString&)"),self.handleTextChanged)


    def languageChange(self):
        self.setCaption(self.__tr("Exception Filter"))
        QWhatsThis.add(self,self.__tr("<b>Exception Filter</b>\n"
"<p>This dialog is used to enter the exception types, that shall be highlighted during a debugging session. If this list is empty, all exception types will be highlighted. If the exception reporting flag in the \"Start Debugging\" dialog is unchecked, no exception will be reported at all.</p>\n"
"<p>Please note, that unhandled exceptions are always highlighted independent of these settings.</p>"))
        QToolTip.add(self.exceptionListBox,self.__tr("List of exceptions that shall be highlighted"))
        QToolTip.add(self.exceptionEdit,self.__tr("Enter an exception type that shall be highlighted"))
        self.addButton.setText(self.__tr("Add"))
        QToolTip.add(self.addButton,self.__tr("Press to add the entered exception to the list"))
        self.deleteButton.setText(self.__tr("Delete"))
        QToolTip.add(self.deleteButton,self.__tr("Press to delete the selcted exception from the list"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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

    def handleTextChanged(self,a0):
        print "ExceptionsFilterForm.handleTextChanged(const QString&): Not implemented yet"

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

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