ktimetracker
#include "ktimetrackerutility.h"#include <KGlobal>#include <KLocale>#include <math.h>#include <stdlib.h>#include <X11/Xlib.h>#include <fixx11h.h>
Go to the source code of this file.
| Functions | |
| int | desktopcount () | 
| QString | formatTime (double minutes, bool decimal) | 
| QString | getFocusWindow () | 
Function Documentation
| int desktopcount | ( | ) | 
Get the number of virtual desktops Delivers 4 for four virtual desktops, 1 for one virtual desktop, -1 if it could not be determined.
The absolute value of desktopcount is always the usable number of desktops
Definition at line 52 of file ktimetrackerutility.cpp.
| QString formatTime | ( | double | minutes, | 
| bool | decimal = false | ||
| ) | 
Format time for output.
All times output on screen or report output go through this function. If the second argument is true, the time is output as a two-place decimal. Otherwise the format is hh:mi. Examples: 30 seconds are 0.5 minutes. The output of formatTiMe(0.5,true) is 0.008333, because 0.5 minutes are 0.008333 hours. The output of formatTiMe(0.5,false) is 0:01, because 0.5 minutes are 0:01 hours rounded.
Definition at line 37 of file ktimetrackerutility.cpp.
| QString getFocusWindow | ( | ) | 
Get the name of the window that has the focus.
Definition at line 32 of file ktimetrackerutility.cpp.
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.
 KDE API Reference
    KDE API Reference