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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/VCS/subversionPackage/SwitchForm.ui'
#
# Created: Do Dez 30 14:12:39 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 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.TagTypeButtons = QButtonGroup(self,"TagTypeButtons")
        self.TagTypeButtons.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Preferred,0,0,self.TagTypeButtons.sizePolicy().hasHeightForWidth()))
        self.TagTypeButtons.setFrameShape(QButtonGroup.NoFrame)
        self.TagTypeButtons.setLineWidth(0)
        self.TagTypeButtons.setExclusive(1)
        self.TagTypeButtons.setColumnLayout(0,Qt.Vertical)
        self.TagTypeButtons.layout().setSpacing(6)
        self.TagTypeButtons.layout().setMargin(0)
        TagTypeButtonsLayout = QVBoxLayout(self.TagTypeButtons.layout())
        TagTypeButtonsLayout.setAlignment(Qt.AlignTop)

        self.regularButton = QRadioButton(self.TagTypeButtons,"regularButton")
        self.regularButton.setChecked(1)
        TagTypeButtonsLayout.addWidget(self.regularButton)

        self.branchButton = QRadioButton(self.TagTypeButtons,"branchButton")
        TagTypeButtonsLayout.addWidget(self.branchButton)

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

        self.TagTypeLabel = QLabel(self,"TagTypeLabel")
        self.TagTypeLabel.setAlignment(QLabel.AlignTop)

        layout3.addWidget(self.TagTypeLabel,1,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,133).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.regularButton)
        self.setTabOrder(self.regularButton,self.branchButton)
        self.setTabOrder(self.branchButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Subversion Switch"))
        self.TextLabel1.setText(self.__tr("Tag Name:"))
        self.TagTypeButtons.setTitle(QString.null)
        self.regularButton.setText(self.__tr("Regular Tag"))
        QToolTip.add(self.regularButton,self.__tr("Select for a regular tag"))
        QWhatsThis.add(self.regularButton,self.__tr("<b>Regular Tag</b>\n"
"<p>Select this entry for a regular tag.</p>"))
        self.branchButton.setText(self.__tr("Branch Tag"))
        QToolTip.add(self.branchButton,self.__tr("Select for a branch tag"))
        QWhatsThis.add(self.branchButton,self.__tr("<b>Branch Tag</b>\n"
"<p>Select this entry for a branch tag.</p>"))
        self.TagTypeLabel.setText(self.__tr("Tag Type:"))
        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 trunk version leave it empty.</p>"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

    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()
