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

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


import sys
from qt import *


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

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


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

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

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

        Layout6.addWidget(self.usernameEdit,1,1)

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

        Layout6.addWidget(self.hostEdit,3,1)

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

        Layout6.addWidget(self.TextLabel1,1,0)

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

        Layout6.addWidget(self.repositoryEdit,4,1)

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

        Layout6.addWidget(self.TextLabel2,2,0)

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

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

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

        Layout6.addWidget(self.TextLabel3,3,0)

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

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

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

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

        self.passwordEdit = QLineEdit(self,"passwordEdit")
        self.passwordEdit.setEchoMode(QLineEdit.Password)

        Layout6.addWidget(self.passwordEdit,2,1)
        vcsLoginFormLayout.addLayout(Layout6)

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

        self.loginButton = QPushButton(self,"loginButton")
        self.loginButton.setDefault(1)
        Layout3.addWidget(self.loginButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout3.addWidget(self.cancelButton)
        spacer_2 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout3.addItem(spacer_2)
        vcsLoginFormLayout.addLayout(Layout3)

        self.languageChange()

        self.resize(QSize(384,175).expandedTo(self.minimumSizeHint()))

        self.connect(self.loginButton,SIGNAL("clicked()"),self,SLOT("accept()"))
        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("reject()"))

        self.setTabOrder(self.vcsComboBox,self.usernameEdit)
        self.setTabOrder(self.usernameEdit,self.passwordEdit)
        self.setTabOrder(self.passwordEdit,self.hostEdit)
        self.setTabOrder(self.hostEdit,self.repositoryEdit)
        self.setTabOrder(self.repositoryEdit,self.loginButton)
        self.setTabOrder(self.loginButton,self.cancelButton)

        self.TextLabel1.setBuddy(self.usernameEdit)
        self.TextLabel2.setBuddy(self.passwordEdit)
        self.vcsLabel.setBuddy(self.vcsComboBox)
        self.TextLabel3.setBuddy(self.hostEdit)
        self.TextLabel4.setBuddy(self.repositoryEdit)

    def languageChange(self):
        self.setCaption(self.tr("VCS Login"))
        QToolTip.add(self.usernameEdit,self.tr("Enter your VCS username"))
        QWhatsThis.add(self.usernameEdit,self.tr("<b>Username</b>\n"
"<p>Enter your VCS user name.</p>"))
        QToolTip.add(self.hostEdit,self.tr("Enter host name of VCS server"))
        QWhatsThis.add(self.hostEdit,self.tr("<b>Host</b>\n"
"<p>Enter the hostname of the machine serving the remote repository.</p>"))
        self.TextLabel1.setText(self.tr("&Username:"))
        QToolTip.add(self.repositoryEdit,self.tr("Enter the remote repository"))
        QWhatsThis.add(self.repositoryEdit,self.tr("<b>Repository</b>\n"
"<p>Enter the remote repository.</p>"))
        self.TextLabel2.setText(self.tr("&Password:"))
        self.vcsLabel.setText(self.tr("VCS-&System:"))
        self.TextLabel3.setText(self.tr("&Host:"))
        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.TextLabel4.setText(self.tr("&Repository:"))
        QToolTip.add(self.passwordEdit,self.tr("Enter the VCS password"))
        QWhatsThis.add(self.passwordEdit,self.tr("<b>Password</b>\n"
"<p>Enter the VCS password.</p>"))
        self.loginButton.setText(self.tr("&Login"))
        self.cancelButton.setText(self.tr("&Cancel"))


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