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

ktimetracker

  • sources
  • kde-4.14
  • kdepim
  • ktimetracker
focusdetector.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007 by René Mérou <ochominutosdearco@gmail.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the
16  * Free Software Foundation, Inc.
17  * 51 Franklin Street, Fifth Floor
18  * Boston, MA 02110-1301 USA.
19  *
20  */
21 
22 #include "focusdetector.h"
23 #include "ktimetrackerutility.h"
24 
25 
26 #include <KDebug>
27 
28 FocusDetector::FocusDetector()
29 {
30  KWindowSystem* kw=KWindowSystem::self();
31  connect(kw, SIGNAL(activeWindowChanged(WId)), SLOT(slotfocuschanged()) );
32 }
33 
34 void FocusDetector::slotfocuschanged()
35 {
36  QString sysanswer = getFocusWindow();
37  emit( newFocus( sysanswer ) );
38 }
39 
FocusDetector::FocusDetector
FocusDetector()
Initializes the time period.
Definition: focusdetector.cpp:28
FocusDetector::slotfocuschanged
void slotfocuschanged()
Definition: focusdetector.cpp:34
QString
focusdetector.h
getFocusWindow
QString getFocusWindow()
Get the name of the window that has the focus.
Definition: ktimetrackerutility.cpp:32
FocusDetector::newFocus
void newFocus(const QString &)
ktimetrackerutility.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:34 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
  • pimprint

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