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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/VCS/subversionPackage/TagForm.ui'
#
# Created: Sam Mär 22 17:10:49 2003
#      by: The PyQt User Interface Compiler (pyuic)
#
# 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.ButtonGroup1 = QButtonGroup(self,"ButtonGroup1")
        self.ButtonGroup1.setSizePolicy(QSizePolicy(7,5,0,0,self.ButtonGroup1.sizePolicy().hasHeightForWidth()))
        self.ButtonGroup1.setFrameShape(QButtonGroup.NoFrame)
        self.ButtonGroup1.setLineWidth(0)
        self.ButtonGroup1.setExclusive(1)
        self.ButtonGroup1.setColumnLayout(0,Qt.Vertical)
        self.ButtonGroup1.layout().setSpacing(6)
        self.ButtonGroup1.layout().setMargin(0)
        ButtonGroup1Layout = QVBoxLayout(self.ButtonGroup1.layout())
        ButtonGroup1Layout.setAlignment(Qt.AlignTop)

        self.createRegularButton = QRadioButton(self.ButtonGroup1,"createRegularButton")
        self.createRegularButton.setChecked(1)
        ButtonGroup1Layout.addWidget(self.createRegularButton)

        self.createBranchButton = QRadioButton(self.ButtonGroup1,"createBranchButton")
        self.createBranchButton.setFocusPolicy(QRadioButton.NoFocus)
        ButtonGroup1Layout.addWidget(self.createBranchButton)

        self.deleteRegularButton = QRadioButton(self.ButtonGroup1,"deleteRegularButton")
        self.deleteRegularButton.setFocusPolicy(QRadioButton.NoFocus)
        ButtonGroup1Layout.addWidget(self.deleteRegularButton)

        self.deleteBranchButton = QRadioButton(self.ButtonGroup1,"deleteBranchButton")
        self.deleteBranchButton.setFocusPolicy(QRadioButton.NoFocus)
        ButtonGroup1Layout.addWidget(self.deleteBranchButton)

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

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

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

        self.tagCombo = QComboBox(0,self,"tagCombo")
        self.tagCombo.setSizePolicy(QSizePolicy(7,0,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")
        spacer = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout5.addItem(spacer)

        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)
        spacer_2 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout5.addItem(spacer_2)
        TagFormLayout.addLayout(Layout5)

        self.languageChange()

        self.resize(QSize(391,179).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.okButton,SIGNAL("clicked()"),self,SLOT("accept()"))
        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("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.ButtonGroup1.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.TextLabel2.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"

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