karm

TaskView Class Reference

#include <taskview.h>

Inherits KListView.

List of all members.


Detailed Description

Container and interface for the tasks.

Definition at line 42 of file taskview.h.


Public Slots

QString save ()
void startCurrentTimer ()
void stopCurrentTimer ()
void stopAllTimers ()
void stopAllTimersAt (QDateTime qdt)
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 ()
KarmStoragestorage ()
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 clipSession ()
void clipHistory ()

Signals

void totalTimesChanged (long session, long total)
void updateButtons ()
void timersActive ()
void timersInactive ()
void tasksChanged (QPtrList< Task > activeTasks)
void setStatusBar (QString)

Public Member Functions

 TaskView (QWidget *parent=0, const char *name=0, const QString &icsfile="")
Taskfirst_child () const
Taskcurrent_item () const
Taskitem_at_index (int i)
void load (QString filename="")
void closeStorage ()
void startNewSession ()
void resetTimeForAllTasks ()
long count ()
QValueList< HistoryEventgetHistory (const QDate &from, const QDate &to) const
void scheduleSave ()
Preferencespreferences ()
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

Task * TaskView::first_child (  )  const

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

Definition at line 172 of file taskview.cpp.

Task * TaskView::current_item (  )  const

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

Definition at line 177 of file taskview.cpp.

Task * TaskView::item_at_index ( int  i  ) 

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

Definition at line 182 of file taskview.cpp.

void TaskView::load ( QString  filename = ""  ) 

Load the view from storage.

Definition at line 187 of file taskview.cpp.

void TaskView::closeStorage (  ) 

Close the storage and release lock.

Definition at line 236 of file taskview.cpp.

void TaskView::startNewSession (  ) 

Reset session time to zero for all tasks.

Definition at line 442 of file taskview.cpp.

void TaskView::resetTimeForAllTasks (  ) 

Reset session and total time to zero for all tasks.

Definition at line 451 of file taskview.cpp.

long TaskView::count (  ) 

Return the total number if items in the view.

Definition at line 377 of file taskview.cpp.

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

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

Definition at line 780 of file taskview.cpp.

void TaskView::scheduleSave (  ) 

Schedule that we should save very soon.

Definition at line 354 of file taskview.cpp.

Preferences * TaskView::preferences (  ) 

Return preferences user selected on settings dialog.

Definition at line 361 of file taskview.cpp.

QString TaskView::addTask ( const QString &  taskame,
long  total,
long  session,
const DesktopList &  desktops,
Task parent = 0 
)

Add a task to view and storage.

Definition at line 527 of file taskview.cpp.

QString TaskView::save (  )  [slot]

Save to persistent storage.

Definition at line 363 of file taskview.cpp.

void TaskView::startCurrentTimer (  )  [slot]

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

Definition at line 372 of file taskview.cpp.

void TaskView::stopCurrentTimer (  )  [slot]

Stop the timer for the current item in the view.

Definition at line 475 of file taskview.cpp.

void TaskView::stopAllTimers (  )  [slot]

Stop all running timers.

Definition at line 411 of file taskview.cpp.

void TaskView::stopAllTimersAt ( QDateTime  qdt  )  [slot]

Stop all running timers as if it was qdt.

Definition at line 424 of file taskview.cpp.

void TaskView::newTask (  )  [slot]

Calls newTask dialog with caption "New Task".

Definition at line 491 of file taskview.cpp.

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

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

Definition at line 496 of file taskview.cpp.

void TaskView::refresh (  )  [slot]

Used to refresh (e.g.

after import)

Definition at line 247 of file taskview.cpp.

void TaskView::loadFromFlatFile (  )  [slot]

Used to import a legacy file format.

Definition at line 274 of file taskview.cpp.

QString TaskView::importPlanner ( QString  fileName = ""  )  [slot]

used to import tasks from imendio planner

Definition at line 306 of file taskview.cpp.

QString TaskView::report ( const ReportCriteria rc  )  [slot]

call export function for csv totals or history

Definition at line 320 of file taskview.cpp.

void TaskView::exportcsvFile (  )  [slot]

Export comma separated values format for task time totals.

Definition at line 325 of file taskview.cpp.

QString TaskView::exportcsvHistory (  )  [slot]

Export comma-separated values format for task history.

Definition at line 339 of file taskview.cpp.

void TaskView::newSubTask (  )  [slot]

Calls newTask dialog with caption "New Sub Task".

Definition at line 553 of file taskview.cpp.

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.

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

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

void TaskView::extractTime ( int  minutes  )  [slot]

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

The time is stored in memory and in X-KDE-karm-duration. It is increased automatically every minute to display the right duration.

Definition at line 702 of file taskview.cpp.

void TaskView::deletingTask ( Task deletedTask  )  [slot]

receiving signal that a task is being deleted

Definition at line 757 of file taskview.cpp.

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

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

void TaskView::iCalFileChanged ( QString  file  )  [slot]

User might have picked a new iCalendar file on preferences screen.

Verify the file is not the same as before and load the new one. This is not iCalFileModified.

Definition at line 767 of file taskview.cpp.

void TaskView::clipTotals (  )  [slot]

Copy totals for current and all sub tasks to clipboard.

Definition at line 810 of file taskview.cpp.

void TaskView::clipSession (  )  [slot]

Copy session times for current and all sub tasks to clipboard.

Definition at line 834 of file taskview.cpp.

void TaskView::clipHistory (  )  [slot]

Copy history for current and all sub tasks to clipboard.

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

void TaskView::iCalFileModified ( ResourceCalendar *  rc  )  [protected, slot]

React on another process having modified the iCal file we rely on.

Definition at line 238 of file taskview.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys