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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3/Project/PropertiesForm.ui'
#
# Created: Mon Jan 20 20:44:56 2003
#      by: The PyQt User Interface Compiler (pyuic)
#
# 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")

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

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

        Layout3.addWidget(self.dirEdit,1,1)

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

        Layout3.addWidget(self.dirLabel,1,0)

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

        Layout3.addMultiCellWidget(self.vcsCheckBox,7,7,0,1)

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

        Layout3.addWidget(self.authorEdit,4,1)

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

        Layout3.addWidget(self.emailLabel,5,0)

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

        Layout3.addWidget(self.mainscriptButton,3,2)

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

        Layout3.addWidget(self.mainscriptEdit,3,1)

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

        Layout3.addWidget(self.versionEdit,2,1)

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

        Layout3.addWidget(self.descriptionEdit,6,1)

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

        Layout3.addWidget(self.emailEdit,5,1)

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

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

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

        Layout3.addWidget(self.versionLabel,2,0)

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

        Layout3.addWidget(self.dirButton,1,2)

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

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

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

        Layout3.addWidget(self.descriptionLabel,6,0)

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

        Layout3.addWidget(self.mainscriptLabel,3,0)

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

        Layout3.addWidget(self.authorLabel,4,0)
        PropertiesFormLayout.addLayout(Layout3)

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

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

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

        self.languageChange()

        self.resize(QSize(481,400).expandedTo(self.minimumSizeHint()))

        self.connect(self.okButton,SIGNAL("clicked()"),self,SLOT("accept()"))
        self.connect(self.cancelButton,SIGNAL("clicked()"),self,SLOT("reject()"))
        self.connect(self.dirButton,SIGNAL("clicked()"),self.handleDirDialog)
        self.connect(self.mainscriptButton,SIGNAL("clicked()"),self.handleFileDialog)

        self.setTabOrder(self.nameEdit,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.vcsCheckBox)
        self.setTabOrder(self.vcsCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.dirLabel.setBuddy(self.dirLabel)
        self.emailLabel.setBuddy(self.emailEdit)
        self.nameLabel.setBuddy(self.nameEdit)
        self.versionLabel.setBuddy(self.versionEdit)
        self.descriptionLabel.setBuddy(self.descriptionEdit)
        self.mainscriptLabel.setBuddy(self.mainscriptLabel)
        self.authorLabel.setBuddy(self.authorEdit)

    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>"))
        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.dirLabel.setText(self.tr("Project &Directory:"))
        self.vcsCheckBox.setText(self.tr("VCS Support"))
        QToolTip.add(self.vcsCheckBox,self.tr("Select whether support of a Version Control System is wanted"))
        QWhatsThis.add(self.vcsCheckBox,self.tr("<b>VCS Support</b> <p>Select this checkbox, if the project should be put under the control of a version control system. If it is selected, another dialog to enter the VCS options will be show upon pressing the \"OK\" button.</p>"))
        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>"))
        self.emailLabel.setText(self.tr("&Email:"))
        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>"))
        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.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.descriptionEdit,self.tr("Enter description"))
        QWhatsThis.add(self.descriptionEdit,self.tr("<b>Description</b>\n"
"<p>Enter a short description for the project.</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.nameLabel.setText(self.tr("Project &Name:"))
        self.versionLabel.setText(self.tr("&Version No.:"))
        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>"))
        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.descriptionLabel.setText(self.tr("&Description:"))
        self.mainscriptLabel.setText(self.tr("&Main Script:"))
        self.authorLabel.setText(self.tr("&Author:"))
        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"


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()
