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

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

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


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

        layout3 = QGridLayout(None,1,1,0,6,"layout3")

        self.TextLabel5 = QLabel(self,"TextLabel5")

        layout3.addWidget(self.TextLabel5,2,0)

        self.layoutCheckBox = QCheckBox(self,"layoutCheckBox")
        self.layoutCheckBox.setChecked(1)

        layout3.addMultiCellWidget(self.layoutCheckBox,3,3,0,1)

        self.protocolCombo = QComboBox(0,self,"protocolCombo")

        layout3.addWidget(self.protocolCombo,0,1)

        self.vcsDirButton = QPushButton(self,"vcsDirButton")

        layout3.addWidget(self.vcsDirButton,1,2)

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

        layout3.addWidget(self.TextLabel2,1,0)

        self.vcsLogEdit = QLineEdit(self,"vcsLogEdit")

        layout3.addWidget(self.vcsLogEdit,2,1)

        self.textLabel1 = QLabel(self,"textLabel1")

        layout3.addWidget(self.textLabel1,0,0)

        self.vcsDirectoryEdit = QLineEdit(self,"vcsDirectoryEdit")

        layout3.addWidget(self.vcsDirectoryEdit,1,1)
        SvnOptionsFormLayout.addLayout(layout3)

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

        self.okButton = QPushButton(self,"okButton")
        self.okButton.setDefault(1)
        Layout4.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout4.addWidget(self.cancelButton)
        Spacer4 = QSpacerItem(20,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout4.addItem(Spacer4)
        SvnOptionsFormLayout.addLayout(Layout4)

        self.languageChange()

        self.resize(QSize(565,168).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)
        self.connect(self.vcsDirButton,SIGNAL("clicked()"),self.handleDirectory)
        self.connect(self.protocolCombo,SIGNAL("activated(const QString&)"),self.handleProtocol)

        self.setTabOrder(self.vcsDirectoryEdit,self.vcsDirButton)
        self.setTabOrder(self.vcsDirButton,self.protocolCombo)
        self.setTabOrder(self.protocolCombo,self.vcsLogEdit)
        self.setTabOrder(self.vcsLogEdit,self.layoutCheckBox)
        self.setTabOrder(self.layoutCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.TextLabel5.setBuddy(self.vcsLogEdit)
        self.TextLabel2.setBuddy(self.vcsDirectoryEdit)
        self.textLabel1.setBuddy(self.protocolCombo)


    def languageChange(self):
        self.setCaption(self.__tr("Repository Infos"))
        QWhatsThis.add(self,self.__tr("<b>Repository Infos Dialog</b>\n"
"<p>Enter the various infos into the entry fields. These values are used to generate a new project in the repository. If the checkbox is selected, the URL must end in the project name. A directory tree with project/tags, project/branches and project/trunk will be generated in the repository. If the checkbox is not selected, the URL must contain the complete path in the repository.</p>\n"
"<p>For remote repositories the URL must contain the hostname.</p>"))
        self.TextLabel5.setText(self.__tr("Log &Message:"))
        self.layoutCheckBox.setText(self.__tr("Create standard repository &layout"))
        self.layoutCheckBox.setAccel(self.__tr("Alt+L"))
        QToolTip.add(self.layoutCheckBox,self.__tr("Select, if the standard repository layout (projectdir/trunk, projectdir/tags, projectdir/branches) should be generated"))
        QToolTip.add(self.protocolCombo,self.__tr("Select the protocol to access the repository"))
        self.vcsDirButton.setText(self.__tr("..."))
        QToolTip.add(self.vcsDirButton,self.__tr("Show directory selection dialog"))
        QWhatsThis.add(self.vcsDirButton,self.__tr("<b>VCS-Directory</b>\n"
"<p>Select VCS root directory via a directory selection dialog.</p>"))
        self.TextLabel2.setText(self.__tr("&URL:"))
        self.vcsLogEdit.setText(self.__tr("new project started"))
        QToolTip.add(self.vcsLogEdit,self.__tr("Enter the log message for the new project."))
        QWhatsThis.add(self.vcsLogEdit,self.__tr("<b>Log Message</b>\n"
"<p>Enter the log message to be used for the new project.</p>"))
        self.textLabel1.setText(self.__tr("&Protocol:"))
        QToolTip.add(self.vcsDirectoryEdit,self.__tr("Enter the name of the VCS directory."))
        QWhatsThis.add(self.vcsDirectoryEdit,self.__tr("<b>VCS-Directory</b>\n"
"<p>Enter the name of the directory, that is the root of the VCS repository to be used. You may select it by pressing the button to the right.</p>"))
        self.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(self.__tr("Alt+O"))
        self.cancelButton.setText(self.__tr("&Cancel"))


    def handleDirectory(self):
        print "SvnOptionsForm.handleDirectory(): Not implemented yet"

    def handleProtocol(self,a0):
        print "SvnOptionsForm.handleProtocol(const QString&): Not implemented yet"

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

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