karm Library API Documentation

TaskView Class Reference

Container and interface for the tasks. More...

#include <taskview.h>

Collaboration diagram for TaskView:

Collaboration graph
[legend]
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 exportcsvFile ()
void exportcsvHistory ()
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 closeStorage ()
void startNewSession ()
void resetTimeForAllTasks ()
long count ()
QValueList< HistoryEventgetHistory (const QDate &from, const QDate &to) const
void scheduleSave ()
Preferencespreferences ()
bool isReadOnly () const

Protected Slots

void autoSaveChanged (bool)
void autoSavePeriodChanged (int period)
void minuteUpdate ()
void itemStateChanged (QListViewItem *item)
void deleteItemState (QListViewItem *item)

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

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

Task * TaskView::current_item  )  const
 

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

Definition at line 123 of file taskview.cpp.

Referenced by changeTimer(), clipTotals(), deleteTask(), exportcsvFile(), exportcsvHistory(), 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 128 of file taskview.cpp.

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

void TaskView::load  ) 
 

Load the view from storage.

Definition at line 133 of file taskview.cpp.

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

Referenced by iCalFileChanged().

void TaskView::closeStorage  ) 
 

Close the storage and release lock.

Definition at line 188 of file taskview.cpp.

References KarmStorage::closeStorage().

void TaskView::startNewSession  ) 
 

Reset session time to zero for all tasks.

Definition at line 326 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 335 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 293 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 658 of file taskview.cpp.

References KarmStorage::getHistory().

Referenced by TimeKard::historyAsText().

void TaskView::scheduleSave  ) 
 

Schedule that we should save very soon.

Definition at line 252 of file taskview.cpp.

Preferences * TaskView::preferences  ) 
 

Return preferences user selected on settings dialog.

Definition at line 257 of file taskview.cpp.

bool TaskView::isReadOnly  )  const [inline]
 

Return true if storage is readonly.

Definition at line 79 of file taskview.h.

References KarmStorage::isReadOnly().

Referenced by changeTimer().

void TaskView::save  )  [slot]
 

Save to persistent storage.

Definition at line 259 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 288 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 358 of file taskview.cpp.

References current_item().

Referenced by changeTimer().

void TaskView::stopAllTimers  )  [slot]
 

Stop all running timers.

Definition at line 314 of file taskview.cpp.

Referenced by iCalFileChanged().

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

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

Definition at line 364 of file taskview.cpp.

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

void TaskView::newTask  )  [slot]
 

Calls newTask with caption "New Task".

Definition at line 394 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 399 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 191 of file taskview.cpp.

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

void TaskView::exportcsvFile  )  [slot]
 

Export comma separated values format for task time totals.

Definition at line 224 of file taskview.cpp.

References current_item(), and KarmStorage::report().

void TaskView::exportcsvHistory  )  [slot]
 

Export comma-separated values format for task history.

Definition at line 238 of file taskview.cpp.

References current_item(), and KarmStorage::report().

void TaskView::newSubTask  )  [slot]
 

Calls newTask with caption "New Sub Task".

Definition at line 452 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 520 of file taskview.cpp.

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

void TaskView::extractTime int  minutes  )  [slot]
 

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

Definition at line 591 of file taskview.cpp.

void TaskView::deletingTask Task deletedTask  )  [slot]
 

receiving signal that a task is being deleted

Definition at line 640 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 650 of file taskview.cpp.

References load(), KarmStorage::save(), and stopAllTimers().

void TaskView::clipTotals  )  [slot]
 

Copy totals for current and all sub tasks to clipboard.

Definition at line 676 of file taskview.cpp.

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

void TaskView::clipHistory  )  [slot]
 

Copy history for current and all sub tasks to clipboard.

Definition at line 700 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.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 17 09:54:44 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003