karm
TaskView Class Reference
#include <taskview.h>
Inheritance diagram for TaskView:

Detailed Description
Container and interface for the tasks.
Definition at line 41 of file taskview.h.
Public Slots | |
QString | save () |
void | startCurrentTimer () |
void | stopCurrentTimer () |
void | stopAllTimers () |
void | newTask () |
void | newTask (QString caption, Task *parent) |
void | refresh () |
void | loadFromFlatFile () |
QString | importPlanner (QString fileName="") |
QString | report (const ReportCriteria &rc) |
void | exportcsvFile () |
QString | exportcsvHistory () |
void | newSubTask () |
void | editTask () |
KarmStorage * | storage () |
void | deleteTask (bool markingascomplete=false) |
void | reinstateTask (int completion) |
void | markTaskAsComplete () |
void | markTaskAsIncomplete () |
void | extractTime (int minutes) |
void | taskTotalTimesChanged (long session, long total) |
void | adaptColumns () |
void | deletingTask (Task *deletedTask) |
void | startTimerFor (Task *task, QDateTime startTime=QDateTime::currentDateTime()) |
void | stopTimerFor (Task *task) |
void | clearActiveTasks () |
void | iCalFileChanged (QString file) |
void | clipTotals () |
void | clipHistory () |
Signals | |
void | totalTimesChanged (long session, long total) |
void | updateButtons () |
void | timersActive () |
void | timersInactive () |
void | tasksChanged (QPtrList< Task > activeTasks) |
Public Member Functions | |
TaskView (QWidget *parent=0, const char *name=0, const QString &icsfile="") | |
virtual | ~TaskView () |
Task * | first_child () const |
Task * | current_item () const |
Task * | item_at_index (int i) |
void | load (QString filename="") |
void | closeStorage () |
void | startNewSession () |
void | resetTimeForAllTasks () |
long | count () |
QValueList< HistoryEvent > | getHistory (const QDate &from, const QDate &to) const |
void | scheduleSave () |
Preferences * | preferences () |
QString | addTask (const QString &taskame, long total, long session, const DesktopList &desktops, Task *parent=0) |
Protected Slots | |
void | autoSaveChanged (bool) |
void | autoSavePeriodChanged (int period) |
void | minuteUpdate () |
void | itemStateChanged (QListViewItem *item) |
void | iCalFileModified (ResourceCalendar *) |
Member Function Documentation
QString TaskView::addTask | ( | const QString & | taskame, | |
long | total, | |||
long | session, | |||
const DesktopList & | desktops, | |||
Task * | parent = 0 | |||
) |
void TaskView::clearActiveTasks | ( | ) | [slot] |
clears all active tasks.
Needed e.g. if iCal file was modified by another program and taskview is cleared without stopping tasks IF YOU DO NOT KNOW WHAT YOU ARE DOING, CALL stopAllTimers INSTEAD
Definition at line 415 of file taskview.cpp.
void TaskView::clipHistory | ( | ) | [slot] |
Copy history for current and all sub tasks to clipboard.
Definition at line 812 of file taskview.cpp.
void TaskView::clipTotals | ( | ) | [slot] |
Copy totals for current and all sub tasks to clipboard.
Definition at line 788 of file taskview.cpp.
void TaskView::closeStorage | ( | ) |
long TaskView::count | ( | ) |
Task * TaskView::current_item | ( | ) | const |
Return the current item in the view, cast to a Task pointer.
Definition at line 176 of file taskview.cpp.
void TaskView::deleteTask | ( | bool | markingascomplete = false |
) | [slot] |
Delete task (and children) from view.
- Parameters:
-
markingascomplete If false (the default), deletes history for current task and all children. If markingascomplete is true, then sets percent complete to 100 and removes task and all it's children from the list view.
Definition at line 627 of file taskview.cpp.
void TaskView::deletingTask | ( | Task * | deletedTask | ) | [slot] |
void TaskView::exportcsvFile | ( | ) | [slot] |
Export comma separated values format for task time totals.
Definition at line 324 of file taskview.cpp.
QString TaskView::exportcsvHistory | ( | ) | [slot] |
void TaskView::extractTime | ( | int | minutes | ) | [slot] |
Subtracts time from all active tasks, and does not log event.
Definition at line 691 of file taskview.cpp.
Task * TaskView::first_child | ( | ) | const |
Return the first item in the view, cast to a Task pointer.
Definition at line 171 of file taskview.cpp.
QValueList< HistoryEvent > TaskView::getHistory | ( | const QDate & | from, | |
const QDate & | to | |||
) | const |
void TaskView::iCalFileChanged | ( | QString | file | ) | [slot] |
User has picked a new iCalendar file on preferences screen.
Definition at line 750 of file taskview.cpp.
QString TaskView::importPlanner | ( | QString | fileName = "" |
) | [slot] |
Task * TaskView::item_at_index | ( | int | i | ) |
Return the i'th item (zero-based), cast to a Task pointer.
Definition at line 181 of file taskview.cpp.
void TaskView::itemStateChanged | ( | QListViewItem * | item | ) | [protected, slot] |
item state stores if a task is expanded so you can see the subtasks
Definition at line 225 of file taskview.cpp.
void TaskView::load | ( | QString | filename = "" |
) |
void TaskView::loadFromFlatFile | ( | ) | [slot] |
void TaskView::newSubTask | ( | ) | [slot] |
void TaskView::newTask | ( | QString | caption, | |
Task * | parent | |||
) | [slot] |
Display edit task dialog and create a new task with results.
Definition at line 485 of file taskview.cpp.
void TaskView::newTask | ( | ) | [slot] |
Preferences * TaskView::preferences | ( | ) |
void TaskView::refresh | ( | ) | [slot] |
void TaskView::reinstateTask | ( | int | completion | ) | [slot] |
Reinstates the current task as incomplete.
- Parameters:
-
completion The percentage complete to mark the task as.
Definition at line 609 of file taskview.cpp.
QString TaskView::report | ( | const ReportCriteria & | rc | ) | [slot] |
void TaskView::resetTimeForAllTasks | ( | ) |
QString TaskView::save | ( | ) | [slot] |
void TaskView::scheduleSave | ( | ) |
void TaskView::startCurrentTimer | ( | ) | [slot] |
void TaskView::startNewSession | ( | ) |
void TaskView::startTimerFor | ( | Task * | task, | |
QDateTime | startTime = QDateTime::currentDateTime() | |||
) | [slot] |
starts timer for task.
- Parameters:
-
task task to start timer of startTime if taskview has been modified by another program, we have to set the starting time to not-now.
Definition at line 401 of file taskview.cpp.
void TaskView::stopAllTimers | ( | ) | [slot] |
void TaskView::stopCurrentTimer | ( | ) | [slot] |
KarmStorage * TaskView::storage | ( | ) | [slot] |
Returns a pointer to storage object.
This is poor object oriented design--the task view should expose wrappers around the storage methods we want to access instead of giving clients full access to objects that we own.
Hopefully, this will be redesigned as part of the Qt4 migration.
Definition at line 114 of file taskview.cpp.
The documentation for this class was generated from the following files: