KTimeTracker: Difference between revisions

From KDE Community Wiki
(Architecture & roadmap to the classes)
Line 10: Line 10:


= Architecture =
= 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 [http://doc.qt.nokia.com/4.7/qtreewidget.html 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.
= Roadmap to the classes =
See http://api.kde.org/4.x-api/kdepim-apidocs/ktimetracker/html/
See http://api.kde.org/4.x-api/kdepim-apidocs/ktimetracker/html/
  main -> mainwindow ------------------------
  main -> mainwindow ------------------------

Revision as of 14:57, 26 February 2011

Ktimetracker
ktimetracker running on the N810


This page is for people who want to participate in the ktimetracker community. So, for (future) ktimetracker developers.

IDE

Please use qtcreator. Why? Quite easy: The description how to set up kdevelop with KDE is over 200 lines long. For eclipse it is 97 and for QtCreator it is 13. So, 13 lines to read instead of 222.

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.

Roadmap to the classes

See http://api.kde.org/4.x-api/kdepim-apidocs/ktimetracker/html/

main -> mainwindow ------------------------
                                            \
                                             -> timetrackerwidget -(contains n>=0)-> taskview -(uses)-> timetrackerstorage
                                            /
ktimetracker_plugin -> ktimetrackerpart ---


ktimetracker's main class creates mainwindow, this calls timetrackerpart, this calls timetrackerwidget, this calls taskview, this contains a timetrackerstorage.

karmstorage stores and loads the events and tasks. taskview displays them. timetrackerwidget displays one or more taskviews in tabs. timetrackerpart can be integrated into a mainwindow or a kontact plugin. mainwindow adds the menu.

ktimetracker benchmark

The help menu

The help menu is stupidly overloaded and I cannot do anything about it because it is somewhere hidden in the library code. Would love to simplify it. "Help" does not need subitems - you want help.

The KPart Mess

ktimetracker is an application displaying a kpart. On the one hand, this makes it easy to be integrated as kontact plugin. But on the other hand, I have the feeling, ktimetracker can no long be debugged so easily. Here are the reasons why dedicated applications are better:

  • can be designed graphically in qtcreator
  • can be edited in qtcreator having all advantages like code completion
  • can be debugged step-by-step from qtcreator
  • toolbar magic can be done
  • with a kpart, you will have to do make install to get the kpart installed(?)
  • https://bugs.kde.org/show_bug.cgi?id=204203

Polls