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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/Checks/SyntaxCheckerForm.ui'
#
# Created: So Nov 27 16:13:00 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 SyntaxCheckerForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

        self.resultList = QListView(self,"resultList")
        self.resultList.addColumn(self.__tr("Filename"))
        self.resultList.addColumn(self.__tr("#"))
        self.resultList.addColumn(self.__tr("Syntax Error"))
        self.resultList.addColumn(self.__tr("Source"))
        self.resultList.setAllColumnsShowFocus(1)
        self.resultList.setShowSortIndicator(1)
        SyntaxCheckerFormLayout.addWidget(self.resultList)

        self.checkProgress = QProgressBar(self,"checkProgress")
        SyntaxCheckerFormLayout.addWidget(self.checkProgress)

        layout2 = QHBoxLayout(None,0,6,"layout2")
        spacer3 = QSpacerItem(100,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(spacer3)

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

        self.showButton = QPushButton(self,"showButton")
        self.showButton.setEnabled(0)
        layout2.addWidget(self.showButton)
        spacer4 = QSpacerItem(130,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(spacer4)
        SyntaxCheckerFormLayout.addLayout(layout2)

        self.languageChange()

        self.resize(QSize(572,424).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.cancelButton,SIGNAL("clicked()"),self.buttonPressed)
        self.connect(self.resultList,SIGNAL("doubleClicked(QListViewItem*)"),self.openFile)
        self.connect(self.showButton,SIGNAL("clicked()"),self.handleShow)


    def languageChange(self):
        self.setCaption(self.__tr("Syntax Check Result"))
        QWhatsThis.add(self,self.__tr("<b>Syntax Check Results</b>\n"
"<p>This dialog shows the results of the syntax check. Double clicking an\n"
"entry will open an editor window and position the cursor at the respective line.</p>"))
        self.resultList.header().setLabel(0,self.__tr("Filename"))
        self.resultList.header().setLabel(1,self.__tr("#"))
        self.resultList.header().setLabel(2,self.__tr("Syntax Error"))
        self.resultList.header().setLabel(3,self.__tr("Source"))
        QWhatsThis.add(self.resultList,self.__tr("<b>Result List</b>\n"
"<p>This list shows the results of the syntax check. Double clicking\n"
"an entry will open this entry in an editor window and position the cursor at\n"
"the respective line.</p>"))
        QToolTip.add(self.checkProgress,self.__tr("Shows the progress of the syntax check action"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))
        self.showButton.setText(self.__tr("Show"))
        QToolTip.add(self.showButton,self.__tr("Press to show all files containing a syntax error"))


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

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

    def handleShow(self):
        print "SyntaxCheckerForm.handleShow(): Not implemented yet"

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

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