Solid

statesjob.h
1 /*
2  SPDX-FileCopyrightText: 2014 Alejandro Fiestas Olivares <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef SOLID_STATES_JOB_H
8 #define SOLID_STATES_JOB_H
9 
10 #include "solid_export.h"
11 #include "power.h"
12 
13 #include <Solid/Job>
14 
15 namespace Solid
16 {
17 class StatesJobPrivate;
18 /**
19  * Returns the states supported on the device
20  *
21  * Different devices and different operating systems support
22  * a different set of states such Sleep or Hibernation.
23  *
24  */
25 class SOLID_EXPORT StatesJob : public Job
26 {
27  Q_OBJECT
28 
29 public:
30  explicit StatesJob(QObject *parent = nullptr);
31 
32  /**
33  * Once the job is finished, returns the supported Power::InhibitionTypes
34  */
35  Power::InhibitionTypes states() const;
36 
37 private Q_SLOTS:
38  void doStart() override;
39 
40 /**
41  * We have to re-declare the signal because
42  * if not, Q_PROPERTY wouldn't work.
43  */
44 Q_SIGNALS:
45  void result(Solid::Job *job);
46 
47 private:
48  Q_DECLARE_PRIVATE(StatesJob)
49 };
50 } //Solid namespace
51 #endif //SOLID_STATES_JOB_H
Returns the states supported on the device.
Definition: statesjob.h:25
This class represents an asynchronous job performed by Solid, it is usually not used directly but ins...
Definition: job.h:36
The single responsibility of this class is to create arguments valid for logind Inhibit call...
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 22:51:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.