• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

ktimetracker

Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
TaskView Class Reference

#include <taskview.h>

Inheritance diagram for TaskView:
Inheritance graph
[legend]

Public Slots

void clearActiveTasks ()
 
QString clipTotals (const ReportCriteria &rc)
 
void deleteTask (Task *task=0)
 
void deleteTaskBatch (Task *task=0)
 
void deletingTask (Task *deletedTask)
 
void editTask ()
 
void exportcsvFile ()
 
QString exportcsvHistory ()
 
void importPlanner (const QString &fileName="")
 
void markTaskAsComplete ()
 
void markTaskAsIncomplete ()
 
void newSubTask ()
 
void newTask ()
 
void newTask (const QString &caption, Task *parent)
 
void reconfigure ()
 
void refresh ()
 
QString reFreshTimes ()
 
QString report (const ReportCriteria &rc)
 
void save ()
 
QString setClipBoardText (const QString &s)
 
void setPerCentComplete (int completion)
 
void startCurrentTimer ()
 
void startTimerFor (Task *task, const QDateTime &startTime=QDateTime::currentDateTime())
 
void stopAllTimers (const QDateTime &when=QDateTime::currentDateTime())
 
void stopCurrentTimer ()
 
void stopTimerFor (Task *task)
 
timetrackerstorage * storage ()
 
void subtractTime (int minutes)
 
void taskTotalTimesChanged (long session, long total)
 
void toggleFocusTracking ()
 

Signals

void contextMenuRequested (const QPoint &)
 
void reSetTimes ()
 
void setStatusBarText (QString)
 
void tasksChanged (QList< Task * > activeTasks)
 
void timersActive ()
 
void timersInactive ()
 
void totalTimesChanged (long session, long total)
 
void updateButtons ()
 

Public Member Functions

 TaskView (QWidget *parent=0)
 
virtual ~TaskView ()
 
QList< Task * > activeTasks () const
 
QString addTask (const QString &taskame, const QString &taskdescription=QString(), long total=0, long session=0, const DesktopList &desktops=QVector< int >(0, 0), Task *parent=0)
 
bool allEventsHaveEndTiMe ()
 
void closeStorage ()
 
long count ()
 
Task * currentItem () const
 
QList< HistoryEvent > getHistory (const QDate &from, const QDate &to) const
 
bool isFocusTrackingActive () const
 
Task * itemAt (int i)
 
void load (const QString &filename)
 
void resetDisplayTimeForAllTasks ()
 
void resetTimeForAllTasks ()
 
void scheduleSave ()
 
void startNewSession ()
 
Task * task (const QString &uid)
 
QStringList tasks ()
 

Protected Slots

void dropEvent (QDropEvent *event)
 
void iCalFileModified ()
 
void itemStateChanged (QTreeWidgetItem *item)
 
void minuteUpdate ()
 
void newFocusWindowDetected (const QString &)
 
void slotColumnToggled (int)
 
void slotCustomContextMenuRequested (const QPoint &)
 
void slotItemDoubleClicked (QTreeWidgetItem *item, int)
 
void slotSetPercentage (QAction *)
 
void slotSetPriority (QAction *)
 

Protected Member Functions

void mouseMoveEvent (QMouseEvent *)
 
void mousePressEvent (QMouseEvent *)
 

Detailed Description

Container and interface for the tasks.

Definition at line 50 of file taskview.h.

Constructor & Destructor Documentation

TaskView::TaskView ( QWidget *  parent = 0)
explicit

Definition at line 163 of file taskview.cpp.

TaskView::~TaskView ( )
virtual

Definition at line 392 of file taskview.cpp.

Member Function Documentation

QList< Task * > TaskView::activeTasks ( ) const

Returns a list of the current active tasks.

Definition at line 1186 of file taskview.cpp.

QString TaskView::addTask ( const QString &  taskame,
const QString &  taskdescription = QString(),
long  total = 0,
long  session = 0,
const DesktopList &  desktops = QVector<int>(0,0),
Task *  parent = 0 
)

Add a task to view and storage.

Definition at line 902 of file taskview.cpp.

bool TaskView::allEventsHaveEndTiMe ( )

Deliver if all events from the storage have and end time.

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

QString TaskView::clipTotals ( const ReportCriteria &  rc)
slot

Copy totals for current and all sub tasks to clipboard.

Definition at line 1079 of file taskview.cpp.

void TaskView::closeStorage ( )

Close the storage and release lock.

Definition at line 503 of file taskview.cpp.

void TaskView::contextMenuRequested ( const QPoint &  )
signal
long TaskView::count ( )

Return the total number of items in the view.

Definition at line 653 of file taskview.cpp.

Task * TaskView::currentItem ( ) const

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

Definition at line 399 of file taskview.cpp.

void TaskView::deleteTask ( Task *  task = 0)
slot

Deletes the given or the current task (and children) from the view.

Depending on configuration, there may be a user dialog.

Parameters
taskTask to be deleted. If empty, the current task is deleted. if non-existent, an error message is displayed.

Definition at line 1018 of file taskview.cpp.

void TaskView::deleteTaskBatch ( Task *  task = 0)
slot

Deletes the given or the current task (and children) from the view.

It does this in batch mode, no user dialog.

Parameters
taskTask to be deleted. If empty, the current task is deleted. if non-existent, an error message is displayed.

Definition at line 1000 of file taskview.cpp.

void TaskView::deletingTask ( Task *  deletedTask)
slot

receiving signal that a task is being deleted

Definition at line 1063 of file taskview.cpp.

void TaskView::dropEvent ( QDropEvent *  event)
protectedslot

Definition at line 687 of file taskview.cpp.

void TaskView::editTask ( )
slot

Calls editTask dialog for the current task.

Definition at line 939 of file taskview.cpp.

void TaskView::exportcsvFile ( )
slot

Export comma separated values format for task time totals.

Definition at line 622 of file taskview.cpp.

QString TaskView::exportcsvHistory ( )
slot

Export comma-separated values format for task history.

Definition at line 637 of file taskview.cpp.

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

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

void TaskView::iCalFileModified ( )
protectedslot

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

This is not iCalFileChanged.

Definition at line 513 of file taskview.cpp.

void TaskView::importPlanner ( const QString &  fileName = "")
slot

used to import tasks from imendio planner

Definition at line 602 of file taskview.cpp.

bool TaskView::isFocusTrackingActive ( ) const

Returns whether the focus tracking is currently active.

Definition at line 1181 of file taskview.cpp.

Task * TaskView::itemAt ( int  i)

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

Definition at line 405 of file taskview.cpp.

void TaskView::itemStateChanged ( QTreeWidgetItem *  item)
protectedslot

item state stores if a task is expanded so you can see the subtasks

Definition at line 494 of file taskview.cpp.

void TaskView::load ( const QString &  filename)

Load the view from storage.

Definition at line 422 of file taskview.cpp.

void TaskView::markTaskAsComplete ( )
slot

Definition at line 1045 of file taskview.cpp.

void TaskView::markTaskAsIncomplete ( )
slot

Definition at line 1074 of file taskview.cpp.

void TaskView::minuteUpdate ( )
protectedslot

Definition at line 854 of file taskview.cpp.

void TaskView::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 316 of file taskview.cpp.

void TaskView::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 351 of file taskview.cpp.

void TaskView::newFocusWindowDetected ( const QString &  taskName)
protectedslot

React on the focus having changed to Window QString.

Definition at line 275 of file taskview.cpp.

void TaskView::newSubTask ( )
slot

Calls newTask dialog with caption "New Sub Task".

Definition at line 929 of file taskview.cpp.

void TaskView::newTask ( )
slot

Calls newTask dialog with caption "New Task".

Definition at line 865 of file taskview.cpp.

void TaskView::newTask ( const QString &  caption,
Task *  parent 
)
slot

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

Parameters
captionWindow title of the edit task dialog

Definition at line 870 of file taskview.cpp.

void TaskView::reconfigure ( )
slot

Reconfigures taskView depending on current configuration.

Definition at line 1191 of file taskview.cpp.

void TaskView::refresh ( )
slot

Used to refresh (e.g.

after import)

Definition at line 526 of file taskview.cpp.

QString TaskView::reFreshTimes ( )
slot

Refresh the times of the tasks, e.g.

when the history has been changed by the user

Definition at line 548 of file taskview.cpp.

QString TaskView::report ( const ReportCriteria &  rc)
slot

call export function for csv totals or history

Definition at line 617 of file taskview.cpp.

void TaskView::resetDisplayTimeForAllTasks ( )

Reset session and total time for all tasks - do not touch the storage.

Definition at line 814 of file taskview.cpp.

void TaskView::resetTimeForAllTasks ( )

Reset session and total time to zero for all tasks.

Definition at line 799 of file taskview.cpp.

void TaskView::reSetTimes ( )
signal
void TaskView::save ( )
slot

Save to persistent storage.

Definition at line 698 of file taskview.cpp.

void TaskView::scheduleSave ( )

Schedule that we should save very soon.

Definition at line 693 of file taskview.cpp.

QString TaskView::setClipBoardText ( const QString &  s)
slot

Set the text of the application's clipboard.

Definition at line 1090 of file taskview.cpp.

void TaskView::setPerCentComplete ( int  completion)
slot

Sets % completed for the current task.

Parameters
completionThe percentage complete to mark the task as.

Definition at line 981 of file taskview.cpp.

void TaskView::setStatusBarText ( QString  )
signal
void TaskView::slotColumnToggled ( int  column)
protectedslot

Definition at line 1117 of file taskview.cpp.

void TaskView::slotCustomContextMenuRequested ( const QPoint &  pos)
protectedslot

Definition at line 1143 of file taskview.cpp.

void TaskView::slotItemDoubleClicked ( QTreeWidgetItem *  item,
int   
)
protectedslot

Definition at line 1097 of file taskview.cpp.

void TaskView::slotSetPercentage ( QAction *  action)
protectedslot

Definition at line 1164 of file taskview.cpp.

void TaskView::slotSetPriority ( QAction *  action)
protectedslot

Definition at line 1173 of file taskview.cpp.

void TaskView::startCurrentTimer ( )
slot

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

Definition at line 716 of file taskview.cpp.

void TaskView::startNewSession ( )

Reset session time to zero for all tasks.

Definition at line 783 of file taskview.cpp.

void TaskView::startTimerFor ( Task *  task,
const QDateTime &  startTime = QDateTime::currentDateTime() 
)
slot

starts timer for task.

Parameters
tasktask to start timer of
startTimeif taskview has been modified by another program, we have to set the starting time to not-now.

Definition at line 721 of file taskview.cpp.

void TaskView::stopAllTimers ( const QDateTime &  when = QDateTime::currentDateTime())
slot

Stop all running timers.

Parameters
whenWhen the timer stopped - this makes sense if the idletime- detector detects the user stopped working 5 minutes ago.

Definition at line 745 of file taskview.cpp.

void TaskView::stopCurrentTimer ( )
slot

Stop the timer for the current item in the view.

Definition at line 845 of file taskview.cpp.

void TaskView::stopTimerFor ( Task *  task)
slot

Definition at line 828 of file taskview.cpp.

timetrackerstorage * 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 387 of file taskview.cpp.

void TaskView::subtractTime ( int  minutes)
slot

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

Definition at line 1058 of file taskview.cpp.

Task * TaskView::task ( const QString &  uid)

return the task with the given UID

Definition at line 677 of file taskview.cpp.

QStringList TaskView::tasks ( )

return all task names, e.g.

for batch processing

Definition at line 665 of file taskview.cpp.

void TaskView::tasksChanged ( QList< Task * >  activeTasks)
signal
void TaskView::taskTotalTimesChanged ( long  session,
long  total 
)
inlineslot

Definition at line 197 of file taskview.h.

void TaskView::timersActive ( )
signal
void TaskView::timersInactive ( )
signal
void TaskView::toggleFocusTracking ( )
slot

Toggles the automatic tracking of focused windows.

Definition at line 766 of file taskview.cpp.

void TaskView::totalTimesChanged ( long  session,
long  total 
)
signal
void TaskView::updateButtons ( )
signal

The documentation for this class was generated from the following files:
  • taskview.h
  • taskview.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ktimetracker

Skip menu "ktimetracker"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal