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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/VCS/cvsPackage/MergeForm.ui'
#
# Created: Do Dez 30 14:12:40 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 MergeForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

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

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

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

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

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

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

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

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

        layout3.addWidget(self.TextLabel1_2,1,0)
        MergeFormLayout.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)
        MergeFormLayout.addLayout(Layout5)

        self.languageChange()

        self.resize(QSize(456,110).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.tag1Combo,SIGNAL("textChanged(const QString&)"),self.enableOkButton)

        self.setTabOrder(self.tag1Combo,self.tag2Combo)
        self.setTabOrder(self.tag2Combo,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("CVS Merge"))
        self.TextLabel1.setText(self.__tr("1. Tag Name/Revision:"))
        QToolTip.add(self.tag2Combo,self.__tr("Enter the name of a tag or a revision number"))
        QWhatsThis.add(self.tag2Combo,self.__tr("<b>Tag Name/Revision</b>\n"
"<p>Enter the name of a tag or a revision number to be merged into\n"
"the local project.</p>"))
        QToolTip.add(self.tag1Combo,self.__tr("Enter the name of a tag or a revision number"))
        QWhatsThis.add(self.tag1Combo,self.__tr("<b>Tag Name/Revision</b>\n"
"<p>Enter the name of a tag or a revision number to be merged into\n"
"the local project.</p>"))
        self.TextLabel1_2.setText(self.__tr("2. Tag Name/Revision:"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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

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