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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/UI/PyProfileForm.ui'
#
# Created: Do Dez 30 14:12:42 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 PyProfileForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

        self.resultList = QListView(self,"resultList")
        self.resultList.addColumn(self.__tr("Nr. Calls"))
        self.resultList.addColumn(self.__tr("Total Time"))
        self.resultList.addColumn(self.__tr("Tot. Time / Call"))
        self.resultList.addColumn(self.__tr("Cumulative Time"))
        self.resultList.addColumn(self.__tr("Cum. time / Call"))
        self.resultList.addColumn(self.__tr("Filename"))
        self.resultList.addColumn(self.__tr("Line"))
        self.resultList.addColumn(self.__tr("Function"))
        self.resultList.setAllColumnsShowFocus(1)
        self.resultList.setShowSortIndicator(1)
        self.resultList.setItemMargin(2)
        PyProfileFormLayout.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()))
        self.summaryList.setItemMargin(2)
        PyProfileFormLayout.addWidget(self.summaryList)

        self.checkProgress = QProgressBar(self,"checkProgress")
        PyProfileFormLayout.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)
        PyProfileFormLayout.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)
        self.connect(self.resultList,SIGNAL("contextMenuRequested(QListViewItem*,const QPoint&,int)"),self.handleContextMenu)
        self.connect(self.summaryList,SIGNAL("contextMenuRequested(QListViewItem*,const QPoint&,int)"),self.handleContextMenu)


    def languageChange(self):
        self.setCaption(self.__tr("Profile Results"))
        QWhatsThis.add(self,self.__tr("<b>Profile Results</b>\n"
"<p>This dialog shows the profile results.</p>"))
        self.resultList.header().setLabel(0,self.__tr("Nr. Calls"))
        self.resultList.header().setLabel(1,self.__tr("Total Time"))
        self.resultList.header().setLabel(2,self.__tr("Tot. Time / Call"))
        self.resultList.header().setLabel(3,self.__tr("Cumulative Time"))
        self.resultList.header().setLabel(4,self.__tr("Cum. time / Call"))
        self.resultList.header().setLabel(5,self.__tr("Filename"))
        self.resultList.header().setLabel(6,self.__tr("Line"))
        self.resultList.header().setLabel(7,self.__tr("Function"))
        QWhatsThis.add(self.resultList,self.__tr("<b>Profile Results</b>\n"
"<p>This list shows the profile results. There are several actions available via the context menu.</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 profile data. There are several actions available via the context menu.</p>"))
        QToolTip.add(self.checkProgress,self.__tr("Shows the progress of the profile data calculation"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))


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

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

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

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