1
# -*- coding: utf-8 -*-
3
# Copyright (c) 2005 - 2007 Detlev Offenbach <detlev@die-offenbachs.de>
7
Module implementing the task properties dialog.
14
from TaskPropertiesForm import TaskPropertiesForm
17
class TaskPropertiesDialog(TaskPropertiesForm):
19
Class implementing the task properties dialog.
21
def __init__(self, task = None, parent = None, projectOpen = 0):
25
@param task the task object to be shown
26
@param parent the parent widget (QWidget)
27
@param projectOpen flag indicating status of the project (boolean)
29
TaskPropertiesForm.__init__(self, parent, None, 1)
32
self.projectCheckBox.setEnabled(0)
34
self.descriptionEdit.setText(task.description)
35
self.creationLabel.setText(time.strftime("%Y-%m-%d, %H:%M:%S",
36
time.localtime(task.created)))
37
self.priorityCombo.setCurrentItem(task.priority)
38
self.projectCheckBox.setChecked(task._isProjectTask)
39
self.completedCheckBox.setChecked(task.completed)
40
self.filenameEdit.setText(task.filename)
42
self.linenoEdit.setText(str(task.lineno))
44
self.projectCheckBox.setChecked(projectOpen)
46
def setReadOnly(self):
48
Public slot to set the dialog to read only mode.
50
self.descriptionEdit.setReadOnly(1)
51
self.completedCheckBox.setEnabled(0)
52
self.priorityCombo.setEnabled(0)
56
Public method to retrieve the dialogs data.
58
@return tuple of description, priority, completion flag
61
return (self.descriptionEdit.text(), self.priorityCombo.currentItem(),
62
self.completedCheckBox.isChecked(), self.projectCheckBox.isChecked())