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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/VCS/subversionPackage/MergeForm.ui'
#
# Created: So Nov 27 16:12:59 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 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.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.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.TextLabel1 = QLabel(self,"TextLabel1")

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

        self.targetCombo = QComboBox(0,self,"targetCombo")
        self.targetCombo.setEditable(1)
        self.targetCombo.setInsertionPolicy(QComboBox.AtTop)
        self.targetCombo.setAutoCompletion(1)
        self.targetCombo.setDuplicatesEnabled(0)

        layout3.addWidget(self.targetCombo,2,1)

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

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

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

        layout3.addWidget(self.textLabel1,2,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,145).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.connect(self.tag2Combo,SIGNAL("textChanged(const QString&)"),self.enableOkButton)

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


    def languageChange(self):
        self.setCaption(self.__tr("Subversion Merge"))
        QToolTip.add(self.tag1Combo,self.__tr("Enter an URL or a revision number"))
        QWhatsThis.add(self.tag1Combo,self.__tr("<b>URL/Revision</b>\n"
"<p>Enter an URL or a revision number to be merged into\n"
"the working copy.</p>"))
        QToolTip.add(self.tag2Combo,self.__tr("Enter an URL or a revision number"))
        QWhatsThis.add(self.tag2Combo,self.__tr("<b>URL/Revision</b>\n"
"<p>Enter an URL or a revision number to be merged into\n"
"the working copy.</p>"))
        self.TextLabel1.setText(self.__tr("1. URL/Revision:"))
        QToolTip.add(self.targetCombo,self.__tr("Enter the target"))
        QWhatsThis.add(self.targetCombo,self.__tr("<b>Target</b>\n"
"<p>Enter the target for the merge operation into this field. Leave it empty to\n"
"get the target URL from the working copy.</p>\n"
"<p><b>Note:</b> This entry is only needed, if you enter revision numbers above.</p>"))
        self.TextLabel1_2.setText(self.__tr("2. URL/Revision:"))
        self.textLabel1.setText(self.__tr("Target:"))
        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()
