1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
/** \mainpage %Karm API Overview
\section intro Introduction
%Karm 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 karm is to start and stop the appropriate timer.
\section map Road Map to the Classes
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 TaskView and Preferences objects and implements the
%Karm's DCOP interface (defined in KarmDCOPIface).
TaskView does most of the work in the application. This TDEListView 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 KarmStorage objects.
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 KCal::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 karm data is
stored) so the application can react and adjust.
KarmStorage is a singleton that creates an interface for storing KArm data.
Currently, it uses KDE Resource framework and stores data in the iCalendar
format.
*/
/** \page sig_slot_index Index of Signals and Slots
To get an understanding of the flow program, it may be useful to see an overview of all of the signals, slots, and
connections. See \see connections to get an index of what signal is connected to which slot.
\section overview Summary of what each class provides
<table>
<tr><td><b><center>Class</center></b></td> <td><b><center>Signal?</center></b></td> <td><b><center>Public Slot?</center></b></td>
<td><b><center>Protected Slot?</center></b></td> <td><b><center>Private Slot?</center></b></td></tr>
<tr><td>AddTaskDialog</td> <td> </td> <td> </td> <td> </td> <td>Y </td></tr>
<tr><td>IdleTimer</td> <td>Y </td> <td>Y </td> <td>Y </td> <td> </td></tr>
<tr><td>TDEAccelMenuWatch</td> <td> </td> <td>Y </td> <td> </td> <td>Y </td></tr>
<tr><td>Karm</td> <td>Y </td> <td>Y </td> <td>Y </td> <td> </td></tr>
<tr><td>KarmTray</td> <td> </td> <td>Y </td> <td>Y </td> <td> </td></tr>
<tr><td>KarmWindow</td> <td> </td> <td> </td> <td>Y </td> <td> </td></tr>
<tr><td>KTimeWidget</td> <td> </td> <td> </td> <td> </td> <td> </td></tr>
<tr><td>ListViewIterator</td> <td> </td> <td> </td> <td> </td> <td> </td></tr>
<tr><td>Loging</td> <td> </td> <td> </td> <td> </td> <td> </td></tr>
<tr><td>MyPrinter</td> <td> </td> <td> </td> <td> </td> <td> </td></tr>
<tr><td>Preferences</td> <td>Y </td> <td>Y </td> <td>Y </td> <td> </td></tr>
<tr><td>SubtreeIterator</td> <td> </td> <td> </td> <td> </td> <td> </td></tr>
<tr><td>Task</td> <td> </td> <td> </td> <td>Y </td> <td> </td></tr>
</table>
\section signals Listing of all of the signals
These are the signals:
<ol>
<li>IdleTimer::extractTime(int)
<li>IdleTimer::stopTimer()
<li>Karm::sessionTimeChanged()
<li>Karm::timerActive()
<li>Karm::timerInactive()
<li>Karm::timerTick()
<li>Karm::updateButtons()
<li>Karm::tasksChanged(QPtrList<Task>)
<li>Preferences::autoSave(bool)
<li>Preferences::autoSavePeriod(int)
<li>Preferences::detectIdleness(bool)
<li>Preferences::idlenessTimeout(int)
<li>Preferences::saveFile(TQString)
<li>Preferences::setupChanged()
<li>Preferences::timeLog(TQString)
<li>Preferences::timeLoging(bool)
<li>Preferences::hideOnClose(bool)
</ol>
\section slots Listing of the slots
\subsection public Public Slots
<ol>
<li>IdleTimer::setMaxIdle(int maxIdle)
<li>IdleTimer::startIdleDetection()
<li>IdleTimer::stopIdleDetection()
<li>IdleTimer::toggleOverAllIdleDetection(bool)
<li>TDEAccelMenuWatch::updateMenus()
<li>Karm::changeTimer(QListViewItem*)
<li>Karm::deleteTask()
<li>Karm::editTask()
<li>Karm::extractTime(int)
<li>Karm::load()
<li>Karm::newSubTask()
<li>Karm::newTask()
<li>Karm::newTask(TQString, QListViewItem*)
<li>Karm::parseLine(TQString, long*, TQString*, int*)
<li>Karm::resetSessionTimeForAllTasks()
<li>Karm::save()
<li>Karm::startTimer()
<li>Karm::stopAllTimers()
<li>Karm::stopCurrentTimer()
<li>Karm::stopTimer(Task*)
<li>KarmTray::initToolTip()
<li>KarmTray::resetClock()
<li>KarmTray::startClock()
<li>KarmTray::stopClock()
<li>KarmTray::updateToolTip(QPtrList<Task>)
<li>Karm::writeTaskToFile(QTextStream*, QListViewItem*, int)
<li>Preferences::load()
<li>Preferences::save()
<li>Preferences::showDialog()
</ol>
\subsection protected Protected Slots
<ol>
<li>IdleTimer::check()
<li>Karm::addTimeToActiveTasks(int)
<li>Karm::autoSaveChanged(bool)
<li>Karm::autoSavePeriodChanged(int)
<li>Karm::minuteUpdate()
<li>Karm::stopChildCounters(Task*)
<li>KarmTray::advanceClock()
<li>KarmWindow::contextMenuRequest(QListViewItem*, const QPoint&, int)
<li>KarmWindow::disableStopAll()
<li>KarmWindow::enableStopAll()
<li>KarmWindow::hideOnClose(bool)
<li>KarmWindow::keyBindings()
<li>KarmWindow::print()
<li>KarmWindow::quit()
<li>KarmWindow::resetSessionTime();
<li>KarmWindow::save()
<li>KarmWindow::slotSelectionChanged()
<li>KarmWindow::updateStatusBar()
<li>KarmWindow::updateTime()
<li>Preferences::autoSaveCheckBoxChanged()
<li>Preferences::hideOnCloseCheckBoxChanged()
<li>Preferences::idleDetectCheckBoxChanged()
<li>Preferences::slotCancel()
<li>Preferences::slotOk()
<li>Preferences::timeLogingCheckBoxChanged()
<li>Task::updateActiveIcon()
</ol>
\subsection private Private Slots
<ol>
<li>AddTaskDialog::enterWhatsThis()
<li>AddTaskDialog::slotAbsolutePressed()
<li>AddTaskDialog::slotRelativePressed()
<li>TDEAccelMenuWatch::removeDeadMenu()
</ol>
*/
/** \page connections Index of the signal/slot connections
<table>
<tr><td><center><b>Class</b></center></td> <td><center><b>Sender</b></center></td> <td><center><b>Sending Type</b></center></td>
<td><center><b>Signal</b></center></td> <td><center><b>Receiver</b></center></td> <td><center><b>Slot</b></center></td></tr>
<tr><td>AddTaskDialog</td> <td>_absoluteRB</td> <td>QRadioButton</td> <td>clicked()</td> <td>this</td> <td>slotAbsolutePressed</td></tr>
<tr><td>AddTaskDialog</td> <td>_relativeRB</td> <td>QRadioButton</td> <td>clicked()</td> <td>this</td> <td>slotRelativePressed</td></tr>
<tr><td>AddTaskDialog</td> <td>whatsThisBU</td> <td>QPushButton</td> <td>clicked()</td> <td>this</td> <td>enterWhatsThis</td></tr>
<tr><td>IdleTimer</td> <td>_timer</td> <td>QTimer</td> <td>timeout()</td> <td>this</td> <td>check</td></tr>
<tr><td>TDEAccelMenuWatch</td> <td>menu</td> <td>QPopupMenu</td> <td>destroyed()</td> <td>this</td> <td>removeeDeadMenu</td></tr>
<tr><td>Karm</td> <td>this</td> <td>Karm__QListView</td> <td>doubleClicked()</td> <td>this</td> <td>changeTimer</td></tr>
<tr><td>Karm</td> <td>_minuteTimer</td> <td>QTimer</td> <td>timeout()</td> <td>this</td> <td>minuteUpdate</td></tr>
<tr><td>Karm</td> <td>_idleTimer</td> <td>IdleTimer</td> <td>extractTime()</td> <td>this</td> <td>extractTime</td></tr>
<tr><td>Karm</td> <td>_idleTimer</td> <td>IdleTimer</td> <td>stopTimer()</td> <td>this</td> <td>stopAllTimers</td></tr>
<tr><td>Karm</td> <td>_preferences</td> <td>Preferences</td> <td>idlenessTimeout()</td> <td>_idleTimer</td> <td>setMaxIdle</td></tr>
<tr><td>Karm</td> <td>_preferences</td> <td>Preferences</td> <td>detectIdleness()</td> <td>_idleTimer</td> <td>toggleOverAllIdleDetection</td></tr>
<tr><td>Karm</td> <td>_preferences</td> <td>Preferences</td> <td>autoSave()</td> <td>this</td> <td>autoSaveChanged</td></tr>
<tr><td>Karm</td> <td>_preferences</td> <td>Preferences</td> <td>autoSavePeriod()</td> <td>this</td> <td>autoSavePeriodChanged</td></tr>
<tr><td>Karm</td> <td>_autoSaveTimer</td> <td>QTimer</td> <td>timeout()</td> <td>this</td> <td>save</td></tr>
<tr><td>Karm</td> <td>_menu</td> <td>QPopupMenu</td> <td>__()</td> <td>this</td> <td>startTimer</td></tr>
<tr><td>Karm</td> <td>_menu</td> <td>QPopupMenu</td> <td>__()</td> <td>this</td> <td>stopCurrentTimer</td></tr>
<tr><td>Karm</td> <td>this</td> <td>Karm__QListView</td> <td>contextMenuRequested()</td> <td>this</td> <td>slotRMB</td></tr>
<tr><td>Preferences</td> <td>_doAutoSaveW</td> <td>QCheckBox</td> <td>clicked()</td> <td>this</td> <td>autoSaveCheckboxChanged</td></tr>
<tr><td>Preferences</td> <td>_doTimeLogingW</td> <td>QCheckBox</td> <td>clicked()</td> <td>this</td> <td>timeLogingCheckboxChanged</td></tr>
<tr><td>Preferences</td> <td>_doIdleDetectionW</td> <td>QCheckBox</td> <td>clicked()</td> <td>this</td> <td>idleDetectCheckBoxChanged</td></tr>
<tr><td>Preferences</td> <td>__</td> <td>Preferences__KDialogBase</td> <td>__()</td> <td>__</td> <td>slotOk</td></tr>
<tr><td>Preferences</td> <td>__</td> <td>Preferences__KDialogBase</td> <td>__()</td> <td>__</td> <td>slotCancel</td></tr>
<tr><td>KArmWindow</td> <td>_karm</td> <td>Karm</td> <td>sessionTimeChanged()</td> <td>this</td> <td>updateTime</td></tr>
<tr><td>KarmWindow</td> <td>_karm</td> <td>Karm__QListView</td> <td>currentChanged()</td> <td>this</td> <td>slotSelectionChanged</td></tr>
<tr><td>KarmWindow</td> <td>_karm</td> <td>Karm__QListView</td> <td>selectionChanged()</td> <td>this</td> <td>slotSelectionChanged</td></tr>
<tr><td>KarmWindow</td> <td>_karm</td> <td>Karm</td> <td>timerTick()</td> <td>this</td> <td>updateTime</td></tr>
<tr><td>KarmWindow</td> <td>_karm</td> <td>Karm</td> <td>timerActive()</td> <td>this</td> <td>setActiveIcon</td></tr>
<tr><td>KarmWindow</td> <td>_karm</td> <td>Karm</td> <td>timerInactive()</td> <td>this</td> <td>setInactiveIcon</td></tr>
<tr><td>KarmWindow</td> <td>KStdAction__quit</td> <td>TDEAction</td> <td>__()</td> <td>this</td> <td>quit</td></tr>
<tr><td>KarmWindow</td> <td>KStdAction__print</td> <td>TDEAction</td> <td>__()</td> <td>this</td> <td>print</td></tr>
<tr><td>KarmWindow</td> <td>KStdAction__keyBindings</td> <td>TDEAction</td> <td>__()</td> <td>this</td> <td>keyBindings</td></tr>
<tr><td>KarmWindow</td> <td>KStdAction__preferences</td> <td>TDEAction</td> <td>__()</td> <td>_preferences</td> <td>showDialog</td></tr>
<tr><td>KarmWindow</td> <td>KStdAction__save</td> <td>TDEAction</td> <td>__()</td> <td>_preferences</td> <td>save</td></tr>
<tr><td>KarmWindow</td> <td>actionResetSession</td> <td>TDEAction</td> <td>__()</td> <td>this</td> <td>resetSessionTime</td></tr>
<tr><td>KarmWindow</td> <td>actionStart</td> <td>TDEAction</td> <td>__()</td> <td>_karm</td> <td>startTimer</td></tr>
<tr><td>KarmWindow</td> <td>actionStop</td> <td>TDEAction</td> <td>__()</td> <td>_karm</td> <td>stopCurrentTimer</td></tr>
<tr><td>KarmWindow</td> <td>actionNew</td> <td>TDEAction</td> <td>__()</td> <td>_karm</td> <td>newTask</td></tr>
<tr><td>KarmWindow</td> <td>actionNewSub</td> <td>TDEAction</td> <td>__()</td> <td>_karm</td> <td>newSubTask</td></tr>
<tr><td>KarmWindow</td> <td>actionDelete</td> <td>TDEAction</td> <td>__()</td> <td>_karm</td> <td>deleteTask</td></tr>
<tr><td>KarmWindow</td> <td>actionEdit</td> <td>TDEAction</td> <td>__()</td> <td>_karm</td> <td>editTask</td></tr>
<tr><td>Task</td> <td>_timer</td> <td>QTimer</td> <td>timeout()</td> <td>this</td> <td>updateActiveIcon</td></tr>
</table>
*/
|