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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/VCS/cvsPackage/HistoryForm.ui'
#
# Created: Sam Mär 15 21:19:10 2003
#      by: The PyQt User Interface Compiler (pyuic)
#
# 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,11,6,"HistoryFormLayout")

        self.historyList = QListView(self,"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)
        HistoryFormLayout.addWidget(self.historyList)

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

        self.errors = QTextBrowser(self,"errors")
        self.errors.setSizePolicy(QSizePolicy(7,5,0,0,self.errors.sizePolicy().hasHeightForWidth()))
        self.errors.setTextFormat(QTextBrowser.PlainText)
        HistoryFormLayout.addWidget(self.errors)

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

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout2.addWidget(self.cancelButton)
        spacer_2 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout2.addItem(spacer_2)
        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)


    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.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.TextLabel2.setText(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.cancelButton.setText(self.tr("&Cancel"))


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

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()
