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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/VCS/cvsPackage/LogForm.ui'
#
# Created: So Nov 27 16:12:53 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.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 = QTextBrowser(self.errorGroup,"errors")
        self.errors.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Preferred,0,0,self.errors.sizePolicy().hasHeightForWidth()))
        self.errors.setTextFormat(QTextBrowser.PlainText)
        errorGroupLayout.addWidget(self.errors)
        LogFormLayout.addWidget(self.errorGroup)

        self.inputGroup = QGroupBox(self,"inputGroup")
        self.inputGroup.setColumnLayout(0,Qt.Vertical)
        self.inputGroup.layout().setSpacing(6)
        self.inputGroup.layout().setMargin(11)
        inputGroupLayout = QGridLayout(self.inputGroup.layout())
        inputGroupLayout.setAlignment(Qt.AlignTop)

        self.input = QLineEdit(self.inputGroup,"input")

        inputGroupLayout.addMultiCellWidget(self.input,0,0,0,2)

        self.passwordCheckBox = QCheckBox(self.inputGroup,"passwordCheckBox")

        inputGroupLayout.addWidget(self.passwordCheckBox,1,0)

        self.sendButton = QPushButton(self.inputGroup,"sendButton")

        inputGroupLayout.addWidget(self.sendButton,1,2)
        spacer3 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        inputGroupLayout.addItem(spacer3,1,1)
        LogFormLayout.addWidget(self.inputGroup)

        layout3 = QHBoxLayout(None,0,6,"layout3")
        Spacer1 = QSpacerItem(100,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(100,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout3.addItem(Spacer2)
        LogFormLayout.addLayout(layout3)

        self.languageChange()

        self.resize(QSize(753,650).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.connect(self.input,SIGNAL("returnPressed()"),self.returnPressed)
        self.connect(self.passwordCheckBox,SIGNAL("toggled(bool)"),self.passwordMode)
        self.connect(self.sendButton,SIGNAL("clicked()"),self.sendInput)


    def languageChange(self):
        self.setCaption(self.__tr("CVS Log"))
        self.contentsGroup.setTitle(self.__tr("Log"))
        self.errorGroup.setTitle(self.__tr("Errors"))
        self.inputGroup.setTitle(self.__tr("Input"))
        QToolTip.add(self.input,self.__tr("Enter data to be sent to the cvs process"))
        self.passwordCheckBox.setText(self.__tr("&Password Mode"))
        self.passwordCheckBox.setAccel(self.__tr("Alt+P"))
        QToolTip.add(self.passwordCheckBox,self.__tr("Select to switch the input field to password mode"))
        self.sendButton.setText(self.__tr("&Send"))
        self.sendButton.setAccel(self.__tr("Alt+S"))
        QToolTip.add(self.sendButton,self.__tr("Press to send the input to the cvs process"))
        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 returnPressed(self):
        print "LogForm.returnPressed(): Not implemented yet"

    def passwordMode(self,a0):
        print "LogForm.passwordMode(bool): Not implemented yet"

    def sendInput(self):
        print "LogForm.sendInput(): 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()
