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

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

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


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

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

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

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

        self.TagActionButtons = QButtonGroup(self,"TagActionButtons")
        self.TagActionButtons.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Preferred,0,0,self.TagActionButtons.sizePolicy().hasHeightForWidth()))
        self.TagActionButtons.setFrameShape(QButtonGroup.NoFrame)
        self.TagActionButtons.setLineWidth(0)
        self.TagActionButtons.setExclusive(1)
        self.TagActionButtons.setColumnLayout(0,Qt.Vertical)
        self.TagActionButtons.layout().setSpacing(6)
        self.TagActionButtons.layout().setMargin(0)
        TagActionButtonsLayout = QVBoxLayout(self.TagActionButtons.layout())
        TagActionButtonsLayout.setAlignment(Qt.AlignTop)

        self.createRegularButton = QRadioButton(self.TagActionButtons,"createRegularButton")
        self.createRegularButton.setChecked(1)
        TagActionButtonsLayout.addWidget(self.createRegularButton)

        self.createBranchButton = QRadioButton(self.TagActionButtons,"createBranchButton")
        TagActionButtonsLayout.addWidget(self.createBranchButton)

        self.deleteRegularButton = QRadioButton(self.TagActionButtons,"deleteRegularButton")
        TagActionButtonsLayout.addWidget(self.deleteRegularButton)

        self.deleteBranchButton = QRadioButton(self.TagActionButtons,"deleteBranchButton")
        TagActionButtonsLayout.addWidget(self.deleteBranchButton)

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

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

        layout3.addWidget(self.TagActionLabel,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)
        TagFormLayout.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.setEnabled(0)
        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)
        TagFormLayout.addLayout(Layout5)

        self.languageChange()

        self.resize(QSize(391,189).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.tagCombo,SIGNAL("textChanged(const QString&)"),self.enableOkButton)

        self.setTabOrder(self.tagCombo,self.createRegularButton)
        self.setTabOrder(self.createRegularButton,self.createBranchButton)
        self.setTabOrder(self.createBranchButton,self.deleteRegularButton)
        self.setTabOrder(self.deleteRegularButton,self.deleteBranchButton)
        self.setTabOrder(self.deleteBranchButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Subversion Tag"))
        self.TextLabel1.setText(self.__tr("Name:"))
        self.TagActionButtons.setTitle(QString.null)
        self.createRegularButton.setText(self.__tr("Create Regular Tag"))
        QToolTip.add(self.createRegularButton,self.__tr("Select to create a regular tag"))
        QWhatsThis.add(self.createRegularButton,self.__tr("<b>Create Regular Tag</b>\n"
"<p>Select this entry in order to create a regular tag in the repository.</p>"))
        self.createBranchButton.setText(self.__tr("Create Branch Tag"))
        QToolTip.add(self.createBranchButton,self.__tr("Select to create a branch tag"))
        QWhatsThis.add(self.createBranchButton,self.__tr("<b>Create Branch Tag</b>\n"
"<p>Select this entry in order to create a branch in the repository.</p>"))
        self.deleteRegularButton.setText(self.__tr("Delete Regular Tag"))
        QToolTip.add(self.deleteRegularButton,self.__tr("Select to delete a regular tag"))
        QWhatsThis.add(self.deleteRegularButton,self.__tr("<b>Delete Regular Tag</b>\n"
"<p>Select this entry in order to delete the selected regular tag.</p>"))
        self.deleteBranchButton.setText(self.__tr("Delete Branch Tag"))
        QToolTip.add(self.deleteBranchButton,self.__tr("Select to delete a branch tag"))
        QWhatsThis.add(self.deleteBranchButton,self.__tr("<b>Delete Branch Tag</b>\n"
"<p>Select this entry in order to delete the selected branch tag.</p>"))
        self.TagActionLabel.setText(self.__tr("Operation:"))
        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 created, moved or deleted.</p>"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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

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