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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

        layout3.addWidget(self.textLabel1_2,5,0)

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

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

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

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

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

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

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

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

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

        layout3.addWidget(self.repositoryEdit,6,1)

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

        layout3.addWidget(self.protocolComboBox,1,1)
        cvsLoginFormLayout.addLayout(layout3)

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

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

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

        self.languageChange()

        self.resize(QSize(384,201).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

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

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

        self.TextLabel2.setBuddy(self.passwordEdit)
        self.textLabel1.setBuddy(self.protocolComboBox)
        self.TextLabel1.setBuddy(self.usernameEdit)
        self.TextLabel3.setBuddy(self.hostEdit)
        self.textLabel1_2.setBuddy(self.portEdit)
        self.TextLabel4.setBuddy(self.repositoryEdit)


    def languageChange(self):
        self.setCaption(self.__tr("CVS Login"))
        self.TextLabel2.setText(self.__tr("&Password:"))
        self.textLabel1.setText(self.__tr("Pr&otocol:"))
        self.TextLabel1.setText(self.__tr("&Username:"))
        self.TextLabel3.setText(self.__tr("&Host:"))
        QToolTip.add(self.usernameEdit,self.__tr("Enter your CVS username"))
        QWhatsThis.add(self.usernameEdit,self.__tr("<b>Username</b>\n"
"<p>Enter your CVS user name.</p>"))
        self.textLabel1_2.setText(self.__tr("Por&t:"))
        self.TextLabel4.setText(self.__tr("&Repository:"))
        QToolTip.add(self.hostEdit,self.__tr("Enter host name of CVS server"))
        QWhatsThis.add(self.hostEdit,self.__tr("<b>Host</b>\n"
"<p>Enter the hostname of the machine serving the remote repository.</p>"))
        QToolTip.add(self.passwordEdit,self.__tr("Enter the CVS password"))
        QWhatsThis.add(self.passwordEdit,self.__tr("<b>Password</b>\n"
"<p>Enter the CVS password.</p>"))
        QToolTip.add(self.portEdit,self.__tr("Enter the port of the server"))
        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>"))
        QToolTip.add(self.protocolComboBox,self.__tr("Select the protocol to access the repository"))
        self.loginButton.setText(self.__tr("&Login"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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

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