• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

ktimetracker

  • sources
  • kde-4.12
  • kdepim
  • ktimetracker
Functions
ktimetrackerutility.cpp File Reference
#include "ktimetrackerutility.h"
#include <KGlobal>
#include <KLocale>
#include <math.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <fixx11h.h>
Include dependency graph for ktimetrackerutility.cpp:

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.

This file is part of the KDE documentation.
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.

ktimetracker

Skip menu "ktimetracker"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal