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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/VCS/mercurialPackage/StatusForm.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 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("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)

        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.okButton = QPushButton(self,"okButton")
        self.okButton.setDefault(1)
        layout2.addWidget(self.okButton)
        Spacer4 = QSpacerItem(384,16,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout2.addItem(Spacer4)
        StatusFormLayout.addLayout(layout2)

        self.languageChange()

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

        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.refreshButton,SIGNAL("clicked()"),self.refreshStatus)



    def languageChange(self):
        self.setCaption(self.__tr("Mercurial Status"))
        QWhatsThis.add(self,self.__tr("<b>Mercurial 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("Path"))
        self.errorGroup.setTitle(self.__tr("Errors"))
        QWhatsThis.add(self.errors,self.__tr("<b>Mercurial status errors</b>\n"
"<p>This shows possible error messages of the Mercurial status command.</p>"))
        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.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(self.__tr("Alt+O"))


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