• 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
Enumerations | Functions | Variables
ktimetrackerutility.h File Reference
#include <KDebug>
#include <KWindowSystem>
#include <QString>
Include dependency graph for ktimetrackerutility.h:
This graph shows which files directly or indirectly include this file:

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
Enumerator
KTIMETRACKER_ERR_GENERIC_SAVE_FAILED 
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 

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.

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