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

# Form implementation generated from reading ui file '/home/detlev/Development/Python/Eric/eric3_9/eric3/UI/TaskPropertiesForm.ui'
#
# Created: So Nov 27 16:13:13 2005
#      by: The PyQt User Interface Compiler (pyuic) 3.15
#
# WARNING! All changes made in this file will be lost!


import sys
from qt import *


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

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


        TaskPropertiesFormLayout = QGridLayout(self,1,1,6,6,"TaskPropertiesFormLayout")

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

        TaskPropertiesFormLayout.addWidget(self.textLabel1,0,0)

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

        TaskPropertiesFormLayout.addMultiCellWidget(self.descriptionEdit,0,0,1,3)

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

        TaskPropertiesFormLayout.addWidget(self.textLabel2,1,0)

        self.creationLabel = QLabel(self,"creationLabel")
        self.creationLabel.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Preferred,0,0,self.creationLabel.sizePolicy().hasHeightForWidth()))

        TaskPropertiesFormLayout.addMultiCellWidget(self.creationLabel,1,1,1,3)

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

        TaskPropertiesFormLayout.addWidget(self.textLabel4,2,0)

        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)

        TaskPropertiesFormLayout.addMultiCellLayout(layout1,5,5,0,3)

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

        TaskPropertiesFormLayout.addWidget(self.textLabel5,3,0)

        self.filenameEdit = QLineEdit(self,"filenameEdit")
        self.filenameEdit.setFocusPolicy(QLineEdit.NoFocus)
        self.filenameEdit.setReadOnly(1)

        TaskPropertiesFormLayout.addMultiCellWidget(self.filenameEdit,3,3,1,3)

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

        TaskPropertiesFormLayout.addWidget(self.textLabel6,4,0)

        self.linenoEdit = QLineEdit(self,"linenoEdit")
        self.linenoEdit.setFocusPolicy(QLineEdit.NoFocus)
        self.linenoEdit.setReadOnly(1)

        TaskPropertiesFormLayout.addMultiCellWidget(self.linenoEdit,4,4,1,3)

        self.completedCheckBox = QCheckBox(self,"completedCheckBox")
        self.completedCheckBox.setSizePolicy(QSizePolicy(QSizePolicy.Expanding,QSizePolicy.Fixed,0,0,self.completedCheckBox.sizePolicy().hasHeightForWidth()))

        TaskPropertiesFormLayout.addWidget(self.completedCheckBox,2,3)

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

        TaskPropertiesFormLayout.addWidget(self.projectCheckBox,2,2)

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

        TaskPropertiesFormLayout.addWidget(self.priorityCombo,2,1)

        self.languageChange()

        self.resize(QSize(579,165).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.setTabOrder(self.descriptionEdit,self.priorityCombo)
        self.setTabOrder(self.priorityCombo,self.completedCheckBox)
        self.setTabOrder(self.completedCheckBox,self.okButton)
        self.setTabOrder(self.okButton,self.cancelButton)

        self.textLabel1.setBuddy(self.descriptionEdit)
        self.textLabel4.setBuddy(self.priorityCombo)


    def languageChange(self):
        self.setCaption(self.__tr("Task Properties"))
        self.textLabel1.setText(self.__tr("&Description:"))
        QToolTip.add(self.descriptionEdit,self.__tr("Enter the task description"))
        self.textLabel2.setText(self.__tr("Creation Time:"))
        self.textLabel4.setText(self.__tr("&Priority:"))
        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"))
        self.textLabel5.setText(self.__tr("Filename:"))
        self.textLabel6.setText(self.__tr("Line:"))
        self.completedCheckBox.setText(self.__tr("T&ask completed"))
        self.completedCheckBox.setAccel(self.__tr("Alt+A"))
        QToolTip.add(self.completedCheckBox,self.__tr("Select to mark this task as completed"))
        self.projectCheckBox.setText(self.__tr("Project &Task"))
        self.projectCheckBox.setAccel(self.__tr("Alt+T"))
        QToolTip.add(self.projectCheckBox,self.__tr("Select to indicate a task related to the current project"))
        self.priorityCombo.clear()
        self.priorityCombo.insertItem(self.__tr("High"))
        self.priorityCombo.insertItem(self.__tr("Normal"))
        self.priorityCombo.insertItem(self.__tr("Low"))
        self.priorityCombo.setCurrentItem(1)
        QToolTip.add(self.priorityCombo,self.__tr("Select the task priority"))


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

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