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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/UI/CodeMetricsForm.ui'
#
# Created: So Nov 27 16:13:01 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 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(QSizePolicy.Expanding,QSizePolicy.Preferred,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")
        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)
        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"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))


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

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

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