kde-playground/kdepim/ktimetracker/Mainpage.dox
2015-04-14 21:49:29 +00:00

55 lines
2.8 KiB
Text

/** \mainpage ktimetracker architecture
\section intro Introduction
%ktimetracker is a simple, easy to use time tracking program. It keeps a hierarchical list of tasks. Each task has a timer
associated with it. The primary user interaction for %ktimetracker is to start and stop the appropriate timer. All information here is taken from http://community.kde.org/Ktimetracker.
\section ktimetracker architecture
ktimetracker can be a kpart (class ktimetrackerpart) or a mainwindow (class mainwindow).
The kpart can be used e.g. for a kontact plugin, the mainwindow as stand-alone application.
Both classes display a timetrackerwidget, that is a ktabwidget containing one or more taskviews.
A taskview is associated with a timetrackerstorage object that holds a calendar with todos and events.
A taskview is a QTreeWidget that holds tasks. A task has a summary (name), a priority and times:
the time, total time, session time and total session time. Over the QTreeWidget, a task can have
subtasks. The total time is defined as the task's and all its subtasks' times.
\section ktimetracker files
Mainpage.dox - will be published on http://api.kde.org/4.x-api/kdepim-apidocs/ktimetracker/html/index.html
\section map Road Map to the Classes
Here is how the most important classes display/contain/use each other:
<pre>
main -> mainwindow -------------------------
\
-> timetrackerwidget -(contains n>=0)-> taskview -(uses)-> timetrackerstorage
/
ktimetracker_plugin -> ktimetrackerpart --
</pre>
MainWindow is the outermost layer and initializes the menus and actions, sets
up the status bar, and handles many of the signal-to-slot connections. It
holds a pointer to the timetrackerwidget and Preferences objects and implements the
%ktimetracker DBUS interface.
TaskView does most of the work in the application. This QListWidget subclass
sets up the columns in the list, the idle detection timer, the auto save
timer, and the desktop tracker. It starts and stops timers, handles importing
and exporting and displays the edit task dialog in response to user action.
TaskView holds a private pointer to Preferences and a timetrackerstorage object.
A Task is a QListViewItem subclass stores state such as the timer totals, if a
timer is currently running for the task. It also defines the list view sort
order and can return a pointer to a KCalCore::Todo object that holds the same
information.
Preferences is a singleton that stores configuration options. It raises
signals when options change (for example, the location where the ktimetracker data is
stored) so the application can react and adjust.
timetrackerstorage is a singleton that creates an interface for storing %ktimetracker data.
Currently, it uses KDE Resource framework and stores data in the iCalendar
format.
*/