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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/Checks/PyLintExecForm.ui'
#
# Created: So Sep 25 18:07:02 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 PyLintExecForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

        self.contentsLabel = QLabel(self,"contentsLabel")
        PyLintExecFormLayout.addWidget(self.contentsLabel)

        self.contents = QTextBrowser(self,"contents")
        PyLintExecFormLayout.addWidget(self.contents)

        self.messageList = QListView(self,"messageList")
        self.messageList.addColumn(self.__tr("File"))
        self.messageList.addColumn(self.__tr("Line"))
        self.messageList.addColumn(self.__tr("Type"))
        self.messageList.addColumn(self.__tr("Message"))
        self.messageList.setShowSortIndicator(1)
        PyLintExecFormLayout.addWidget(self.messageList)

        self.TextLabel2 = QLabel(self,"TextLabel2")
        PyLintExecFormLayout.addWidget(self.TextLabel2)

        self.errors = QTextBrowser(self,"errors")
        self.errors.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Preferred,0,0,self.errors.sizePolicy().hasHeightForWidth()))
        self.errors.setTextFormat(QTextBrowser.PlainText)
        PyLintExecFormLayout.addWidget(self.errors)

        layout2 = QHBoxLayout(None,0,6,"layout2")
        Spacer1 = QSpacerItem(250,16,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(Spacer1)

        self.button = QPushButton(self,"button")
        layout2.addWidget(self.button)

        self.saveButton = QPushButton(self,"saveButton")
        self.saveButton.setEnabled(0)
        layout2.addWidget(self.saveButton)
        Spacer2 = QSpacerItem(260,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(Spacer2)
        PyLintExecFormLayout.addLayout(layout2)

        self.languageChange()

        self.resize(QSize(753,605).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.button,SIGNAL("clicked()"),self.buttonPressed)
        self.connect(self.messageList,SIGNAL("doubleClicked(QListViewItem*)"),self.openFile)
        self.connect(self.saveButton,SIGNAL("clicked()"),self.handleSave)


    def languageChange(self):
        self.setCaption(self.__tr("PyLint Results"))
        self.contentsLabel.setText(self.__tr("Results:"))
        self.contents.setText(QString.null)
        QWhatsThis.add(self.contents,self.__tr("<b>PyLint Execution</b>\n"
"<p>This shows the results of the PyLint run.</p>"))
        self.messageList.header().setLabel(0,self.__tr("File"))
        self.messageList.header().setLabel(1,self.__tr("Line"))
        self.messageList.header().setLabel(2,self.__tr("Type"))
        self.messageList.header().setLabel(3,self.__tr("Message"))
        self.TextLabel2.setText(self.__tr("Errors:"))
        QWhatsThis.add(self.errors,self.__tr("<b>PyLint Execution</b>\n"
"<p>This shows the errors of the PyLint run.</p>"))
        self.button.setText(self.__tr("&Cancel"))
        self.button.setAccel(self.__tr("Alt+C"))
        self.saveButton.setText(self.__tr("&Save Report..."))
        self.saveButton.setAccel(self.__tr("Alt+S"))
        QToolTip.add(self.saveButton,self.__tr("Press to save the report to a file"))


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

    def openFile(self,a0):
        print "PyLintExecForm.openFile(QListViewItem*): Not implemented yet"

    def handleSave(self):
        print "PyLintExecForm.handleSave(): Not implemented yet"

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

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