def __newTask(self):
     """
     Private slot to handle the "New Task" context menu entry.
     """
     dlg = TaskPropertiesDialog(None, self, self.projectOpen)
     if dlg.exec_() == QDialog.Accepted:
         data = dlg.getData()
         self.addTask(data[0], data[1], completed =  data[2], isProjectTask = data[3], 
             longtext = data[4])
 def __editTaskProperties(self):
     """
     Private slot to handle the "Properties" context menu entry
     """
     task = self.currentItem()
     dlg = TaskPropertiesDialog(task, self, self.projectOpen)
     ro = task.getFilename() != ""
     if ro:
         dlg.setReadOnly()
     if dlg.exec_() == QDialog.Accepted and not ro:
         data = dlg.getData()
         task.setDescription(data[0])
         task.setPriority(data[1])
         task.setCompleted(data[2])
         task.setProjectTask(data[3])
         task.setLongText(data[4])