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

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

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

        self.setSizeGripEnabled(1)

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

        self.statusList = QListView(self,"statusList")
        self.statusList.addColumn(self.__tr("Status"))
        self.statusList.addColumn(self.__tr("Prop. Status"))
        self.statusList.addColumn(self.__tr("Locked"))
        self.statusList.addColumn(self.__tr("History"))
        self.statusList.addColumn(self.__tr("Switched"))
        self.statusList.addColumn(self.__tr("Lock Info"))
        self.statusList.addColumn(self.__tr("Up to date"))
        self.statusList.addColumn(self.__tr("Revision"))
        self.statusList.addColumn(self.__tr("Last Change"))
        self.statusList.addColumn(self.__tr("Author"))
        self.statusList.addColumn(self.__tr("Path"))
        self.statusList.setFocusPolicy(QListView.NoFocus)
        self.statusList.setSelectionMode(QListView.Extended)
        self.statusList.setAllColumnsShowFocus(1)
        StatusFormLayout.addWidget(self.statusList)

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

        layout2 = QHBoxLayout(None,0,6,"layout2")
        Spacer3 = QSpacerItem(200,16,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(Spacer3)

        self.refreshButton = QPushButton(self,"refreshButton")
        self.refreshButton.setEnabled(0)
        layout2.addWidget(self.refreshButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        self.cancelButton.setDefault(1)
        layout2.addWidget(self.cancelButton)
        Spacer4 = QSpacerItem(384,16,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(Spacer4)
        StatusFormLayout.addLayout(layout2)

        self.languageChange()

        self.resize(QSize(955,646).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)
        self.connect(self.refreshButton,SIGNAL("clicked()"),self.refreshStatus)

        self.setTabOrder(self.input,self.sendButton)
        self.setTabOrder(self.sendButton,self.passwordCheckBox)
        self.setTabOrder(self.passwordCheckBox,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Subversion Status"))
        QWhatsThis.add(self,self.__tr("<b>Subversion Status</b>\n"
"<p>This dialog shows the status of the selected file or project.</p>"))
        self.statusList.header().setLabel(0,self.__tr("Status"))
        self.statusList.header().setLabel(1,self.__tr("Prop. Status"))
        self.statusList.header().setLabel(2,self.__tr("Locked"))
        self.statusList.header().setLabel(3,self.__tr("History"))
        self.statusList.header().setLabel(4,self.__tr("Switched"))
        self.statusList.header().setLabel(5,self.__tr("Lock Info"))
        self.statusList.header().setLabel(6,self.__tr("Up to date"))
        self.statusList.header().setLabel(7,self.__tr("Revision"))
        self.statusList.header().setLabel(8,self.__tr("Last Change"))
        self.statusList.header().setLabel(9,self.__tr("Author"))
        self.statusList.header().setLabel(10,self.__tr("Path"))
        self.errorGroup.setTitle(self.__tr("Errors"))
        QWhatsThis.add(self.errors,self.__tr("<b>Subversion status errors</b>\n"
"<p>This shows possible error messages of the subversion status command.</p>"))
        self.inputGroup.setTitle(self.__tr("Input"))
        QToolTip.add(self.input,self.__tr("Enter data to be sent to the subversion 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 subversion process"))
        self.refreshButton.setText(self.__tr("&Refresh"))
        self.refreshButton.setAccel(self.__tr("Alt+R"))
        QToolTip.add(self.refreshButton,self.__tr("Press to refresh the status display"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))


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

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

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

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

    def refreshStatus(self):
        print "StatusForm.refreshStatus(): Not implemented yet"

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

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