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

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

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

        self.setSizeGripEnabled(1)

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

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

        self.historyList = QListView(self.historyGroup,"historyList")
        self.historyList.addColumn(self.__tr("No."))
        self.historyList.addColumn(self.__tr("Date"))
        self.historyList.addColumn(self.__tr("Event"))
        self.historyList.addColumn(self.__tr("Author"))
        self.historyList.addColumn(self.__tr("Revision"))
        self.historyList.addColumn(self.__tr("File"))
        self.historyList.addColumn(self.__tr("Path"))
        self.historyList.setAllColumnsShowFocus(1)
        self.historyList.setShowSortIndicator(1)
        historyGroupLayout.addWidget(self.historyList)
        HistoryFormLayout.addWidget(self.historyGroup)

        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)
        HistoryFormLayout.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)
        HistoryFormLayout.addWidget(self.inputGroup)

        Layout2 = QHBoxLayout(None,0,6,"Layout2")
        Spacer3 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout2.addItem(Spacer3)

        self.cancelButton = QPushButton(self,"cancelButton")
        self.cancelButton.setDefault(1)
        Layout2.addWidget(self.cancelButton)
        Spacer4 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout2.addItem(Spacer4)
        HistoryFormLayout.addLayout(Layout2)

        self.languageChange()

        self.resize(QSize(865,610).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.cancelButton,SIGNAL("clicked()"),self.buttonPressed)
        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 History"))
        QWhatsThis.add(self,self.__tr("<b>CVS History</b>\n"
"<p>This dialog shows the history of the selected file or project.</p>"))
        self.historyGroup.setTitle(self.__tr("History"))
        self.historyList.header().setLabel(0,self.__tr("No."))
        self.historyList.header().setLabel(1,self.__tr("Date"))
        self.historyList.header().setLabel(2,self.__tr("Event"))
        self.historyList.header().setLabel(3,self.__tr("Author"))
        self.historyList.header().setLabel(4,self.__tr("Revision"))
        self.historyList.header().setLabel(5,self.__tr("File"))
        self.historyList.header().setLabel(6,self.__tr("Path"))
        QWhatsThis.add(self.historyList,self.__tr("<b>History List</b>\n"
"<p>This shows the history entries of the selected file or project.</p>"))
        self.errorGroup.setTitle(self.__tr("Errors"))
        QWhatsThis.add(self.errors,self.__tr("<b>CVS history errors</b>\n"
"<p>This shows possible error messages of the cvs history command.</p>"))
        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.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))


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

    def returnPressed(self):
        print "HistoryForm.returnPressed(): Not implemented yet"

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

    def sendInput(self):
        print "HistoryForm.sendInput(): Not implemented yet"

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

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