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

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • services
  • fileindexer
eventmonitor.h
Go to the documentation of this file.
1 /* This file is part of the KDE Project
2  Copyright (c) 2008 Sebastian Trueg <trueg@kde.org>
3  Copyright (c) 2012 Vishesh Handa <me@vhanda.in>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library 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 GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _NEPOMUK_FILEINDEXER_EVENT_MONITOR_H_
21 #define _NEPOMUK_FILEINDEXER_EVENT_MONITOR_H_
22 
23 #include <QtCore/QObject>
24 #include <QtCore/QStringList>
25 #include <QtCore/QTimer>
26 #include <QtCore/QDateTime>
27 
28 class KDiskFreeSpace;
29 
30 namespace Nepomuk2 {
31 
32  class EventMonitor : public QObject
33  {
34  Q_OBJECT
35 
36  public:
37  EventMonitor( QObject* parent = 0 );
38  ~EventMonitor();
39 
40  bool isIdle() const { return m_isIdle; }
41  bool isDiskSpaceLow() const { return m_isDiskSpaceLow; }
42  bool isOnBattery() const { return m_isOnBattery; }
43 
44  signals:
50  void powerManagementStatusChanged( bool conserveResources );
51 
56  void diskSpaceStatusChanged( bool isLow );
57 
61  void idleStatusChanged( bool isIdle );
62 
63  public slots:
64  void enable();
65  void disable();
66  void suspendDiskSpaceMonitor();
67  void resumeDiskSpaceMonitor();
68 
69  private Q_SLOTS:
70  void slotIdleTimeoutReached();
71  void slotResumeFromIdle();
72  void slotPowerManagementStatusChanged( bool conserveResources );
73  void slotCheckAvailableSpace();
74 
75  private:
76  bool m_enabled;
77  bool m_isIdle;
78  bool m_isDiskSpaceLow;
79  bool m_isOnBattery;
80 
81  // timer used to periodically check for available space
82  QTimer m_availSpaceTimer;
83  };
84 }
85 
86 #endif
Nepomuk2::EventMonitor::isIdle
bool isIdle() const
Definition: eventmonitor.h:40
QObject
Nepomuk2::EventMonitor::isOnBattery
bool isOnBattery() const
Definition: eventmonitor.h:42
Nepomuk2::EventMonitor::resumeDiskSpaceMonitor
void resumeDiskSpaceMonitor()
Definition: eventmonitor.cpp:146
Nepomuk2::EventMonitor::disable
void disable()
Definition: eventmonitor.cpp:131
Nepomuk2::EventMonitor::idleStatusChanged
void idleStatusChanged(bool isIdle)
Emitted when the system becomes idle.
Nepomuk2::EventMonitor::isDiskSpaceLow
bool isDiskSpaceLow() const
Definition: eventmonitor.h:41
Nepomuk2::EventMonitor::~EventMonitor
~EventMonitor()
Definition: eventmonitor.cpp:72
Nepomuk2::EventMonitor
Definition: eventmonitor.h:32
Nepomuk2::EventMonitor::enable
void enable()
Definition: eventmonitor.cpp:119
Nepomuk2::EventMonitor::powerManagementStatusChanged
void powerManagementStatusChanged(bool conserveResources)
Emitted when the power management status changes.
Nepomuk2::EventMonitor::suspendDiskSpaceMonitor
void suspendDiskSpaceMonitor()
Definition: eventmonitor.cpp:141
Nepomuk2::EventMonitor::EventMonitor
EventMonitor(QObject *parent=0)
Definition: eventmonitor.cpp:49
Nepomuk2::EventMonitor::diskSpaceStatusChanged
void diskSpaceStatusChanged(bool isLow)
Emitted when the disk space is low.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • 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