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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/UI/PyCoverageForm.ui'
#
# Created: Son Mai 11 14:02:08 2003
#      by: The PyQt User Interface Compiler (pyuic) 3.6
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

        self.resultList = QListView(self,"resultList")
        self.resultList.addColumn(self.tr("Name"))
        self.resultList.addColumn(self.tr("Statements"))
        self.resultList.addColumn(self.tr("Executed"))
        self.resultList.addColumn(self.tr("Coverage"))
        self.resultList.addColumn(self.tr("Missing"))
        self.resultList.setAllColumnsShowFocus(1)
        self.resultList.setItemMargin(2)
        PyCoverageFormLayout.addWidget(self.resultList)

        self.textLabel1 = QLabel(self,"textLabel1")
        PyCoverageFormLayout.addWidget(self.textLabel1)

        self.summaryList = QListView(self,"summaryList")
        self.summaryList.addColumn(self.tr("Statements"))
        self.summaryList.addColumn(self.tr("Executed"))
        self.summaryList.addColumn(self.tr("Coverage"))
        self.summaryList.setSizePolicy(QSizePolicy(7,5,0,0,self.summaryList.sizePolicy().hasHeightForWidth()))
        self.summaryList.setMaximumSize(QSize(32767,50))
        self.summaryList.setItemMargin(2)
        PyCoverageFormLayout.addWidget(self.summaryList)

        self.checkProgress = QProgressBar(self,"checkProgress")
        PyCoverageFormLayout.addWidget(self.checkProgress)

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

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

        self.languageChange()

        self.resize(QSize(832,585).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.cancelButton,SIGNAL("clicked()"),self.buttonPressed)
        self.connect(self.resultList,SIGNAL("contextMenuRequested(QListViewItem*,const QPoint&,int)"),self.handleContextMenu)


    def languageChange(self):
        self.setCaption(self.tr("Python Code Coverage"))
        QWhatsThis.add(self,self.tr("<b>Python Code Coverage</b>\n"
"<p>This dialog shows the collected code coverage data.</p>"))
        self.resultList.header().setLabel(0,self.tr("Name"))
        self.resultList.header().setLabel(1,self.tr("Statements"))
        self.resultList.header().setLabel(2,self.tr("Executed"))
        self.resultList.header().setLabel(3,self.tr("Coverage"))
        self.resultList.header().setLabel(4,self.tr("Missing"))
        QWhatsThis.add(self.resultList,self.tr("<b>Python Code Coverage</b>\n"
"<p>This list shows the collected code coverage data. There are several actions available via the context menu.</p>"))
        self.textLabel1.setText(self.tr("Summary"))
        self.summaryList.header().setLabel(0,self.tr("Statements"))
        self.summaryList.header().setLabel(1,self.tr("Executed"))
        self.summaryList.header().setLabel(2,self.tr("Coverage"))
        QWhatsThis.add(self.summaryList,self.tr("<b>Summary</b>\n"
"<p>This shows some overall code coverage information.</p>"))
        QToolTip.add(self.checkProgress,self.tr("Shows the progress of the code coverage action"))
        self.cancelButton.setText(self.tr("&Cancel"))


    def buttonPressed(self):
        print "PyCoverageForm.buttonPressed(): Not implemented yet"

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

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