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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/UI/CompareForm.ui'
#
# Created: Fr Jul 14 20:50:03 2006
#      by: The PyQt User Interface Compiler (pyuic) 3-snapshot-20060703
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


class CompareForm(QWidget):
    def __init__(self,parent = None,name = None,fl = 0):
        QWidget.__init__(self,parent,name,fl)

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


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

        layout8 = QHBoxLayout(None,0,6,"layout8")

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

        self.file1Edit = QLineEdit(self,"file1Edit")
        layout8.addWidget(self.file1Edit)

        self.file1Button = QPushButton(self,"file1Button")
        layout8.addWidget(self.file1Button)

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

        self.file2Edit = QLineEdit(self,"file2Edit")
        layout8.addWidget(self.file2Edit)

        self.file2Button = QPushButton(self,"file2Button")
        layout8.addWidget(self.file2Button)
        CompareFormLayout.addLayout(layout8)

        layout4 = QHBoxLayout(None,0,6,"layout4")

        self.contents_1 = QTextBrowser(self,"contents_1")
        self.contents_1.setFocusPolicy(QTextBrowser.NoFocus)
        self.contents_1.setTextFormat(QTextBrowser.PlainText)
        self.contents_1.setWordWrap(QTextBrowser.NoWrap)
        layout4.addWidget(self.contents_1)

        self.contents_2 = QTextBrowser(self,"contents_2")
        self.contents_2.setFocusPolicy(QTextBrowser.NoFocus)
        self.contents_2.setTextFormat(QTextBrowser.PlainText)
        self.contents_2.setWordWrap(QTextBrowser.NoWrap)
        layout4.addWidget(self.contents_2)
        CompareFormLayout.addLayout(layout4)

        self.synchronizeCheckBox = QCheckBox(self,"synchronizeCheckBox")
        self.synchronizeCheckBox.setChecked(1)
        CompareFormLayout.addWidget(self.synchronizeCheckBox)

        layout4_2 = QHBoxLayout(None,0,6,"layout4_2")
        Spacer1 = QSpacerItem(180,16,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout4_2.addItem(Spacer1)

        self.PushButton1 = QPushButton(self,"PushButton1")
        self.PushButton1.setDefault(1)
        layout4_2.addWidget(self.PushButton1)

        self.diffButton = QPushButton(self,"diffButton")
        self.diffButton.setEnabled(0)
        layout4_2.addWidget(self.diffButton)
        Spacer2 = QSpacerItem(200,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout4_2.addItem(Spacer2)
        CompareFormLayout.addLayout(layout4_2)

        self.languageChange()

        self.resize(QSize(972,601).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.PushButton1,SIGNAL("clicked()"),self.close)
        self.connect(self.file1Edit,SIGNAL("textChanged(const QString&)"),self.handleFileChanged)
        self.connect(self.file2Edit,SIGNAL("textChanged(const QString&)"),self.handleFileChanged)
        self.connect(self.file1Button,SIGNAL("clicked()"),self.handleSelectFile1)
        self.connect(self.file2Button,SIGNAL("clicked()"),self.handleSelectFile2)
        self.connect(self.diffButton,SIGNAL("clicked()"),self.handleDiff)
        self.connect(self.synchronizeCheckBox,SIGNAL("toggled(bool)"),self.handleSync)

        self.setTabOrder(self.file1Edit,self.file1Button)
        self.setTabOrder(self.file1Button,self.file2Edit)
        self.setTabOrder(self.file2Edit,self.file2Button)
        self.setTabOrder(self.file2Button,self.synchronizeCheckBox)
        self.setTabOrder(self.synchronizeCheckBox,self.diffButton)
        self.setTabOrder(self.diffButton,self.PushButton1)
        self.setTabOrder(self.PushButton1,self.contents_1)

        self.textLabel1.setBuddy(self.file1Edit)
        self.textLabel2.setBuddy(self.file1Edit)


    def languageChange(self):
        self.setCaption(self.__tr("File Comparison"))
        self.textLabel1.setText(self.__tr("File &1:"))
        QToolTip.add(self.file1Edit,self.__tr("Enter the name of the first file"))
        self.file1Button.setText(self.__tr("..."))
        QToolTip.add(self.file1Button,self.__tr("Press to select the file via a file selection dialog"))
        self.textLabel2.setText(self.__tr("File &2:"))
        QToolTip.add(self.file2Edit,self.__tr("Enter the name of the second file"))
        self.file2Button.setText(self.__tr("..."))
        QToolTip.add(self.file2Button,self.__tr("Press to select the file via a file selection dialog"))
        self.synchronizeCheckBox.setText(self.__tr("&Synchronize scrollbars"))
        self.synchronizeCheckBox.setAccel(QKeySequence(self.__tr("Alt+S")))
        QToolTip.add(self.synchronizeCheckBox,self.__tr("Select, if the scrollbars should be synchronized"))
        self.PushButton1.setText(self.__tr("&Close"))
        self.PushButton1.setAccel(QKeySequence(self.__tr("Alt+C")))
        self.diffButton.setText(self.__tr("C&ompare"))
        self.diffButton.setAccel(QKeySequence(self.__tr("Alt+O")))
        QToolTip.add(self.diffButton,self.__tr("Press to perform the comparison of the two files"))


    def handleSync(self,a0):
        print "CompareForm.handleSync(bool): Not implemented yet"

    def handleDiff(self):
        print "CompareForm.handleDiff(): Not implemented yet"

    def handleFileChanged(self):
        print "CompareForm.handleFileChanged(): Not implemented yet"

    def handleSelectFile1(self):
        print "CompareForm.handleSelectFile1(): Not implemented yet"

    def handleSelectFile2(self):
        print "CompareForm.handleSelectFile2(): Not implemented yet"

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

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