Baloo

powerstatemonitor.h
1/*
2 This file is part of the KDE Project
3 SPDX-FileCopyrightText: 2008 Sebastian Trueg <trueg@kde.org>
4 SPDX-FileCopyrightText: 2012-2015 Vishesh Handa <vhanda@kde.org>
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
14namespace Baloo
15{
16
17class PowerStateMonitor : public QObject
18{
20
21public:
22 explicit PowerStateMonitor(QObject* parent = nullptr);
23
24 bool isOnBattery() const {
25 return m_isOnBattery;
26 }
27
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
36private Q_SLOTS:
37 void slotPowerManagementStatusChanged(bool conserveResources);
38
39private:
40 bool m_enabled;
41 bool m_isOnBattery;
42};
43}
44
45#endif
Implements storage for docIds without any associated data Instantiated for:
Definition coding.cpp:11
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.