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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/VCS/cvsPackage/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 CvsOptionsForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

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

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

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

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

        layout3.addWidget(self.vcsReleaseEdit,5,1)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        layout3.addWidget(self.vcsReleaseLabel,5,0)
        CvsOptionsFormLayout.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)
        CvsOptionsFormLayout.addLayout(Layout4)

        self.languageChange()

        self.resize(QSize(562,192).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.setTabOrder(self.vcsDirectoryEdit,self.vcsDirButton)
        self.setTabOrder(self.vcsDirButton,self.vcsArchiveEdit)
        self.setTabOrder(self.vcsArchiveEdit,self.vcsVendorEdit)
        self.setTabOrder(self.vcsVendorEdit,self.vcsLogEdit)
        self.setTabOrder(self.vcsLogEdit,self.vcsReleaseEdit)
        self.setTabOrder(self.vcsReleaseEdit,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.TextLabel3.setBuddy(self.vcsArchiveEdit)
        self.TextLabel2.setBuddy(self.vcsDirectoryEdit)
        self.TextLabel5.setBuddy(self.vcsLogEdit)
        self.vcsVendorLabel.setBuddy(self.vcsVendorEdit)
        self.vcsReleaseLabel.setBuddy(self.vcsReleaseEdit)


    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. 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>"))
        self.vcsReleaseEdit.setText(self.__tr("start"))
        QToolTip.add(self.vcsReleaseEdit,self.__tr("Enter the release label."))
        QWhatsThis.add(self.vcsReleaseEdit,self.__tr("<b>Release Label</b>\n"
"<p>Enter the release label for the new project.</p>"))
        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.TextLabel3.setText(self.__tr("&Archive in repository:"))
        QToolTip.add(self.vcsVendorEdit,self.__tr("Enter the vendor label."))
        QWhatsThis.add(self.vcsVendorEdit,self.__tr("<b>Vendor Label</b>\n"
"<p>Enter the vendor label to be used for the archive.</p>"))
        self.TextLabel2.setText(self.__tr("&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>"))
        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.TextLabel5.setText(self.__tr("Log &Message:"))
        self.vcsVendorLabel.setText(self.__tr("&Vendor Label:"))
        self.vcsReleaseLabel.setText(self.__tr("Release &Label:"))
        self.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(self.__tr("Alt+O"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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

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

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