TaskView Class Reference
Container and interface for the tasks. More...
#include <taskview.h>
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 Methods | |
TaskView (QWidget *parent=0, const char *name=0) | |
virtual | ~TaskView () |
Task * | first_child () const |
Task * | current_item () const |
Task * | item_at_index (int i) |
void | load () |
void | startNewSession () |
void | resetTimeForAllTasks () |
long | count () |
QValueList< HistoryEvent > | getHistory (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
|
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(). |
|
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(). |
|
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(). |
|
Load the view from storage.
Definition at line 125 of file taskview.cpp. References first_child(), Task::getDesktops(), QString::isEmpty(), item_at_index(), KarmStorage::load(), DesktopTracker::registerForDesktops(), and DesktopTracker::startTracking(). Referenced by iCalFileChanged(). |
|
Reset session time to zero for all tasks.
Definition at line 260 of file taskview.cpp. References QListViewItemIterator::current(), first_child(), and Task::startNewSession(). |
|
Reset session and total time to zero for all tasks.
Definition at line 269 of file taskview.cpp. References QListViewItemIterator::current(), first_child(), and Task::resetTimes(). |
|
Return the total number if items in the view.
Definition at line 227 of file taskview.cpp. References item_at_index(). |
|
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(). |
|
Schedule that we should save very soon.
Definition at line 188 of file taskview.cpp. References QTimer::start(). |
|
Save to persistent storage.
Definition at line 193 of file taskview.cpp. References QPtrList< Task >::at(), QPtrList< Task >::count(), and KarmStorage::save(). Referenced by deleteTask(), and newTask(). |
|
Start the timer on the current item (task) in view.
Definition at line 222 of file taskview.cpp. References current_item(). Referenced by changeTimer(). |
|
Stop the timer for the current item in the view.
Definition at line 292 of file taskview.cpp. References current_item(). Referenced by changeTimer(). |
|
Stop all running timers.
Definition at line 248 of file taskview.cpp. References QPtrList< Task >::at(), QPtrList< Task >::clear(), QPtrList< Task >::count(), and IdleTimeDetector::stopIdleDetection(). |
|
Stop all running timers, and start timer on current item.
Definition at line 298 of file taskview.cpp. References QPtrList< Task >::at(), QPtrList< Task >::clear(), QPtrList< Task >::count(), current_item(), QPtrList< Task >::findRef(), startCurrentTimer(), and stopCurrentTimer(). |
|
Calls newTask with caption "New Task".
Definition at line 327 of file taskview.cpp. Referenced by newSubTask(). |
|
Display edit task dialog and create a new task with results.
Definition at line 332 of file taskview.cpp. References KarmStorage::addTask(), QValueVector< int >::clear(), DesktopTracker::desktopCount(), QString::isEmpty(), QString::isNull(), DesktopTracker::registerForDesktops(), save(), Task::setUid(), QValueVector< int >::size(), EditTaskDialog::status(), EditTaskDialog::taskName(), and Task::uid(). |
|
Used to import a legacy file format.
Definition at line 155 of file taskview.cpp. References first_child(), Task::getDesktops(), QString::isEmpty(), item_at_index(), KarmStorage::loadFromFlatFile(), DesktopTracker::registerForDesktops(), and DesktopTracker::startTracking(). |
|
Calls newTask with caption "New Sub Task".
Definition at line 385 of file taskview.cpp. References current_item(), newTask(), and QListViewItem::setOpen(). |
|
Delete task (and children) from view.
Definition at line 453 of file taskview.cpp. References QListViewItem::childCount(), QPtrList< Task >::count(), current_item(), first_child(), Task::name(), Task::nextSibling(), Preferences::promptDelete(), Task::remove(), Task::removeFromView(), save(), Task::setPercentComplete(), and IdleTimeDetector::stopIdleDetection(). |
|
Subtracts time from all active tasks, and does not log event.
Definition at line 524 of file taskview.cpp. |
|
receiving signal that a task is being deleted.
Definition at line 579 of file taskview.cpp. References DesktopTracker::registerForDesktops(), and QPtrList< Task >::removeRef(). |
|
User has picked a new iCalendar file on preferences screen.
Definition at line 589 of file taskview.cpp. References load(). |
|
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(). |
|
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: