ktimetracker
#include <KDebug>#include <KWindowSystem>#include <QString>

Go to the source code of this file.
| Enumerations | |
| enum | KTIMETRACKER_Errors { KTIMETRACKER_ERR_GENERIC_SAVE_FAILED = 1, KTIMETRACKER_ERR_COULD_NOT_MODIFY_RESOURCE, KTIMETRACKER_ERR_MEMORY_EXHAUSTED, KTIMETRACKER_ERR_UID_NOT_FOUND, KTIMETRACKER_ERR_INVALID_DATE, KTIMETRACKER_ERR_INVALID_TIME, KTIMETRACKER_ERR_INVALID_DURATION, KTIMETRACKER_MAX_ERROR_NO = KTIMETRACKER_ERR_INVALID_DURATION } | 
| Functions | |
| int | desktopcount () | 
| QString | formatTime (double minutes, bool decimal=false) | 
| QString | getFocusWindow () | 
| Variables | |
| const int | secsPerMinute =60 | 
Enumeration Type Documentation
| enum KTIMETRACKER_Errors | 
Definition at line 55 of file ktimetrackerutility.h.
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.
Variable Documentation
| const int secsPerMinute =60 | 
Definition at line 53 of file ktimetrackerutility.h.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:35 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