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

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

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


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

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

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

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

        self.tagCombo = QComboBox(0,self,"tagCombo")
        self.tagCombo.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.tagCombo.sizePolicy().hasHeightForWidth()))
        self.tagCombo.setEditable(1)
        self.tagCombo.setAutoCompletion(1)
        self.tagCombo.setDuplicatesEnabled(0)

        layout3.addWidget(self.tagCombo,0,1)
        SwitchFormLayout.addLayout(layout3)

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

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

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout5.addWidget(self.cancelButton)
        Spacer2 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout5.addItem(Spacer2)
        SwitchFormLayout.addLayout(Layout5)

        self.languageChange()

        self.resize(QSize(391,77).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.setTabOrder(self.tagCombo,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("CVS Switch"))
        self.TextLabel1.setText(self.__tr("Tag Name:"))
        QToolTip.add(self.tagCombo,self.__tr("Enter the name of the tag"))
        QWhatsThis.add(self.tagCombo,self.__tr("<b>Tag Name</b>\n"
"<p>Enter the name of the tag to be switched to.\n"
"In order to switch to the head version leave it empty.</p>"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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