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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/VCS/mercurialPackage/TagForm.ui'
#
# Created: Di Sep 6 18:39:06 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.createLocalButton = QRadioButton(self.TagActionButtons,"createLocalButton")
        TagActionButtonsLayout.addWidget(self.createLocalButton)

        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,118).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.createLocalButton)
        self.setTabOrder(self.createLocalButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Mercurial 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.createLocalButton.setText(self.__tr("Create Local Tag"))
        QToolTip.add(self.createLocalButton,self.__tr("Select to create a local tag"))
        QWhatsThis.add(self.createLocalButton,self.__tr("<b>Create Local Tag</b>\n"
"<p>Select this entry in order to create a local tag in the repository.</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.okButton.setAccel(self.__tr("Alt+O"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))


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