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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/VCS/mercurialPackage/LogForm.ui'
#
# Created: So Sep 11 17:01:32 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 LogForm(QWidget):
    def __init__(self,parent = None,name = None,fl = 0):
        QWidget.__init__(self,parent,name,fl)

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


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

        self.contentsGroup = QGroupBox(self,"contentsGroup")
        self.contentsGroup.setColumnLayout(0,Qt.Vertical)
        self.contentsGroup.layout().setSpacing(0)
        self.contentsGroup.layout().setMargin(6)
        contentsGroupLayout = QVBoxLayout(self.contentsGroup.layout())
        contentsGroupLayout.setAlignment(Qt.AlignTop)

        self.contents = QTextBrowser(self.contentsGroup,"contents")
        self.contents.setFocusPolicy(QTextBrowser.NoFocus)
        self.contents.setTextFormat(QTextBrowser.RichText)
        contentsGroupLayout.addWidget(self.contents)
        LogFormLayout.addWidget(self.contentsGroup)

        self.errorGroup = QGroupBox(self,"errorGroup")
        self.errorGroup.setColumnLayout(0,Qt.Vertical)
        self.errorGroup.layout().setSpacing(0)
        self.errorGroup.layout().setMargin(6)
        errorGroupLayout = QVBoxLayout(self.errorGroup.layout())
        errorGroupLayout.setAlignment(Qt.AlignTop)

        self.errors = QTextEdit(self.errorGroup,"errors")
        self.errors.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Preferred,0,0,self.errors.sizePolicy().hasHeightForWidth()))
        self.errors.setFocusPolicy(QTextEdit.NoFocus)
        self.errors.setTextFormat(QTextEdit.PlainText)
        self.errors.setReadOnly(1)
        errorGroupLayout.addWidget(self.errors)
        LogFormLayout.addWidget(self.errorGroup)

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

        self.closeButton = QPushButton(self,"closeButton")
        self.closeButton.setDefault(1)
        layout3.addWidget(self.closeButton)

        self.saveButton = QPushButton(self,"saveButton")
        self.saveButton.setEnabled(0)
        layout3.addWidget(self.saveButton)
        Spacer2 = QSpacerItem(258,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout3.addItem(Spacer2)
        LogFormLayout.addLayout(layout3)

        self.languageChange()

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

        self.connect(self.closeButton,SIGNAL("clicked()"),self.close)
        self.connect(self.saveButton,SIGNAL("clicked()"),self.handleSave)

        self.setTabOrder(self.closeButton,self.saveButton)


    def languageChange(self):
        self.setCaption(self.__tr("Mercurial Log"))
        self.contentsGroup.setTitle(self.__tr("Log"))
        self.contents.setText(self.__tr("<b>Processing your request, please wait...</b>\n"
""))
        self.errorGroup.setTitle(self.__tr("Errors"))
        self.closeButton.setText(self.__tr("&Close"))
        self.closeButton.setAccel(self.__tr("Alt+C"))
        self.saveButton.setText(self.__tr("&Save"))
        self.saveButton.setAccel(self.__tr("Alt+S"))


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

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

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