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