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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/Checks/CodeMetricsForm.ui'
#
# Created: Sam Mai 3 12:57:21 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 CodeMetricsForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

        self.resultList = QListView(self,"resultList")
        self.resultList.addColumn(self.tr("Name"))
        self.resultList.addColumn(self.tr("Start"))
        self.resultList.addColumn(self.tr("End"))
        self.resultList.addColumn(self.tr("Lines"))
        self.resultList.addColumn(self.tr("Lines of code"))
        self.resultList.addColumn(self.tr("Comments"))
        self.resultList.addColumn(self.tr("Empty"))
        self.resultList.setAllColumnsShowFocus(1)
        self.resultList.setRootIsDecorated(1)
        CodeMetricsFormLayout.addWidget(self.resultList)

        self.summaryList = QListView(self,"summaryList")
        self.summaryList.addColumn(self.tr("Summary"))
        self.summaryList.addColumn(self.tr("#"))
        self.summaryList.setSizePolicy(QSizePolicy(7,5,0,0,self.summaryList.sizePolicy().hasHeightForWidth()))
        CodeMetricsFormLayout.addWidget(self.summaryList)

        self.checkProgress = QProgressBar(self,"checkProgress")
        CodeMetricsFormLayout.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)
        CodeMetricsFormLayout.addLayout(layout2)

        self.languageChange()

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

        self.connect(self.cancelButton,SIGNAL("clicked()"),self.buttonPressed)


    def languageChange(self):
        self.setCaption(self.tr("Code Metrics"))
        QWhatsThis.add(self,self.tr("<b>Code Metrics</b>\n"
"<p>This dialog shows some code metrics.</p>"))
        self.resultList.header().setLabel(0,self.tr("Name"))
        self.resultList.header().setLabel(1,self.tr("Start"))
        self.resultList.header().setLabel(2,self.tr("End"))
        self.resultList.header().setLabel(3,self.tr("Lines"))
        self.resultList.header().setLabel(4,self.tr("Lines of code"))
        self.resultList.header().setLabel(5,self.tr("Comments"))
        self.resultList.header().setLabel(6,self.tr("Empty"))
        QWhatsThis.add(self.resultList,self.tr("<b>Code metrics</b>\n"
"<p>This list shows some code metrics.</p>"))
        self.summaryList.header().setLabel(0,self.tr("Summary"))
        self.summaryList.header().setLabel(1,self.tr("#"))
        QWhatsThis.add(self.summaryList,self.tr("<b>Summary</b>\n"
"<p>This shows some overall code metrics.</p>"))
        QToolTip.add(self.checkProgress,self.tr("Shows the progress of the code metrics action"))
        self.cancelButton.setText(self.tr("&Cancel"))


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

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