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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_6/eric3/Wizards/FileDialogWizard/FileDialogWizardForm.ui'
#
# Created: Do Dez 30 14:12:35 2004
#      by: The PyQt User Interface Compiler (pyuic) snapshot-20041229
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

        self.ButtonGroup2 = QButtonGroup(self,"ButtonGroup2")
        self.ButtonGroup2.setColumnLayout(0,Qt.Vertical)
        self.ButtonGroup2.layout().setSpacing(6)
        self.ButtonGroup2.layout().setMargin(6)
        ButtonGroup2Layout = QHBoxLayout(self.ButtonGroup2.layout())
        ButtonGroup2Layout.setAlignment(Qt.AlignTop)

        self.rOpenFile = QRadioButton(self.ButtonGroup2,"rOpenFile")
        self.rOpenFile.setChecked(1)
        ButtonGroup2Layout.addWidget(self.rOpenFile)

        self.rOpenFiles = QRadioButton(self.ButtonGroup2,"rOpenFiles")
        self.rOpenFiles.setFocusPolicy(QRadioButton.TabFocus)
        ButtonGroup2Layout.addWidget(self.rOpenFiles)

        self.rSaveFile = QRadioButton(self.ButtonGroup2,"rSaveFile")
        self.rSaveFile.setFocusPolicy(QRadioButton.TabFocus)
        ButtonGroup2Layout.addWidget(self.rSaveFile)

        self.rDirectory = QRadioButton(self.ButtonGroup2,"rDirectory")
        self.rDirectory.setFocusPolicy(QRadioButton.TabFocus)
        ButtonGroup2Layout.addWidget(self.rDirectory)
        FileDialogWizardFormLayout.addWidget(self.ButtonGroup2)

        self.TextLabel1 = QLabel(self,"TextLabel1")
        FileDialogWizardFormLayout.addWidget(self.TextLabel1)

        self.eCaption = QLineEdit(self,"eCaption")
        FileDialogWizardFormLayout.addWidget(self.eCaption)

        self.cSymlinks = QCheckBox(self,"cSymlinks")
        self.cSymlinks.setChecked(1)
        FileDialogWizardFormLayout.addWidget(self.cSymlinks)

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

        self.TextLabel3 = QLabel(self.GroupBox3,"TextLabel3")

        GroupBox3Layout.addWidget(self.TextLabel3,0,0)

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

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

        self.cStartWith = QCheckBox(self.GroupBox3,"cStartWith")

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

        self.TextLabel2 = QLabel(self.GroupBox3,"TextLabel2")

        GroupBox3Layout.addMultiCellWidget(self.TextLabel2,2,2,0,1)

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

        GroupBox3Layout.addMultiCellWidget(self.eFilters,3,3,0,1)
        FileDialogWizardFormLayout.addWidget(self.GroupBox3)

        self.GroupBox4 = QGroupBox(self,"GroupBox4")
        self.GroupBox4.setEnabled(0)
        self.GroupBox4.setColumnLayout(0,Qt.Vertical)
        self.GroupBox4.layout().setSpacing(6)
        self.GroupBox4.layout().setMargin(11)
        GroupBox4Layout = QGridLayout(self.GroupBox4.layout())
        GroupBox4Layout.setAlignment(Qt.AlignTop)

        self.cWorkDir = QCheckBox(self.GroupBox4,"cWorkDir")

        GroupBox4Layout.addWidget(self.cWorkDir,1,1)

        self.eWorkDir = QLineEdit(self.GroupBox4,"eWorkDir")

        GroupBox4Layout.addWidget(self.eWorkDir,1,0)

        self.TextLabel4 = QLabel(self.GroupBox4,"TextLabel4")

        GroupBox4Layout.addMultiCellWidget(self.TextLabel4,0,0,0,1)

        self.cDirOnly = QCheckBox(self.GroupBox4,"cDirOnly")
        self.cDirOnly.setChecked(1)

        GroupBox4Layout.addMultiCellWidget(self.cDirOnly,2,2,0,1)
        FileDialogWizardFormLayout.addWidget(self.GroupBox4)

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

        self.PushButton7 = QPushButton(self,"PushButton7")
        Layout7.addWidget(self.PushButton7)

        self.PushButton8 = QPushButton(self,"PushButton8")
        Layout7.addWidget(self.PushButton8)

        self.PushButton9 = QPushButton(self,"PushButton9")
        self.PushButton9.setDefault(1)
        Layout7.addWidget(self.PushButton9)
        Spacer6 = QSpacerItem(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout7.addItem(Spacer6)
        FileDialogWizardFormLayout.addLayout(Layout7)

        self.languageChange()

        self.resize(QSize(529,378).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.PushButton7,SIGNAL("clicked()"),self.accept)
        self.connect(self.PushButton8,SIGNAL("clicked()"),self.reject)
        self.connect(self.PushButton9,SIGNAL("clicked()"),self.testDlg)
        self.connect(self.rOpenFile,SIGNAL("toggled(bool)"),self.GroupBox3.setEnabled)
        self.connect(self.rOpenFiles,SIGNAL("toggled(bool)"),self.GroupBox3.setEnabled)
        self.connect(self.rOpenFile,SIGNAL("toggled(bool)"),self.GroupBox4.setDisabled)
        self.connect(self.rOpenFiles,SIGNAL("toggled(bool)"),self.GroupBox4.setDisabled)
        self.connect(self.rSaveFile,SIGNAL("toggled(bool)"),self.GroupBox3.setEnabled)
        self.connect(self.rSaveFile,SIGNAL("toggled(bool)"),self.GroupBox4.setDisabled)
        self.connect(self.rDirectory,SIGNAL("toggled(bool)"),self.GroupBox3.setDisabled)
        self.connect(self.rDirectory,SIGNAL("toggled(bool)"),self.GroupBox4.setEnabled)
        self.connect(self.cStartWith,SIGNAL("toggled(bool)"),self.PushButton9.setDisabled)
        self.connect(self.cWorkDir,SIGNAL("toggled(bool)"),self.PushButton9.setDisabled)

        self.setTabOrder(self.rOpenFile,self.rOpenFiles)
        self.setTabOrder(self.rOpenFiles,self.rSaveFile)
        self.setTabOrder(self.rSaveFile,self.rDirectory)
        self.setTabOrder(self.rDirectory,self.eCaption)
        self.setTabOrder(self.eCaption,self.cSymlinks)
        self.setTabOrder(self.cSymlinks,self.eStartWith)
        self.setTabOrder(self.eStartWith,self.cStartWith)
        self.setTabOrder(self.cStartWith,self.eFilters)
        self.setTabOrder(self.eFilters,self.eWorkDir)
        self.setTabOrder(self.eWorkDir,self.cWorkDir)
        self.setTabOrder(self.cWorkDir,self.cDirOnly)
        self.setTabOrder(self.cDirOnly,self.PushButton9)
        self.setTabOrder(self.PushButton9,self.PushButton7)
        self.setTabOrder(self.PushButton7,self.PushButton8)


    def languageChange(self):
        self.setCaption(self.__tr("QFileDialog Wizard"))
        self.ButtonGroup2.setTitle(self.__tr("Type"))
        self.rOpenFile.setText(self.__tr("Open File"))
        QToolTip.add(self.rOpenFile,self.__tr("Select to create an 'Open File' dialog"))
        self.rOpenFiles.setText(self.__tr("Open Files"))
        QToolTip.add(self.rOpenFiles,self.__tr("Select to create an 'Open Files' dialog"))
        self.rSaveFile.setText(self.__tr("Save File"))
        QToolTip.add(self.rSaveFile,self.__tr("Select to create a 'Save File' dialog"))
        self.rDirectory.setText(self.__tr("Select Directory"))
        QToolTip.add(self.rDirectory,self.__tr("Select to create a 'Select Directory' dialog"))
        self.TextLabel1.setText(self.__tr("Caption"))
        QToolTip.add(self.eCaption,self.__tr("Enter the caption text"))
        self.cSymlinks.setText(self.__tr("Resolve Symlinks"))
        QToolTip.add(self.cSymlinks,self.__tr("Check to resolve symbolic links"))
        self.GroupBox3.setTitle(self.__tr("File Dialog Properties"))
        self.TextLabel3.setText(self.__tr("Start With / Working Directory"))
        QToolTip.add(self.eStartWith,self.__tr("Enter the working directory or a filename"))
        self.cStartWith.setText(self.__tr("Is Variable"))
        QToolTip.add(self.cStartWith,self.__tr("Check this if the contents of the edit names a variable or variable function"))
        self.TextLabel2.setText(self.__tr("Filters"))
        QToolTip.add(self.eFilters,self.__tr("Enter the filter specifications separated by ';;'"))
        self.GroupBox4.setTitle(self.__tr("Directory Dialog Properties"))
        self.cWorkDir.setText(self.__tr("Is Variable"))
        QToolTip.add(self.cWorkDir,self.__tr("Check this if the contents of the edit names a variable or variable function"))
        QToolTip.add(self.eWorkDir,self.__tr("Enter the working directory"))
        self.TextLabel4.setText(self.__tr("Working Directory"))
        self.cDirOnly.setText(self.__tr("Show Directories Only"))
        QToolTip.add(self.cDirOnly,self.__tr("Check to display directories only"))
        self.PushButton7.setText(self.__tr("&OK"))
        self.PushButton8.setText(self.__tr("&Cancel"))
        self.PushButton9.setText(self.__tr("&Test"))


    def testDlg(self):
        print "FileDialogWizardForm.testDlg(): Not implemented yet"

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

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