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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/UI/PyCoverageForm.ui'
#
# Created: Do Dez 30 14:12:41 2004
#      by: The PyQt User Interface Compiler (pyuic) snapshot-20041229
#
# 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")

        layout3 = QHBoxLayout(None,0,6,"layout3")

        self.textLabel1_2 = QLabel(self,"textLabel1_2")
        layout3.addWidget(self.textLabel1_2)

        self.excludeCombo = QComboBox(0,self,"excludeCombo")
        self.excludeCombo.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.excludeCombo.sizePolicy().hasHeightForWidth()))
        self.excludeCombo.setEditable(1)
        self.excludeCombo.setInsertionPolicy(QComboBox.AtTop)
        self.excludeCombo.setAutoCompletion(1)
        self.excludeCombo.setDuplicatesEnabled(0)
        layout3.addWidget(self.excludeCombo)

        self.reloadButton = QPushButton(self,"reloadButton")
        layout3.addWidget(self.reloadButton)
        PyCoverageFormLayout.addLayout(layout3)

        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("Excluded"))
        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(QSizePolicy.Expanding,QSizePolicy.Preferred,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")
        spacer3 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(spacer3)

        self.cancelButton = QPushButton(self,"cancelButton")
        self.cancelButton.setDefault(1)
        layout2.addWidget(self.cancelButton)
        spacer4 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(spacer4)
        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)
        self.connect(self.reloadButton,SIGNAL("clicked()"),self.handleReload)

        self.textLabel1_2.setBuddy(self.excludeCombo)


    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.textLabel1_2.setText(self.__tr("E&xclude pattern:"))
        QToolTip.add(self.excludeCombo,self.__tr("Enter a regexp pattern marking lines to exclude from coverage"))
        QWhatsThis.add(self.excludeCombo,self.__tr("<b>Exclude pattern</b>\n"
"<p>Enter a regular expression pattern. Lines matching this pattern are excluded from the coverage analysis. The default pattern is '#pragma[: ]+[nN][oO] [cC][oO][vV][eE][rR]'. If the pattern is found on a line containing the colon that introduces a suite of statements, the entire suite is excluded.</p>"))
        self.reloadButton.setText(self.__tr("&Reload"))
        self.reloadButton.setAccel(self.__tr("Alt+R"))
        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("Excluded"))
        self.resultList.header().setLabel(5,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"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))


    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"

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

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

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