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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/VCS/subversionPackage/NewProjectForm.ui'
#
# Created: Tue Aug 23 19:21:42 2005
#      by: The PyQt User Interface Compiler (pyuic) snapshot-20050726
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


class SvnNewProjectOptionsForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

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

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

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

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

        layout3.addWidget(self.projectDirButton,3,2)

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

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

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

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

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

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

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

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

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

        layout3.addWidget(self.vcsProjectDirEdit,3,1)

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

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

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

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

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

        layout3.addWidget(self.TextLabel4,3,0)

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

        layout3.addWidget(self.vcsTagLabel,2,0)
        SvnNewProjectOptionsFormLayout.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)
        SvnNewProjectOptionsFormLayout.addLayout(Layout4)

        self.languageChange()

        self.resize(QSize(562,201).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.projectDirButton,SIGNAL("clicked()"),self.handleProjectDir)
        self.connect(self.layoutCheckBox,SIGNAL("toggled(bool)"),self.handleLayoutToggled)
        self.connect(self.protocolCombo,SIGNAL("activated(const QString&)"),self.handleProtocol)

        self.setTabOrder(self.protocolCombo,self.vcsDirectoryEdit)
        self.setTabOrder(self.vcsDirectoryEdit,self.vcsDirButton)
        self.setTabOrder(self.vcsDirButton,self.vcsTagEdit)
        self.setTabOrder(self.vcsTagEdit,self.vcsProjectDirEdit)
        self.setTabOrder(self.vcsProjectDirEdit,self.projectDirButton)
        self.setTabOrder(self.projectDirButton,self.layoutCheckBox)
        self.setTabOrder(self.layoutCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.textLabel1.setBuddy(self.protocolCombo)
        self.TextLabel2.setBuddy(self.vcsDirectoryEdit)
        self.TextLabel4.setBuddy(self.vcsProjectDirEdit)
        self.vcsTagLabel.setBuddy(self.vcsTagEdit)


    def languageChange(self):
        self.setCaption(self.__tr("New Project from Repository"))
        QWhatsThis.add(self,self.__tr("<b>New Project from Repository Dialog</b>\n"
"<p>Enter the various repository infos into the entry fields. These values are used, when the new project is retrieved from the repository. If the checkbox is selected, the URL must end in the project name. A repository layout with project/tags, project/branches and project/trunk will be assumed. In this case, you may enter a tag or branch, which must look like tags/tagname or branches/branchname. 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>"))
        QToolTip.add(self.vcsTagEdit,self.__tr("Enter the tag the new project should be generated from"))
        QWhatsThis.add(self.vcsTagEdit,self.__tr("<b>Tag in VCS</b>\n"
"<p>Enter the tag name the new project shall be generated from. Leave empty to retrieve the latest data from the repository.</p>"))
        self.projectDirButton.setText(self.__tr("..."))
        QToolTip.add(self.protocolCombo,self.__tr("Select the protocol to access the repository"))
        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.TextLabel2.setText(self.__tr("&URL:"))
        QToolTip.add(self.vcsProjectDirEdit,self.__tr("Enter the directory of the new project."))
        QWhatsThis.add(self.vcsProjectDirEdit,self.__tr("<b>Project Directory</b>\n"
"<p>Enter the directory of the new project. It will be retrieved from \n"
"the repository and be placed in this directory.</p>"))
        self.layoutCheckBox.setText(self.__tr("Repository has standard &layout"))
        self.layoutCheckBox.setAccel(self.__tr("Alt+L"))
        QToolTip.add(self.layoutCheckBox,self.__tr("Select to indicate, that the repository has a standard layout (projectdir/trunk, projectdir/tags, projectdir/branches)"))
        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.TextLabel4.setText(self.__tr("Project &Directory:"))
        self.vcsTagLabel.setText(self.__tr("&Tag:"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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

    def handleProjectDir(self):
        print "SvnNewProjectOptionsForm.handleProjectDir(): Not implemented yet"

    def handleLayoutToggled(self,a0):
        print "SvnNewProjectOptionsForm.handleLayoutToggled(bool): Not implemented yet"

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

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