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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_8/eric3/Packagers/CxfreezeConfigForm.ui'
#
# Created: Mo Aug 29 21:10:25 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 CxfreezeConfigForm(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

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

        self.setSizeGripEnabled(1)

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

        self.tabWidget2 = QTabWidget(self,"tabWidget2")

        self.tab = QWidget(self.tabWidget2,"tab")
        tabLayout = QGridLayout(self.tab,1,1,6,6,"tabLayout")

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

        tabLayout.addWidget(self.textLabel1,2,0)

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

        tabLayout.addWidget(self.textLabel2,3,0)

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

        tabLayout.addMultiCellWidget(self.basenameCombo,2,2,1,2)

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

        tabLayout.addMultiCellWidget(self.initscriptCombo,3,3,1,2)

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

        tabLayout.addWidget(self.targetDirButton,0,2)

        self.textLabel4 = QLabel(self.tab,"textLabel4")

        tabLayout.addWidget(self.textLabel4,1,0)

        self.targetNameEdit = QLineEdit(self.tab,"targetNameEdit")

        tabLayout.addMultiCellWidget(self.targetNameEdit,1,1,1,2)

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

        tabLayout.addWidget(self.targetDirEdit,0,1)

        self.textLabel3 = QLabel(self.tab,"textLabel3")

        tabLayout.addWidget(self.textLabel3,0,0)

        self.keeppathCheckBox = QCheckBox(self.tab,"keeppathCheckBox")

        tabLayout.addMultiCellWidget(self.keeppathCheckBox,4,4,0,2)

        self.optimizeGroup = QButtonGroup(self.tab,"optimizeGroup")
        self.optimizeGroup.setColumnLayout(0,Qt.Vertical)
        self.optimizeGroup.layout().setSpacing(6)
        self.optimizeGroup.layout().setMargin(6)
        optimizeGroupLayout = QHBoxLayout(self.optimizeGroup.layout())
        optimizeGroupLayout.setAlignment(Qt.AlignTop)

        self.nooptimizeRadioButton = QRadioButton(self.optimizeGroup,"nooptimizeRadioButton")
        self.optimizeGroup.insert( self.nooptimizeRadioButton,0)
        optimizeGroupLayout.addWidget(self.nooptimizeRadioButton)

        self.optimizeRadioButton = QRadioButton(self.optimizeGroup,"optimizeRadioButton")
        self.optimizeGroup.insert( self.optimizeRadioButton,1)
        optimizeGroupLayout.addWidget(self.optimizeRadioButton)

        self.optimizeDocRadioButton = QRadioButton(self.optimizeGroup,"optimizeDocRadioButton")
        self.optimizeGroup.insert( self.optimizeDocRadioButton,2)
        optimizeGroupLayout.addWidget(self.optimizeDocRadioButton)

        tabLayout.addMultiCellWidget(self.optimizeGroup,5,5,0,2)
        self.tabWidget2.insertTab(self.tab,QString.fromLatin1(""))

        self.tab_2 = QWidget(self.tabWidget2,"tab_2")
        tabLayout_2 = QGridLayout(self.tab_2,1,1,6,6,"tabLayout_2")

        self.textLabel1_2 = QLabel(self.tab_2,"textLabel1_2")

        tabLayout_2.addWidget(self.textLabel1_2,0,0)

        self.sharedLibEdit = QLineEdit(self.tab_2,"sharedLibEdit")

        tabLayout_2.addWidget(self.sharedLibEdit,0,1)

        self.textLabel2_2 = QLabel(self.tab_2,"textLabel2_2")

        tabLayout_2.addWidget(self.textLabel2_2,1,0)

        self.defaultPathEdit = QLineEdit(self.tab_2,"defaultPathEdit")

        tabLayout_2.addMultiCellWidget(self.defaultPathEdit,1,1,1,2)

        self.includePathEdit = QLineEdit(self.tab_2,"includePathEdit")

        tabLayout_2.addMultiCellWidget(self.includePathEdit,2,2,1,2)

        self.textLabel3_2 = QLabel(self.tab_2,"textLabel3_2")

        tabLayout_2.addWidget(self.textLabel3_2,2,0)

        self.textLabel4_2 = QLabel(self.tab_2,"textLabel4_2")

        tabLayout_2.addWidget(self.textLabel4_2,3,0)

        self.replacePathsEdit = QLineEdit(self.tab_2,"replacePathsEdit")

        tabLayout_2.addMultiCellWidget(self.replacePathsEdit,3,3,1,2)

        self.textLabel5 = QLabel(self.tab_2,"textLabel5")

        tabLayout_2.addWidget(self.textLabel5,4,0)

        self.includeModulesEdit = QLineEdit(self.tab_2,"includeModulesEdit")

        tabLayout_2.addMultiCellWidget(self.includeModulesEdit,4,4,1,2)

        self.textLabel6 = QLabel(self.tab_2,"textLabel6")

        tabLayout_2.addWidget(self.textLabel6,5,0)

        self.excludeModulesEdit = QLineEdit(self.tab_2,"excludeModulesEdit")

        tabLayout_2.addMultiCellWidget(self.excludeModulesEdit,5,5,1,2)

        self.sharedLibButton = QPushButton(self.tab_2,"sharedLibButton")

        tabLayout_2.addWidget(self.sharedLibButton,0,2)

        self.extListFileButton = QPushButton(self.tab_2,"extListFileButton")

        tabLayout_2.addWidget(self.extListFileButton,6,2)

        self.extListFileEdit = QLineEdit(self.tab_2,"extListFileEdit")

        tabLayout_2.addWidget(self.extListFileEdit,6,1)

        self.textLabel7 = QLabel(self.tab_2,"textLabel7")

        tabLayout_2.addWidget(self.textLabel7,6,0)
        self.tabWidget2.insertTab(self.tab_2,QString.fromLatin1(""))
        CxfreezeConfigFormLayout.addWidget(self.tabWidget2)

        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)
        CxfreezeConfigFormLayout.addLayout(layout1)

        self.languageChange()

        self.resize(QSize(600,272).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.targetDirButton,SIGNAL("clicked()"),self.handleTargetDir)
        self.connect(self.sharedLibButton,SIGNAL("clicked()"),self.handleSharedLib)
        self.connect(self.extListFileButton,SIGNAL("clicked()"),self.handleExtListFile)

        self.setTabOrder(self.targetDirEdit,self.targetDirButton)
        self.setTabOrder(self.targetDirButton,self.targetNameEdit)
        self.setTabOrder(self.targetNameEdit,self.basenameCombo)
        self.setTabOrder(self.basenameCombo,self.initscriptCombo)
        self.setTabOrder(self.initscriptCombo,self.keeppathCheckBox)
        self.setTabOrder(self.keeppathCheckBox,self.nooptimizeRadioButton)
        self.setTabOrder(self.nooptimizeRadioButton,self.optimizeRadioButton)
        self.setTabOrder(self.optimizeRadioButton,self.optimizeDocRadioButton)
        self.setTabOrder(self.optimizeDocRadioButton,self.tabWidget2)
        self.setTabOrder(self.tabWidget2,self.sharedLibEdit)
        self.setTabOrder(self.sharedLibEdit,self.sharedLibButton)
        self.setTabOrder(self.sharedLibButton,self.defaultPathEdit)
        self.setTabOrder(self.defaultPathEdit,self.includePathEdit)
        self.setTabOrder(self.includePathEdit,self.replacePathsEdit)
        self.setTabOrder(self.replacePathsEdit,self.includeModulesEdit)
        self.setTabOrder(self.includeModulesEdit,self.excludeModulesEdit)
        self.setTabOrder(self.excludeModulesEdit,self.extListFileEdit)
        self.setTabOrder(self.extListFileEdit,self.extListFileButton)
        self.setTabOrder(self.extListFileButton,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Cxfreeze Configuration"))
        QWhatsThis.add(self,self.__tr("<b>Cxfreeze Configuration</b>\n"
"<p>This dialog is used to configure the cxfreeze (FreezePython) process in order to create a distribution package for the project.</p>\n"
"<p>All files and directories must be given absolute or relative to the project directory.</p>"))
        self.textLabel1.setText(self.__tr("Base name:"))
        self.textLabel2.setText(self.__tr("Init script:"))
        QToolTip.add(self.basenameCombo,self.__tr("Enter the name of a file on which to base the target file"))
        QToolTip.add(self.initscriptCombo,self.__tr("Enter name of script which will be executed upon startup"))
        self.targetDirButton.setText(self.__tr("..."))
        self.textLabel4.setText(self.__tr("Target name:"))
        QToolTip.add(self.targetNameEdit,self.__tr("Enter the name of the file to create"))
        QWhatsThis.add(self.targetNameEdit,self.__tr("<p>Enter the name of the file to create instead of the base name of the script and the extension of the base binary.</p>"))
        QToolTip.add(self.targetDirEdit,self.__tr("Enter the name of the target directory"))
        QWhatsThis.add(self.targetDirEdit,self.__tr("<p>Enter the name of the directory in which to place the target file and any dependant files.</p>"))
        self.textLabel3.setText(self.__tr("Target directory:"))
        self.keeppathCheckBox.setText(self.__tr("Do not copy dependant files"))
        QToolTip.add(self.keeppathCheckBox,self.__tr("Select to disable copying of dependent files to the target directory"))
        self.optimizeGroup.setTitle(self.__tr("Optimize bytecode"))
        QToolTip.add(self.optimizeGroup,self.__tr("Select to optimize generated bytecode"))
        self.nooptimizeRadioButton.setText(self.__tr("Don't optimize"))
        self.optimizeRadioButton.setText(self.__tr("Optimize"))
        QToolTip.add(self.optimizeRadioButton,self.__tr("Select to optimize the generated bytecode"))
        self.optimizeDocRadioButton.setText(self.__tr("Optimize (with docstring removal)"))
        QToolTip.add(self.optimizeDocRadioButton,self.__tr("Select to optimize the generated bytecode and remove doc strings"))
        self.tabWidget2.changeTab(self.tab,self.__tr("&General"))
        self.textLabel1_2.setText(self.__tr("Shared library name:"))
        QToolTip.add(self.sharedLibEdit,self.__tr("Enter the name of the shared library implementing the Python runtime"))
        self.textLabel2_2.setText(self.__tr("Default path"))
        QToolTip.add(self.textLabel2_2,QString.null)
        QWhatsThis.add(self.textLabel2_2,QString.null)
        QToolTip.add(self.defaultPathEdit,self.__tr("Enter directories to initialize sys.path"))
        QWhatsThis.add(self.defaultPathEdit,self.__tr("<p>Enter a list of paths separated by the standard path separator, which will be used to initialize sys.path prior to running the module finder.</p>"))
        QToolTip.add(self.includePathEdit,self.__tr("Enter directories to modify sys.path"))
        QWhatsThis.add(self.includePathEdit,self.__tr("<p>Enter a list of paths separated by the standard path separator, which will be used to modify sys.path prior to running the module finder.</p>"))
        self.textLabel3_2.setText(self.__tr("Include path"))
        self.textLabel4_2.setText(self.__tr("Replace paths:"))
        QToolTip.add(self.replacePathsEdit,self.__tr("Enter replacement directives"))
        QWhatsThis.add(self.replacePathsEdit,self.__tr("<p>Enter replacement directives used to replace all the paths in modules found. Please see cx_Freeze docu for details.</p>"))
        self.textLabel5.setText(self.__tr("Include modules:"))
        QToolTip.add(self.includeModulesEdit,self.__tr("Enter a comma separated list of modules to include"))
        self.textLabel6.setText(self.__tr("Exclude modules:"))
        QToolTip.add(self.excludeModulesEdit,self.__tr("Enter a comma separated list of modules to exclude"))
        self.sharedLibButton.setText(self.__tr("..."))
        QToolTip.add(self.sharedLibButton,self.__tr("Press to select the Python shared library via a file selection dialog"))
        self.extListFileButton.setText(self.__tr("..."))
        QToolTip.add(self.extListFileButton,self.__tr("Press to select the external list file via a file selection dialog"))
        QToolTip.add(self.extListFileEdit,self.__tr("Enter the name of a file in which to place the list of included modules"))
        self.textLabel7.setText(self.__tr("External list file:"))
        self.tabWidget2.changeTab(self.tab_2,self.__tr("&Advanced"))
        self.okButton.setText(self.__tr("&OK"))
        self.okButton.setAccel(self.__tr("Alt+O"))
        self.cancelButton.setText(self.__tr("&Cancel"))
        self.cancelButton.setAccel(self.__tr("Alt+C"))


    def handleTargetDir(self):
        print "CxfreezeConfigForm.handleTargetDir(): Not implemented yet"

    def handleSharedLib(self):
        print "CxfreezeConfigForm.handleSharedLib(): Not implemented yet"

    def handleExtListFile(self):
        print "CxfreezeConfigForm.handleExtListFile(): Not implemented yet"

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

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