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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/Debugger/BreakpointForm.ui'
#
# Created: Sam Jul 19 13:09:19 2003
#      by: The PyQt User Interface Compiler (pyuic) 3.7
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

        self.bpListview = QListView(self,"bpListview")
        self.bpListview.setSelectionMode(QListView.Extended)
        BreakpointFormLayout.addWidget(self.bpListview)

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

        self.closeButton = QPushButton(self,"closeButton")
        self.closeButton.setDefault(1)
        layout2.addWidget(self.closeButton)

        self.deleteAllButton = QPushButton(self,"deleteAllButton")
        layout2.addWidget(self.deleteAllButton)

        self.deleteSelButton = QPushButton(self,"deleteSelButton")
        layout2.addWidget(self.deleteSelButton)
        spacer_2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(spacer_2)
        BreakpointFormLayout.addLayout(layout2)

        self.languageChange()

        self.resize(QSize(600,480).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.closeButton,SIGNAL("clicked()"),self,SLOT("accept()"))
        self.connect(self.deleteAllButton,SIGNAL("clicked()"),self.handleDeleteAll)
        self.connect(self.deleteSelButton,SIGNAL("clicked()"),self.handleDeleteSelected)
        self.connect(self.bpListview,SIGNAL("contextMenuRequested(QListViewItem*,const QPoint&,int)"),self.handleListContextmenu)


    def languageChange(self):
        self.setCaption(self.__tr("Breakpoint Dialog"))
        QToolTip.add(self.bpListview,self.__tr("List of breakpoints"))
        QWhatsThis.add(self.bpListview,self.__tr("<b>List of Breakpoints</b>\n"
"<p>This list shows all breakpoints or the breakpoints of the current\n"
"file. The selected breakpoints can be delete with the button\n"
"&quot;Delete Selected&quot;, all breakpoints are deleted with the\n"
"button &quot;Delete All&quot;. Using the context menu it is possible\n"
"to delete a single breakpoint or to change its condition.</p>"))
        self.closeButton.setText(self.__tr("&Close"))
        QToolTip.add(self.closeButton,self.__tr("Close this window"))
        QWhatsThis.add(self.closeButton,self.__tr("Press this button in order to close the window."))
        self.deleteAllButton.setText(self.__tr("Delete &All"))
        QToolTip.add(self.deleteAllButton,self.__tr("Delete all breakpoints"))
        QWhatsThis.add(self.deleteAllButton,self.__tr("Delete all breakpoint that are displayed in the listview."))
        self.deleteSelButton.setText(self.__tr("Delete &Selected"))
        QToolTip.add(self.deleteSelButton,self.__tr("Delete selected breakpoints"))
        QWhatsThis.add(self.deleteSelButton,self.__tr("Delete the selected breakpoints of the listview."))


    def handleDeleteAll(self):
        print "BreakpointForm.handleDeleteAll(): Not implemented yet"

    def handleDeleteSelected(self):
        print "BreakpointForm.handleDeleteSelected(): Not implemented yet"

    def handleListContextmenu(self,a0,a1,a2):
        print "BreakpointForm.handleListContextmenu(QListViewItem*,const QPoint&,int): Not implemented yet"

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

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