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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/VCS/mercurialPackage/CopyForm.ui'
#
# Created: Sa Sep 10 16:32:17 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 CopyForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

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

        self.dirButton = QPushButton(self,"dirButton")
        self.dirButton.setFocusPolicy(QPushButton.NoFocus)

        layout2.addWidget(self.dirButton,1,2)

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

        layout2.addWidget(self.textLabel1,0,0)

        self.sourceEdit = QLineEdit(self,"sourceEdit")
        self.sourceEdit.setFocusPolicy(QLineEdit.NoFocus)
        self.sourceEdit.setReadOnly(1)

        layout2.addWidget(self.sourceEdit,0,1)

        self.targetEdit = QLineEdit(self,"targetEdit")

        layout2.addWidget(self.targetEdit,1,1)

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

        layout2.addWidget(self.textLabel2,1,0)
        CopyFormLayout.addLayout(layout2)

        layout1 = QHBoxLayout(None,0,6,"layout1")
        spacer1 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer1)

        self.okButton = QPushButton(self,"okButton")
        self.okButton.setDefault(1)
        layout1.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        layout1.addWidget(self.cancelButton)
        spacer2 = QSpacerItem(40,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout1.addItem(spacer2)
        CopyFormLayout.addLayout(layout1)

        self.languageChange()

        self.resize(QSize(409,112).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.dirButton,SIGNAL("clicked()"),self.handleTarget)
        self.connect(self.okButton,SIGNAL("clicked()"),self.accept)
        self.connect(self.cancelButton,SIGNAL("clicked()"),self.reject)


    def languageChange(self):
        self.setCaption(self.__tr("Mercurial Copy"))
        self.dirButton.setText(self.__tr("..."))
        QToolTip.add(self.dirButton,self.__tr("Press to open a selection dialog"))
        QWhatsThis.add(self.dirButton,self.__tr("<b>Target name</b>\n"
"<p>Select the target name for the operation via a selection dialog.</p>"))
        self.textLabel1.setText(self.__tr("Source:"))
        QToolTip.add(self.sourceEdit,self.__tr("Shows the name of the source"))
        QWhatsThis.add(self.sourceEdit,self.__tr("<b>Source name</b>\n"
"<p>This field shows the name of the source.</p>"))
        QToolTip.add(self.targetEdit,self.__tr("Enter the target name"))
        QWhatsThis.add(self.targetEdit,self.__tr("<b>Target name</b>\n"
"<p>Enter the new name in this field.</p>"))
        self.textLabel2.setText(self.__tr("Target:"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


    def handleTarget(self):
        print "CopyForm.handleTarget(): Not implemented yet"

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

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