Tasks/TaskPropertiesDialog.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1112
8a7d1b9d18db
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
19 19
20 class TaskPropertiesDialog(QDialog, Ui_TaskPropertiesDialog): 20 class TaskPropertiesDialog(QDialog, Ui_TaskPropertiesDialog):
21 """ 21 """
22 Class implementing the task properties dialog. 22 Class implementing the task properties dialog.
23 """ 23 """
24 def __init__(self, task = None, parent = None, projectOpen = False): 24 def __init__(self, task=None, parent=None, projectOpen=False):
25 """ 25 """
26 Constructor 26 Constructor
27 27
28 @param task the task object to be shown 28 @param task the task object to be shown
29 @param parent the parent widget (QWidget) 29 @param parent the parent widget (QWidget)
37 if not projectOpen: 37 if not projectOpen:
38 self.projectCheckBox.setEnabled(False) 38 self.projectCheckBox.setEnabled(False)
39 if task is not None: 39 if task is not None:
40 self.descriptionEdit.setText(task.description) 40 self.descriptionEdit.setText(task.description)
41 self.longtextEdit.setText(task.longtext) 41 self.longtextEdit.setText(task.longtext)
42 self.creationLabel.setText(time.strftime("%Y-%m-%d, %H:%M:%S", 42 self.creationLabel.setText(time.strftime("%Y-%m-%d, %H:%M:%S",
43 time.localtime(task.created))) 43 time.localtime(task.created)))
44 self.priorityCombo.setCurrentIndex(task.priority) 44 self.priorityCombo.setCurrentIndex(task.priority)
45 self.projectCheckBox.setChecked(task._isProjectTask) 45 self.projectCheckBox.setChecked(task._isProjectTask)
46 self.completedCheckBox.setChecked(task.completed) 46 self.completedCheckBox.setChecked(task.completed)
47 self.filenameEdit.setText(task.filename) 47 self.filenameEdit.setText(task.filename)
64 64
65 @return tuple of description, priority, completion flag, 65 @return tuple of description, priority, completion flag,
66 project flag and long text (string, string, boolean, boolean, string) 66 project flag and long text (string, string, boolean, boolean, string)
67 """ 67 """
68 return (self.descriptionEdit.text(), self.priorityCombo.currentIndex(), 68 return (self.descriptionEdit.text(), self.priorityCombo.currentIndex(),
69 self.completedCheckBox.isChecked(), self.projectCheckBox.isChecked(), 69 self.completedCheckBox.isChecked(), self.projectCheckBox.isChecked(),
70 self.longtextEdit.toPlainText()) 70 self.longtextEdit.toPlainText())

eric ide

mercurial