Baloo

powerstatemonitor.h
1 /*
2  This file is part of the KDE Project
3  SPDX-FileCopyrightText: 2008 Sebastian Trueg <[email protected]>
4  SPDX-FileCopyrightText: 2012-2015 Vishesh Handa <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef BALOO_FILEINDEXER_POWER_STATE_MONITOR_H_
10 #define BALOO_FILEINDEXER_POWER_STATE_MONITOR_H_
11 
12 #include <QObject>
13 
14 namespace Baloo
15 {
16 
17 class PowerStateMonitor : public QObject
18 {
19  Q_OBJECT
20 
21 public:
22  explicit PowerStateMonitor(QObject* parent = nullptr);
23 
24  bool isOnBattery() const {
25  return m_isOnBattery;
26  }
27 
28 Q_SIGNALS:
29  /**
30  * Emitted when the power management status changes.
31  *
32  * \param conserveResources true if you should conserve resources
33  */
34  void powerManagementStatusChanged(bool conserveResources);
35 
36 private Q_SLOTS:
37  void slotPowerManagementStatusChanged(bool conserveResources);
38 
39 private:
40  bool m_enabled;
41  bool m_isOnBattery;
42 };
43 }
44 
45 #endif
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
Implements storage for docIds without any associated data Instantiated for:
Definition: coding.cpp:11
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 03:53:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.