eric3.UI.TaskViewer

Module implementing a task viewer and associated classes.

Tasks can be defined manually or automatically. Automatically generated tasks are derived from a comment with a specially introductory text. This text is configurable.

Classes

Task Class implementing the task data structure.
TaskViewer Class implementing the task viewer.

Functions

None


Task

Class implementing the task data structure.

Derived from

QListViewItem

Methods

Task Constructor
getFilename Public method to retrieve the tasks filename.
getLineno Public method to retrieve the tasks linenumber.
isCompleted Public slot to return the completion status.
isProjectTask Public slot to return the project relation status.
setCompleted Public slot to update the completed flag.
setDescription Public slot to update the description.
setPriority Public slot to update the priority.
setProjectTask Public method to set the project relation flag.

Task (Constructor)

Task(parent, description, priority=1, filename="", lineno=0, completed=0, _time=0, isProjectTask=0, ppath="")

Constructor

_time
creation time of the task (float, if 0 use current time)
completed
flag indicating completion status (boolean)
decsription
descriptive text of the task (string or QString)
filename
filename containing the task (string or QString)
isProjectTask
flag indicating a task related to the current project (boolean)
lineno
line number containing the task (integer)
parent
parent widget of the task (QWidget)
ppath
the project path (string or QString)
priority
priority of the task (0=high, 1=normal, 2=low)

Task.getFilename

getFilename()

Public method to retrieve the tasks filename.

Returns:
filename (string)

Task.getLineno

getLineno()

Public method to retrieve the tasks linenumber.

Returns:
linenumber (integer)

Task.isCompleted

isCompleted()

Public slot to return the completion status.

Returns:
flag indicating the completion status (boolean)

Task.isProjectTask

isProjectTask()

Public slot to return the project relation status.

Returns:
flag indicating the project relation status (boolean)

Task.setCompleted

setCompleted(completed)

Public slot to update the completed flag.

completed
flag indicating completion status (boolean)

Task.setDescription

setDescription(description)

Public slot to update the description.

decsription
descriptive text of the task (string or QString)

Task.setPriority

setPriority(priority)

Public slot to update the priority.

priority
priority of the task (0=high, 1=normal, 2=low)

Task.setProjectTask

setProjectTask(pt)

Public method to set the project relation flag.

pt
flag indicating a project task (boolean)

Up


TaskViewer

Class implementing the task viewer.

Signals

displayFile(string, integer)
emitted to go to a file task

Derived from

QListView

Methods

TaskViewer Constructor
addFileTask Public slot to add a file related task.
addTask Public slot to add a task.
clearFileTasks Public slot to clear all task related to a file.
clearProjectTasks Public slot to clear project related tasks.
clearTasks Public slot to clear all tasks from display.
contentsMouseDoubleClickEvent Protected method of QListView.
getGlobalTasks Public method to retrieve all non project related tasks.
getProjectTasks Public method to retrieve all project related tasks.
handleCompleted Private slot to handle the "Mark Completed" context menu entry.
handleContextMenu Private slot to show the context menu of the listview.
handleCopy Private slot to handle the "Copy" context menu entry.
handleDelete Private slot to handle the "Delete Task" context menu entry.
handleDeleteCompleted Private slot to handle the "Delete Completed Tasks" context menu entry.
handleGoTo Private slot to handle the "Go To" context menu entry.
handleNewTask Private slot to handle the "New Task" context menu entry.
handlePaste Private slot to handle the "Paste" context menu entry.
handleProperties Private slot to handle the "Properties" context menu entry
setProjectOpen Public slot to set the project status.

TaskViewer (Constructor)

TaskViewer(parent, project)

Constructor

parent
the parent (QWidget)
project
reference to the project object

TaskViewer.addFileTask

addFileTask(description, filename, lineno)

Public slot to add a file related task.

decsription
descriptive text of the task (string or QString)
filename
filename containing the task (string or QString)
lineno
line number containing the task (integer)

TaskViewer.addTask

addTask(description, priority=1, filename="", lineno=0, completed=0, _time=0, isProjectTask=0)

Public slot to add a task.

_time
creation time of the task (float, if 0 use current time)
completed
flag indicating completion status (boolean)
decsription
descriptive text of the task (string or QString)
filename
filename containing the task (string or QString)
isProjectTask
flag indicating a task related to the current project (boolean)
lineno
line number containing the task (integer)
priority
priority of the task (0=high, 1=normal, 2=low)

TaskViewer.clearFileTasks

clearFileTasks(filename)

Public slot to clear all task related to a file.

filename
name of the file (string or QString)

TaskViewer.clearProjectTasks

clearProjectTasks()

Public slot to clear project related tasks.

TaskViewer.clearTasks

clearTasks()

Public slot to clear all tasks from display.

TaskViewer.contentsMouseDoubleClickEvent

contentsMouseDoubleClickEvent(mouseEvent)

Protected method of QListView. Reimplemented to disable expanding/collapsing of items when double-clicking. Instead the double-clicked entry is opened.

mouseEvent
the mouse event (QMouseEvent)

TaskViewer.getGlobalTasks

getGlobalTasks()

Public method to retrieve all non project related tasks.

Returns:
copy of tasks (list of Task)

TaskViewer.getProjectTasks

getProjectTasks()

Public method to retrieve all project related tasks.

Returns:
copy of tasks (list of Task)

TaskViewer.handleCompleted

handleCompleted()

Private slot to handle the "Mark Completed" context menu entry.

TaskViewer.handleContextMenu

handleContextMenu(itm, coord, col)

Private slot to show the context menu of the listview.

col
the column of the mouse pointer (int)
coord
the position of the mouse pointer (QPoint)
itm
the selected listview item (QListViewItem)

TaskViewer.handleCopy

handleCopy()

Private slot to handle the "Copy" context menu entry.

TaskViewer.handleDelete

handleDelete()

Private slot to handle the "Delete Task" context menu entry.

TaskViewer.handleDeleteCompleted

handleDeleteCompleted()

Private slot to handle the "Delete Completed Tasks" context menu entry.

TaskViewer.handleGoTo

handleGoTo()

Private slot to handle the "Go To" context menu entry.

TaskViewer.handleNewTask

handleNewTask()

Private slot to handle the "New Task" context menu entry.

TaskViewer.handlePaste

handlePaste()

Private slot to handle the "Paste" context menu entry.

TaskViewer.handleProperties

handleProperties()

Private slot to handle the "Properties" context menu entry

TaskViewer.setProjectOpen

setProjectOpen(o=0)

Public slot to set the project status.

o
flag indicating the project status

Up