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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/DocumentationTools/EricapiConfigForm.ui'
#
# Created: So Aug 21 17:50:37 2005
#      by: The PyQt User Interface Compiler (pyuic) snapshot-20050726
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


class EricapiConfigForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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


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

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

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

        layout14.addWidget(self.outputFileEdit,0,1)

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

        layout14.addWidget(self.outputFileButton,0,2)

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

        layout14.addWidget(self.TextLabel6,0,0)
        EricapiConfigFormLayout.addLayout(layout14)

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

        self.textLabel1_3 = QLabel(self,"textLabel1_3")
        layout6.addWidget(self.textLabel1_3)

        self.sourceExtEdit = QLineEdit(self,"sourceExtEdit")
        layout6.addWidget(self.sourceExtEdit)
        EricapiConfigFormLayout.addLayout(layout6)

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

        self.recursionCheckBox = QCheckBox(self,"recursionCheckBox")
        layout4.addWidget(self.recursionCheckBox)
        spacer13 = QSpacerItem(145,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout4.addItem(spacer13)
        EricapiConfigFormLayout.addLayout(layout4)

        self.GroupBox3 = QGroupBox(self,"GroupBox3")
        self.GroupBox3.setColumnLayout(0,Qt.Vertical)
        self.GroupBox3.layout().setSpacing(6)
        self.GroupBox3.layout().setMargin(6)
        GroupBox3Layout = QGridLayout(self.GroupBox3.layout())
        GroupBox3Layout.setAlignment(Qt.AlignTop)

        self.ignoreDirButton = QPushButton(self.GroupBox3,"ignoreDirButton")
        self.ignoreDirButton.setFocusPolicy(QPushButton.NoFocus)

        GroupBox3Layout.addWidget(self.ignoreDirButton,1,3)

        self.deleteButton = QPushButton(self.GroupBox3,"deleteButton")

        GroupBox3Layout.addWidget(self.deleteButton,1,0)

        self.ignoreDirEdit = QLineEdit(self.GroupBox3,"ignoreDirEdit")

        GroupBox3Layout.addWidget(self.ignoreDirEdit,1,2)

        self.addButton = QPushButton(self.GroupBox3,"addButton")

        GroupBox3Layout.addWidget(self.addButton,1,1)

        self.ignoreDirsListBox = QListBox(self.GroupBox3,"ignoreDirsListBox")

        GroupBox3Layout.addMultiCellWidget(self.ignoreDirsListBox,0,0,0,3)
        EricapiConfigFormLayout.addWidget(self.GroupBox3)

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

        self.okButton = QPushButton(self,"okButton")
        self.okButton.setEnabled(0)
        self.okButton.setDefault(1)
        Layout1.addWidget(self.okButton)

        self.cancelButton = QPushButton(self,"cancelButton")
        Layout1.addWidget(self.cancelButton)
        Spacer2 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout1.addItem(Spacer2)
        EricapiConfigFormLayout.addLayout(Layout1)

        self.languageChange()

        self.resize(QSize(506,488).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.outputFileButton,SIGNAL("clicked()"),self.handleOutputFile)
        self.connect(self.ignoreDirButton,SIGNAL("clicked()"),self.handleIgnoreDir)
        self.connect(self.addButton,SIGNAL("clicked()"),self.handleIgnoreDirAdd)
        self.connect(self.deleteButton,SIGNAL("clicked()"),self.handleIgnoreDirDelete)
        self.connect(self.outputFileEdit,SIGNAL("textChanged(const QString&)"),self.handleFileChanged)

        self.setTabOrder(self.outputFileEdit,self.sourceExtEdit)
        self.setTabOrder(self.sourceExtEdit,self.recursionCheckBox)
        self.setTabOrder(self.recursionCheckBox,self.ignoreDirsListBox)
        self.setTabOrder(self.ignoreDirsListBox,self.ignoreDirEdit)
        self.setTabOrder(self.ignoreDirEdit,self.addButton)
        self.setTabOrder(self.addButton,self.deleteButton)
        self.setTabOrder(self.deleteButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Ericapi Configuration"))
        QToolTip.add(self.outputFileEdit,self.__tr("Enter an output filename"))
        self.outputFileButton.setText(self.__tr("..."))
        QToolTip.add(self.outputFileButton,self.__tr("Press to open a file selection dialog"))
        self.TextLabel6.setText(self.__tr("Output File:"))
        self.textLabel1_3.setText(self.__tr("Additional source extensions:"))
        QToolTip.add(self.sourceExtEdit,self.__tr("Enter additional source extensions separated by a comma"))
        self.recursionCheckBox.setText(self.__tr("Recurse into subdirectories"))
        QToolTip.add(self.recursionCheckBox,self.__tr("Select to recurse into subdirectories"))
        self.GroupBox3.setTitle(self.__tr("Exclude Directories"))
        self.ignoreDirButton.setText(self.__tr("..."))
        QToolTip.add(self.ignoreDirButton,self.__tr("Press to open a directory selection dialog"))
        self.deleteButton.setText(self.__tr("Delete"))
        QToolTip.add(self.deleteButton,self.__tr("Press to delete the selcted directory from the list"))
        QToolTip.add(self.ignoreDirEdit,self.__tr("Enter a directory basename to be ignored"))
        self.addButton.setText(self.__tr("Add"))
        QToolTip.add(self.addButton,self.__tr("Press to add the entered directory to the list"))
        QToolTip.add(self.ignoreDirsListBox,self.__tr("List of directory basenames to be ignored"))
        self.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(self.__tr("Alt+O"))
        self.cancelButton.setText(self.__tr("&Cancel"))


    def handleOutputFile(self):
        print "EricapiConfigForm.handleOutputFile(): Not implemented yet"

    def handleIgnoreDir(self):
        print "EricapiConfigForm.handleIgnoreDir(): Not implemented yet"

    def handleIgnoreDirAdd(self):
        print "EricapiConfigForm.handleIgnoreDirAdd(): Not implemented yet"

    def handleIgnoreDirDelete(self):
        print "EricapiConfigForm.handleIgnoreDirDelete(): Not implemented yet"

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

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

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