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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/VCS/NewProjectForm.ui'
#
# Created: Mon Jan 20 20:44:54 2003
#      by: The PyQt User Interface Compiler (pyuic)
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

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

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

        Layout3.addWidget(self.TextLabel3,2,0)

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

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

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

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

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

        Layout3.addWidget(self.vcsLabel,0,0)

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

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

        self.optionsCheckBox = QCheckBox(self,"optionsCheckBox")

        Layout3.addMultiCellWidget(self.optionsCheckBox,5,5,0,1)

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

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

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

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

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

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

        self.vcsComboBox = QComboBox(0,self,"vcsComboBox")
        self.vcsComboBox.setSizePolicy(QSizePolicy(7,0,0,0,self.vcsComboBox.sizePolicy().hasHeightForWidth()))

        Layout3.addWidget(self.vcsComboBox,0,1)

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

        Layout3.addWidget(self.TextLabel1,3,0)

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

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

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

        Layout3.addWidget(self.vcsArchiveEdit,2,1)
        vcsNewProjectOptionsFormLayout.addLayout(Layout3)

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

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

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

        self.languageChange()

        self.resize(QSize(562,216).expandedTo(self.minimumSizeHint()))

        self.connect(self.okButton,SIGNAL("clicked()"),self,SLOT("accept()"))
        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("reject()"))
        self.connect(self.vcsDirButton,SIGNAL("clicked()"),self.handleDirectory)
        self.connect(self.vcsComboBox,SIGNAL("highlighted(const QString&)"),self.handleComboBox)
        self.connect(self.projectDirButton,SIGNAL("clicked()"),self.handleProjectDir)

        self.setTabOrder(self.vcsComboBox,self.vcsDirectoryEdit)
        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.optionsCheckBox)
        self.setTabOrder(self.optionsCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.TextLabel3.setBuddy(self.vcsArchiveEdit)
        self.vcsLabel.setBuddy(self.vcsComboBox)
        self.TextLabel2.setBuddy(self.vcsDirectoryEdit)
        self.TextLabel4.setBuddy(self.vcsProjectDirEdit)
        self.TextLabel1.setBuddy(self.vcsTagEdit)

    def languageChange(self):
        self.setCaption(self.tr("New Project from VCS"))
        QWhatsThis.add(self,self.tr("<b>New Project from VCS Dialog</b>\n"
"<p>Enter the various VCS properties into the entry fields. These values are used, when the new project is retrieved from the repository.</p>"))
        self.TextLabel3.setText(self.tr("&Archive in VCS:"))
        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>"))
        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.vcsLabel.setText(self.tr("VCS-&System:"))
        self.TextLabel2.setText(self.tr("VCS-&Directory:"))
        self.optionsCheckBox.setText(self.tr("Set Command Options"))
        QToolTip.add(self.optionsCheckBox,self.tr("Select whether the VCS command options shall be set."))
        self.projectDirButton.setText(self.tr("..."))
        self.TextLabel4.setText(self.tr("&Project Directory:"))
        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>"))
        QToolTip.add(self.vcsComboBox,self.tr("Select the VCS system to be used."))
        QWhatsThis.add(self.vcsComboBox,self.tr("<b>VCS-System</b>\n"
"<p>Select the VCS system (e.g. CVS) to be used in the project.</p>"))
        self.TextLabel1.setText(self.tr("&Tag in VCS:"))
        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.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>"))
        self.okButton.setText(self.tr("&OK"))
        self.cancelButton.setText(self.tr("&Cancel"))

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

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

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


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