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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        self.languageChange()

        self.resize(QSize(562,169).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.setTabOrder(self.vcsDirectoryEdit,self.vcsDirButton)
        self.setTabOrder(self.vcsDirButton,self.vcsArchiveEdit)
        self.setTabOrder(self.vcsArchiveEdit,self.vcsTagEdit)
        self.setTabOrder(self.vcsTagEdit,self.vcsProjectDirEdit)
        self.setTabOrder(self.vcsProjectDirEdit,self.projectDirButton)
        self.setTabOrder(self.projectDirButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.TextLabel2.setBuddy(self.vcsDirectoryEdit)
        self.TextLabel4.setBuddy(self.vcsProjectDirEdit)
        self.vcsTagLabel.setBuddy(self.vcsTagEdit)
        self.TextLabel3.setBuddy(self.vcsArchiveEdit)


    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. In order to access a remote repository, the repository path must contain the protocol info, user info and hostname, e.g. :pserver:anonymous@cvsserver:/cvsroot.</p>"))
        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>"))
        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.projectDirButton.setText(self.__tr("..."))
        self.TextLabel2.setText(self.__tr("&Repository:"))
        QToolTip.add(self.vcsArchiveEdit,self.__tr("Enter the name of the archive in VCS."))
        QWhatsThis.add(self.vcsArchiveEdit,self.__tr("<b>Archive in VCS</b>\n"
"<p>Enter the name of the archive in the VCS.</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.TextLabel4.setText(self.__tr("Project &Directory:"))
        self.vcsTagLabel.setText(self.__tr("&Tag in repository:"))
        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.TextLabel3.setText(self.__tr("&Archive in repository:"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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

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

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

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

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