#include <task.h>
Inherits TQObject, and TQListViewItem.
|
|
void | totalTimesChanged (long minutesSession, long minutes) |
| |
| void | deletingTask (Task *thisTask) |
| |
|
| | Task (const TQString &taskame, long minutes, long sessionTime, DesktopList desktops, TaskView *parent=0) |
| |
| | Task (const TQString &taskame, long minutes, long sessionTime, DesktopList desktops, Task *parent=0) |
| |
| | Task (KCal::Todo *incident, TaskView *parent) |
| |
| Task * | firstChild () const |
| |
| Task * | nextSibling () const |
| |
| Task * | parent () const |
| |
| TaskView * | taskView () const |
| |
| TQString | uid () const |
| |
| void | setUid (const TQString uid) |
| |
| void | cut () |
| |
| void | move (Task *destination) |
| |
| void | paste (Task *destination) |
| |
| int | compare (TQListViewItem *i, int col, bool ascending) const |
| |
| void | changeTime (long minutes, KarmStorage *storage) |
| |
| void | changeTimes (long minutesSession, long minutes, KarmStorage *storage=0) |
| |
| void | changeTotalTimes (long minutesSession, long minutes) |
| |
| void | resetTimes () |
| |
| long | time () const |
| |
| long | totalTime () const |
| |
| long | sessionTime () const |
| |
| long | totalSessionTime () const |
| |
| TQDateTime | startTime () const |
| |
| void | startNewSession () |
| |
| void | setDesktopList (DesktopList dl) |
| |
| DesktopList | getDesktops () const |
| |
| TQString | getDesktopStr () const |
| |
| void | setName (const TQString &name, KarmStorage *storage) |
| |
| TQString | name () const |
| |
| TQString | fullName () const |
| |
| void | update () |
| |
| void | setRunning (bool on, KarmStorage *storage, TQDateTime whenStarted=TQDateTime::currentDateTime(), TQDateTime whenStopped=TQDateTime::currentDateTime()) |
| |
| bool | isRunning () const |
| |
| bool | parseIncidence (KCal::Incidence *, long &minutes, long &sessionMinutes, TQString &name, DesktopList &desktops, int &percent_complete) |
| |
| KCal::Todo * | asTodo (KCal::Todo *calendar) const |
| |
| void | addComment (TQString comment, KarmStorage *storage) |
| |
| TQString | comment () const |
| |
| bool | isRoot () const |
| |
| bool | remove (TQPtrList< Task > &activeTasks, KarmStorage *storage) |
| |
| void | setPercentComplete (const int percent, KarmStorage *storage) |
| |
| void | setPixmapProgress () |
| |
| bool | isComplete () |
| |
| void | removeFromView () |
| |
| TQDateTime | lastStart () |
| |
A class representing a task.
A "Task" object stores information about a task such as it's name, total and session times.
It can log when the task is started, stoped or deleted.
If a task is associated with some desktop's activity it can remember that too.
It can also contain subtasks - these are managed using the TQListViewItem class.
Definition at line 41 of file task.h.
◆ Task() [1/3]
| Task::Task |
( |
const TQString & |
taskame, |
|
|
long |
minutes, |
|
|
long |
sessionTime, |
|
|
DesktopList |
desktops, |
|
|
TaskView * |
parent = 0 |
|
) |
| |
◆ Task() [2/3]
| Task::Task |
( |
const TQString & |
taskame, |
|
|
long |
minutes, |
|
|
long |
sessionTime, |
|
|
DesktopList |
desktops, |
|
|
Task * |
parent = 0 |
|
) |
| |
◆ Task() [3/3]
| Task::Task |
( |
KCal::Todo * |
incident, |
|
|
TaskView * |
parent |
|
) |
| |
◆ ~Task()
◆ addComment()
| void Task::addComment |
( |
TQString |
comment, |
|
|
KarmStorage * |
storage |
|
) |
| |
Add a comment to this task.
Definition at line 420 of file task.cpp.
◆ asTodo()
| KCal::Todo * Task::asTodo |
( |
KCal::Todo * |
calendar | ) |
const |
Load the todo passed in with this tasks info.
Definition at line 296 of file task.cpp.
◆ changeParentTotalTimes()
| void Task::changeParentTotalTimes |
( |
long |
minutesSession, |
|
|
long |
minutes |
|
) |
| |
|
protected |
◆ changeTime()
| void Task::changeTime |
( |
long |
minutes, |
|
|
KarmStorage * |
storage |
|
) |
| |
Change task time.
Adds minutes to both total time and session time.
- Parameters
-
| minutes | minutes to add to - may be negative |
| storage | Pointer to KarmStorage instance. If zero, don't save changes. |
Definition at line 208 of file task.cpp.
◆ changeTimes()
| void Task::changeTimes |
( |
long |
minutesSession, |
|
|
long |
minutes, |
|
|
KarmStorage * |
storage = 0 |
|
) |
| |
Add minutes to time and session time, and write to storage.
- Parameters
-
| minutesSession | minutes to add to task session time |
| minutes | minutes to add to task time |
| storage | Pointer to KarmStorage instance. If zero, don't save changes. |
Definition at line 213 of file task.cpp.
◆ changeTotalTimes()
| void Task::changeTotalTimes |
( |
long |
minutesSession, |
|
|
long |
minutes |
|
) |
| |
adds minutes to total and session time
- Parameters
-
| minutesSession | minutes to add to task total session time |
| minutes | minutes to add to task total time |
Definition at line 224 of file task.cpp.
◆ comment()
| TQString Task::comment |
( |
| ) |
const |
Retrieve the entire comment for the task.
Definition at line 426 of file task.cpp.
◆ compare()
| int Task::compare |
( |
TQListViewItem * |
i, |
|
|
int |
col, |
|
|
bool |
ascending |
|
) |
| const |
Sort times numerically, not alphabetically.
Definition at line 431 of file task.cpp.
◆ cut()
◆ deletingTask
| void Task::deletingTask |
( |
Task * |
thisTask | ) |
|
|
signal |
signal that we're about to delete a task
◆ firstChild()
| Task * Task::firstChild |
( |
| ) |
const |
|
inline |
return parent Task or null in case of TaskView.
same as TQListViewItem::parent()
Definition at line 60 of file task.h.
◆ fullName()
| TQString Task::fullName |
( |
| ) |
const |
Returns that task name, prefixed by parent tree up to root.
Task names are seperated by a forward slash: /
Definition at line 288 of file task.cpp.
◆ getDesktops()
| DesktopList Task::getDesktops |
( |
| ) |
const |
|
inline |
◆ getDesktopStr()
| TQString Task::getDesktopStr |
( |
| ) |
const |
◆ isComplete()
| bool Task::isComplete |
( |
| ) |
|
Return true if task is complete (percent complete equals 100).
Definition at line 194 of file task.cpp.
◆ isRoot()
| bool Task::isRoot |
( |
| ) |
const |
|
inline |
tells you whether this task is the root of the task tree
Definition at line 209 of file task.h.
◆ isRunning()
| bool Task::isRunning |
( |
| ) |
const |
return the state of a task - if it's running or not
- Returns
- true or false depending on whether the task is running
Definition at line 132 of file task.cpp.
◆ lastStart()
| TQDateTime Task::lastStart |
( |
| ) |
|
|
inline |
delivers when the task was started last
Definition at line 238 of file task.h.
◆ move()
| void Task::move |
( |
Task * |
destination | ) |
|
◆ name()
| TQString Task::name |
( |
| ) |
const |
|
inline |
returns the name of this task.
- Returns
- a pointer to the name.
Definition at line 162 of file task.h.
◆ nextSibling()
| Task * Task::nextSibling |
( |
| ) |
const |
|
inline |
◆ parent()
| Task * Task::parent |
( |
| ) |
const |
|
inline |
◆ parseIncidence()
| bool Task::parseIncidence |
( |
KCal::Incidence * |
incident, |
|
|
long & |
minutes, |
|
|
long & |
sessionMinutes, |
|
|
TQString & |
name, |
|
|
DesktopList & |
desktops, |
|
|
int & |
percent_complete |
|
) |
| |
◆ paste()
| void Task::paste |
( |
Task * |
destination | ) |
|
◆ remove()
| bool Task::remove |
( |
TQPtrList< Task > & |
activeTasks, |
|
|
KarmStorage * |
storage |
|
) |
| |
remove Task with all it's children
- Parameters
-
| activeTasks | - list of aktive tasks |
| storage | a pointer to a KarmStorage object. |
Definition at line 258 of file task.cpp.
◆ removeFromView()
| void Task::removeFromView |
( |
| ) |
|
Remove current task and all it's children from the view.
Definition at line 196 of file task.cpp.
◆ resetTimes()
| void Task::resetTimes |
( |
| ) |
|
Reset all times to 0.
Definition at line 236 of file task.cpp.
◆ sessionTime()
| long Task::sessionTime |
( |
| ) |
const |
|
inline |
◆ setDesktopList()
| void Task::setDesktopList |
( |
DesktopList |
dl | ) |
|
◆ setName()
| void Task::setName |
( |
const TQString & |
name, |
|
|
KarmStorage * |
storage |
|
) |
| |
sets the name of the task
- Parameters
-
| name | a pointer to the name. A deep copy will be made. |
| storage | a pointer to a KarmStorage object. |
Definition at line 137 of file task.cpp.
◆ setPercentComplete()
| void Task::setPercentComplete |
( |
const int |
percent, |
|
|
KarmStorage * |
storage |
|
) |
| |
Update percent complete for this task.
Tasks that are complete (i.e., percent = 100) do not show up in taskview. If percent NULL, set to zero. If greater than 100, set to
- If less than zero, set to zero.
Definition at line 149 of file task.cpp.
◆ setPixmapProgress()
| void Task::setPixmapProgress |
( |
| ) |
|
Sets an appropriate icon for this task based on its level of completion.
Definition at line 184 of file task.cpp.
◆ setRunning()
| void Task::setRunning |
( |
bool |
on, |
|
|
KarmStorage * |
storage, |
|
|
TQDateTime |
whenStarted = TQDateTime::currentDateTime(), |
|
|
TQDateTime |
whenStopped = TQDateTime::currentDateTime() |
|
) |
| |
starts or stops a task
- Parameters
-
| on | true or false for starting or stopping a task |
| storage | a pointer to a KarmStorage object. |
| whenStarted | time when the task was started. Normally TQDateTime::currentDateTime, but if calendar has been changed by another program and being reloaded the task is set to running with another start date |
Definition at line 97 of file task.cpp.
◆ setUid()
| void Task::setUid |
( |
const TQString |
uid | ) |
|
Set unique id for the task.
The uid is the key used to update the storage.
- Parameters
-
Definition at line 128 of file task.cpp.
◆ startNewSession()
| void Task::startNewSession |
( |
| ) |
|
|
inline |
sets session time to zero.
Definition at line 140 of file task.h.
◆ startTime()
| TQDateTime Task::startTime |
( |
| ) |
const |
|
inline |
Return time the task was started.
Definition at line 137 of file task.h.
◆ taskView()
Return task view for this task.
Definition at line 65 of file task.h.
◆ time()
| long Task::time |
( |
| ) |
const |
|
inline |
◆ totalSessionTime()
| long Task::totalSessionTime |
( |
| ) |
const |
|
inline |
◆ totalTime()
| long Task::totalTime |
( |
| ) |
const |
|
inline |
◆ uid()
| TQString Task::uid |
( |
| ) |
const |
|
inline |
Return unique iCalendar Todo ID for this task.
Definition at line 70 of file task.h.
◆ update()
Update the display of the task (all columns) in the UI.
Definition at line 411 of file task.cpp.
◆ updateActiveIcon
| void Task::updateActiveIcon |
( |
| ) |
|
|
protectedslot |
animate the active icon
Definition at line 282 of file task.cpp.
The documentation for this class was generated from the following files:
|