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

KUtils

  • sources
  • kde-4.12
  • kdelibs
  • kutils
  • kidletime
kidletime.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2009 Dario Freddi <drf at kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef KIDLETIME_H
20 #define KIDLETIME_H
21 
22 #include <QtCore/QObject>
23 #include <QtCore/QHash>
24 #include <kidletime_export.h>
25 class KIdleTimePrivate;
26 
39 class KIDLETIME_EXPORT KIdleTime : public QObject
40 {
41  Q_OBJECT
42  Q_DECLARE_PRIVATE(KIdleTime)
43  Q_DISABLE_COPY(KIdleTime)
44 
45 public:
51  static KIdleTime *instance();
52 
56  virtual ~KIdleTime();
57 
63  int idleTime() const;
64 
73  QHash<int, int> idleTimeouts() const;
74 
82  void simulateUserActivity();
83 
84 public Q_SLOTS:
101  int addIdleTimeout(int msec);
102 
110  void removeIdleTimeout(int identifier);
111 
119  void removeAllIdleTimeouts();
120 
138  void catchNextResumeEvent();
139 
149  void stopCatchingResumeEvent();
150 
151 Q_SIGNALS:
158  void resumingFromIdle();
159 
172  void timeoutReached(int identifier);
173 
183  void timeoutReached(int identifier, int msec);
184 
185 private:
186  KIdleTime();
187 
188  KIdleTimePrivate * const d_ptr;
189 
190  Q_PRIVATE_SLOT(d_func(), void _k_resumingFromIdle())
191  Q_PRIVATE_SLOT(d_func(), void _k_timeoutReached(int))
192 
193 };
194 
195 #endif /* KIDLETIME_H */
KIdleTime
KIdleTime is a singleton reporting information on idle time.
Definition: kidletime.h:39
QHash< int, int >
QObject
kidletime_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:34 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KUtils

Skip menu "KUtils"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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