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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_7/eric3/Project/PropertiesForm.ui'
#
# Created: Mo Apr 4 22:04:48 2005
#      by: The PyQt User Interface Compiler (pyuic) 3.14
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


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

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

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

        layout6.addWidget(self.authorLabel,8,0)

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

        layout6.addWidget(self.mainscriptButton,6,2)

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

        layout6.addWidget(self.dirButton,4,2)

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

        layout6.addWidget(self.dirLabel,4,0)

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

        layout6.addWidget(self.nameEdit,0,1)

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

        layout6.addWidget(self.transPrefixButton,7,2)

        self.descriptionEdit = QTextEdit(self,"descriptionEdit")
        self.descriptionEdit.setTextFormat(QTextEdit.PlainText)

        layout6.addWidget(self.descriptionEdit,10,1)

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

        layout6.addWidget(self.textLabel1_3,7,0)

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

        layout6.addWidget(self.transPrefixEdit,7,1)

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

        layout6.addWidget(self.mainscriptEdit,6,1)

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

        layout6.addWidget(self.dirEdit,4,1)

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

        layout6.addWidget(self.textLabel1,1,0)

        self.descriptionLabel = QLabel(self,"descriptionLabel")
        self.descriptionLabel.setAlignment(QLabel.AlignTop)

        layout6.addWidget(self.descriptionLabel,10,0)

        self.mixedLanguageCheckBox = QCheckBox(self,"mixedLanguageCheckBox")

        layout6.addWidget(self.mixedLanguageCheckBox,2,1)

        self.uiTypeComboBox = QComboBox(0,self,"uiTypeComboBox")

        layout6.addWidget(self.uiTypeComboBox,3,1)

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

        layout6.addWidget(self.authorEdit,8,1)

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

        layout6.addWidget(self.versionEdit,5,1)

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

        layout6.addWidget(self.emailEdit,9,1)

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

        layout6.addWidget(self.versionLabel,5,0)

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

        layout6.addWidget(self.textLabel1_2,3,0)

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

        layout6.addWidget(self.emailLabel,9,0)

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

        layout6.addWidget(self.nameLabel,0,0)

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

        layout6.addWidget(self.mainscriptLabel,6,0)

        self.languageComboBox = QComboBox(0,self,"languageComboBox")

        layout6.addWidget(self.languageComboBox,1,1)
        PropertiesFormLayout.addLayout(layout6)

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

        self.vcsLabel = QLabel(self,"vcsLabel")
        self.vcsLabel.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.Preferred,0,0,self.vcsLabel.sizePolicy().hasHeightForWidth()))
        layout9.addWidget(self.vcsLabel)

        self.vcsInfoButton = QPushButton(self,"vcsInfoButton")
        layout9.addWidget(self.vcsInfoButton)
        PropertiesFormLayout.addLayout(layout9)

        Layout1 = QHBoxLayout(None,0,6,"Layout1")
        Spacer1 = QSpacerItem(30,0,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(30,0,QSizePolicy.Expanding,QSizePolicy.Minimum)
        Layout1.addItem(Spacer2)
        PropertiesFormLayout.addLayout(Layout1)

        self.languageChange()

        self.resize(QSize(481,502).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.dirButton,SIGNAL("clicked()"),self.handleDirDialog)
        self.connect(self.mainscriptButton,SIGNAL("clicked()"),self.handleFileDialog)
        self.connect(self.vcsInfoButton,SIGNAL("clicked()"),self.handleShowVcsInfo)
        self.connect(self.transPrefixButton,SIGNAL("clicked()"),self.handleTransPrefixDialog)

        self.setTabOrder(self.nameEdit,self.languageComboBox)
        self.setTabOrder(self.languageComboBox,self.mixedLanguageCheckBox)
        self.setTabOrder(self.mixedLanguageCheckBox,self.uiTypeComboBox)
        self.setTabOrder(self.uiTypeComboBox,self.dirEdit)
        self.setTabOrder(self.dirEdit,self.dirButton)
        self.setTabOrder(self.dirButton,self.versionEdit)
        self.setTabOrder(self.versionEdit,self.mainscriptEdit)
        self.setTabOrder(self.mainscriptEdit,self.mainscriptButton)
        self.setTabOrder(self.mainscriptButton,self.authorEdit)
        self.setTabOrder(self.authorEdit,self.emailEdit)
        self.setTabOrder(self.emailEdit,self.descriptionEdit)
        self.setTabOrder(self.descriptionEdit,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)
        self.setTabOrder(self.cancelButton,self.vcsInfoButton)

        self.authorLabel.setBuddy(self.authorEdit)
        self.dirLabel.setBuddy(self.dirLabel)
        self.textLabel1_3.setBuddy(self.transPrefixEdit)
        self.textLabel1.setBuddy(self.languageComboBox)
        self.descriptionLabel.setBuddy(self.descriptionEdit)
        self.versionLabel.setBuddy(self.versionEdit)
        self.textLabel1_2.setBuddy(self.uiTypeComboBox)
        self.emailLabel.setBuddy(self.emailEdit)
        self.nameLabel.setBuddy(self.nameEdit)
        self.mainscriptLabel.setBuddy(self.mainscriptLabel)


    def languageChange(self):
        self.setCaption(self.__tr("Project Properties"))
        QWhatsThis.add(self,self.__tr("<b>Project Properties Dialog</b>\n"
"<p>This dialog is used to show and edit the projects properties.</p>\n"
"<p>If the project is controlled by a version control system, the \"Show Repository Info\" button displays information about the repository.</p>"))
        self.authorLabel.setText(self.__tr("&Author:"))
        self.mainscriptButton.setText(self.__tr("..."))
        QToolTip.add(self.mainscriptButton,self.__tr("Show file selection dialog"))
        QWhatsThis.add(self.mainscriptButton,self.__tr("<b>Main Script</b>\n"
"<p>Select the projects main script via a file selection dialog.</p>"))
        self.dirButton.setText(self.__tr("..."))
        QToolTip.add(self.dirButton,self.__tr("Show directory selection dialog"))
        QWhatsThis.add(self.dirButton,self.__tr("<b>Project Directory</b>\n"
"<p>Select a project directory via a directory selection dialog.</p>"))
        self.dirLabel.setText(self.__tr("Project &Directory:"))
        QToolTip.add(self.nameEdit,self.__tr("Enter the project name"))
        QWhatsThis.add(self.nameEdit,self.__tr("<b>Project Name</b>\n"
"<p>Enter the project name</p>"))
        self.transPrefixButton.setText(self.__tr("..."))
        QToolTip.add(self.transPrefixButton,self.__tr("Show directory selection dialog"))
        QWhatsThis.add(self.transPrefixButton,self.__tr("<b>Translation Prefix</b>\n"
"<p>Select a translation directory via a directory selection dialog.</p>"))
        QToolTip.add(self.descriptionEdit,self.__tr("Enter description"))
        QWhatsThis.add(self.descriptionEdit,self.__tr("<b>Description</b>\n"
"<p>Enter a short description for the project.</p>"))
        self.textLabel1_3.setText(self.__tr("&Translation Prefix:"))
        QToolTip.add(self.transPrefixEdit,self.__tr("Enter the path and prefix for the translation files"))
        QWhatsThis.add(self.transPrefixEdit,self.__tr("<b>Translation Prefix</b>\n"
"<p>Enter the directory for the translation files and their prefix (e.g. /path_to_eric/eric). This will result in translation files like /path_to_eric/eric_de.ts.</p>"))
        QToolTip.add(self.mainscriptEdit,self.__tr("Enter the main script"))
        QWhatsThis.add(self.mainscriptEdit,self.__tr("<b>Main Script</b>\n"
"<p>Enter the main script of the project. You may select it\n"
" with a dialog by pressing the button to the right.</p>"))
        QToolTip.add(self.dirEdit,self.__tr("Enter the project directory"))
        QWhatsThis.add(self.dirEdit,self.__tr("<b>Project Directory</b>\n"
"<p>Enter the project directory. You may select it\n"
" with a dialog by pressing the button to the right.</p>"))
        self.textLabel1.setText(self.__tr("Progr. &Language:"))
        self.descriptionLabel.setText(self.__tr("&Description:"))
        self.mixedLanguageCheckBox.setText(self.__tr("Mi&xed programming languages"))
        self.mixedLanguageCheckBox.setAccel(self.__tr("Alt+X"))
        QToolTip.add(self.mixedLanguageCheckBox,self.__tr("Select, if the project uses other programming languages as well"))
        QToolTip.add(self.uiTypeComboBox,self.__tr("Select the type of UI of the project"))
        QToolTip.add(self.authorEdit,self.__tr("Enter authors name"))
        QWhatsThis.add(self.authorEdit,self.__tr("<b>Author</b>\n"
"<p>Enter the name of the author.</p>"))
        QToolTip.add(self.versionEdit,self.__tr("Enter the version number"))
        QWhatsThis.add(self.versionEdit,self.__tr("<b>Version No.</b>\n"
"<p>Enter the version no.</p>"))
        QToolTip.add(self.emailEdit,self.__tr("Enter authors email"))
        QWhatsThis.add(self.emailEdit,self.__tr("<b>Email</b>\n"
"<p>Enter the email address of the author</p>"))
        self.versionLabel.setText(self.__tr("&Version No.:"))
        self.textLabel1_2.setText(self.__tr("&UI Type"))
        self.emailLabel.setText(self.__tr("&Email:"))
        self.nameLabel.setText(self.__tr("Project &Name:"))
        self.mainscriptLabel.setText(self.__tr("&Main Script:"))
        QToolTip.add(self.languageComboBox,self.__tr("Select the project type (programming language)"))
        self.vcsLabel.setText(QString.null)
        self.vcsInfoButton.setText(self.__tr("Show &Repository Info"))
        self.vcsInfoButton.setAccel(self.__tr("Alt+R"))
        QToolTip.add(self.vcsInfoButton,self.__tr("Press to show information about the repository"))
        self.okButton.setText(self.__tr("&OK"))
        self.cancelButton.setText(self.__tr("&Cancel"))


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

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

    def handleShowVcsInfo(self):
        print "PropertiesForm.handleShowVcsInfo(): Not implemented yet"

    def handleTransPrefixDialog(self):
        print "PropertiesForm.handleTransPrefixDialog(): Not implemented yet"

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

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