karm Library API Documentation

TaskView Class Reference

Container and interface for the tasks. More...

#include <taskview.h>

List of all members.

Public Slots

void save ()
void startCurrentTimer ()
void stopCurrentTimer ()
void stopAllTimers ()
void changeTimer (QListViewItem *=0)
void newTask ()
void newTask (QString caption, Task *parent)
void loadFromFlatFile ()
void newSubTask ()
void editTask ()
void deleteTask (bool markingascomplete=false)
void markTaskAsComplete ()
void extractTime (int minutes)
void taskTotalTimesChanged (long session, long total)
void adaptColumns ()
void deletingTask (Task *deletedTask)
void startTimerFor (Task *task)
void stopTimerFor (Task *task)
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)
Taskfirst_child () const
Taskcurrent_item () const
Taskitem_at_index (int i)
void load ()
void startNewSession ()
void resetTimeForAllTasks ()
long count ()
QValueList< HistoryEventgetHistory (const QDate &from, const QDate &to) const
void scheduleSave ()

Protected Slots

void autoSaveChanged (bool)
void autoSavePeriodChanged (int period)
void minuteUpdate ()


Detailed Description

Container and interface for the tasks.

Definition at line 36 of file taskview.h.


Member Function Documentation

Task * TaskView::first_child  )  const
 

Return the first item in the view, cast to a Task pointer.

Definition at line 110 of file taskview.cpp.

Referenced by deleteTask(), load(), loadFromFlatFile(), KarmStorage::loadFromFlatFileCumulative(), resetTimeForAllTasks(), and startNewSession().

Task * TaskView::current_item  )  const
 

Return the current item in the view, cast to a Task pointer.

Definition at line 115 of file taskview.cpp.

Referenced by changeTimer(), clipTotals(), deleteTask(), TimeKard::historyAsText(), newSubTask(), startCurrentTimer(), stopCurrentTimer(), and TimeKard::totalsAsText().

Task * TaskView::item_at_index int  i  ) 
 

Return the i'th item (zero-based), cast to a Task pointer.

Definition at line 120 of file taskview.cpp.

Referenced by count(), load(), and loadFromFlatFile().

void TaskView::load  ) 
 

Load the view from storage.

Definition at line 125 of file taskview.cpp.

References first_child(), Task::getDesktops(), item_at_index(), KarmStorage::load(), DesktopTracker::registerForDesktops(), and DesktopTracker::startTracking().

Referenced by iCalFileChanged().

void TaskView::startNewSession  ) 
 

Reset session time to zero for all tasks.

Definition at line 260 of file taskview.cpp.

References first_child(), and Task::startNewSession().

void TaskView::resetTimeForAllTasks  ) 
 

Reset session and total time to zero for all tasks.

Definition at line 269 of file taskview.cpp.

References first_child(), and Task::resetTimes().

long TaskView::count  ) 
 

Return the total number if items in the view.

Definition at line 227 of file taskview.cpp.

References item_at_index().

QValueList< HistoryEvent > TaskView::getHistory const QDate &  from,
const QDate &  to
const
 

Return list of start/stop events for given date range.

Definition at line 595 of file taskview.cpp.

References KarmStorage::getHistory().

Referenced by TimeKard::historyAsText().

void TaskView::scheduleSave  ) 
 

Schedule that we should save very soon.

Definition at line 188 of file taskview.cpp.

void TaskView::save  )  [slot]
 

Save to persistent storage.

Definition at line 193 of file taskview.cpp.

References KarmStorage::save().

Referenced by deleteTask(), and newTask().

void TaskView::startCurrentTimer  )  [slot]
 

Start the timer on the current item (task) in view.

Definition at line 222 of file taskview.cpp.

References current_item().

Referenced by changeTimer().

void TaskView::stopCurrentTimer  )  [slot]
 

Stop the timer for the current item in the view.

Definition at line 292 of file taskview.cpp.

References current_item().

Referenced by changeTimer().

void TaskView::stopAllTimers  )  [slot]
 

Stop all running timers.

Definition at line 248 of file taskview.cpp.

References IdleTimeDetector::stopIdleDetection().

void TaskView::changeTimer QListViewItem *  = 0  )  [slot]
 

Stop all running timers, and start timer on current item.

Definition at line 298 of file taskview.cpp.

References current_item(), startCurrentTimer(), and stopCurrentTimer().

void TaskView::newTask  )  [slot]
 

Calls newTask with caption "New Task".

Definition at line 327 of file taskview.cpp.

Referenced by newSubTask().

void TaskView::newTask QString  caption,
Task parent
[slot]
 

Display edit task dialog and create a new task with results.

Definition at line 332 of file taskview.cpp.

References KarmStorage::addTask(), DesktopTracker::desktopCount(), DesktopTracker::registerForDesktops(), save(), Task::setUid(), EditTaskDialog::status(), EditTaskDialog::taskName(), and Task::uid().

void TaskView::loadFromFlatFile  )  [slot]
 

Used to import a legacy file format.

Definition at line 155 of file taskview.cpp.

References first_child(), Task::getDesktops(), item_at_index(), KarmStorage::loadFromFlatFile(), DesktopTracker::registerForDesktops(), and DesktopTracker::startTracking().

void TaskView::newSubTask  )  [slot]
 

Calls newTask with caption "New Sub Task".

Definition at line 385 of file taskview.cpp.

References current_item(), and newTask().

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 453 of file taskview.cpp.

References current_item(), first_child(), Task::name(), Task::nextSibling(), Preferences::promptDelete(), Task::remove(), Task::removeFromView(), save(), Task::setPercentComplete(), and IdleTimeDetector::stopIdleDetection().

void TaskView::extractTime int  minutes  )  [slot]
 

Subtracts time from all active tasks, and does not log event.

Definition at line 524 of file taskview.cpp.

void TaskView::deletingTask Task deletedTask  )  [slot]
 

receiving signal that a task is being deleted

Definition at line 579 of file taskview.cpp.

References DesktopTracker::registerForDesktops().

void TaskView::iCalFileChanged QString  file  )  [slot]
 

User has picked a new iCalendar file on preferences screen.

Definition at line 589 of file taskview.cpp.

References load().

void TaskView::clipTotals  )  [slot]
 

Copy totals for current and all sub tasks to clipboard.

Definition at line 613 of file taskview.cpp.

References current_item(), Task::isRoot(), and TimeKard::totalsAsText().

void TaskView::clipHistory  )  [slot]
 

Copy history for current and all sub tasks to clipboard.

Definition at line 636 of file taskview.cpp.

References TimeKard::historyAsText().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for karm Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Mar 6 17:18:24 2004 by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2003