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

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

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


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

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

        self.sourceFileButton = QPushButton(self,"sourceFileButton")

        Layout6.addWidget(self.sourceFileButton,0,2)

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

        Layout6.addWidget(self.targetDirLabel,1,0)

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

        Layout6.addWidget(self.targetDirEdit,1,1)

        self.targetDirButton = QPushButton(self,"targetDirButton")

        Layout6.addWidget(self.targetDirButton,1,2)

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

        Layout6.addWidget(self.sourceFileLabel,0,0)

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

        Layout6.addWidget(self.sourceFileEdit,0,1)
        AddFileFormLayout.addLayout(Layout6)

        self.sourcecodeCheckBox = QCheckBox(self,"sourcecodeCheckBox")
        AddFileFormLayout.addWidget(self.sourcecodeCheckBox)

        Layout5 = QHBoxLayout(None,0,6,"Layout5")
        Spacer4 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout5.addItem(Spacer4)

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

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout5.addWidget(self.cancelButton)
        Spacer5 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout5.addItem(Spacer5)
        AddFileFormLayout.addLayout(Layout5)

        self.languageChange()

        self.resize(QSize(391,141).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.sourceFileButton,SIGNAL("clicked()"),self.handleFileDialog)
        self.connect(self.targetDirButton,SIGNAL("clicked()"),self.handleDirDialog)
        self.connect(self.sourceFileEdit,SIGNAL("textChanged(const QString&)"),self.handleSTextChanged)

        self.setTabOrder(self.sourceFileEdit,self.sourceFileButton)
        self.setTabOrder(self.sourceFileButton,self.targetDirEdit)
        self.setTabOrder(self.targetDirEdit,self.targetDirButton)
        self.setTabOrder(self.targetDirButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.targetDirLabel.setBuddy(self.targetDirEdit)
        self.sourceFileLabel.setBuddy(self.sourceFileEdit)


    def languageChange(self):
        self.setCaption(self.__tr("Add Files"))
        QWhatsThis.add(self,self.__tr("<b>Add Files Dialog</b>\n"
"<p>This dialog is used to add files to the current project.</p>"))
        self.sourceFileButton.setText(self.__tr("..."))
        QWhatsThis.add(self.sourceFileButton,self.__tr("<b>Source Files</b>\n"
"<p>Select the source files via a files selection dialog.</p>"))
        self.targetDirLabel.setText(self.__tr("&Target Directory:"))
        QToolTip.add(self.targetDirEdit,self.__tr("Enter the target directory for the file"))
        QWhatsThis.add(self.targetDirEdit,self.__tr("<b>Target Directory</b>\n"
"<p>Enter the target directory. You may select it\n"
" with a dialog by pressing the button to the right.</p>"))
        self.targetDirButton.setText(self.__tr("..."))
        QWhatsThis.add(self.targetDirButton,self.__tr("<b>Target Directory</b>\n"
"<p>Select the target directory via a directory selection dialog.</p>"))
        self.sourceFileLabel.setText(self.__tr("&Source Files:"))
        QToolTip.add(self.sourceFileEdit,self.__tr("Enter the name of files to add separated by the path separator"))
        QWhatsThis.add(self.sourceFileEdit,self.__tr("<b>Source Files</b>\n"
"<p>Enter the name of files to add to the current project separated\n"
"by the path separator. You may select them with a dialog by pressing \n"
"the button to the right.</p>"))
        self.sourcecodeCheckBox.setText(self.__tr("Is source&code files"))
        self.sourcecodeCheckBox.setAccel(self.__tr("Alt+C"))
        QToolTip.add(self.sourcecodeCheckBox,self.__tr("Select, if the files should be added as sourcecode (overriding automatic detection)"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


    def handleDirDialog(self):
        print "AddFileForm.handleDirDialog(): Not implemented yet"

    def handleFileDialog(self):
        print "AddFileForm.handleFileDialog(): Not implemented yet"

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

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

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