• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libsolidcontrol

powermanager.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2006 Kevin Ottens <ervin@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 
00018 */
00019 
00020 #ifndef SOLID_IFACES_POWERMANAGER_H
00021 #define SOLID_IFACES_POWERMANAGER_H
00022 
00023 #include <QtCore/QObject>
00024 #include <QtCore/QStringList>
00025 
00026 #include "../solid_control_export.h"
00027 
00028 #include "../powermanager.h"
00029 
00030 class KJob;
00031 
00032 namespace Solid
00033 {
00034 namespace Control
00035 {
00036 namespace Ifaces
00037 {
00045     class SOLIDCONTROLIFACES_EXPORT PowerManager : public QObject
00046     {
00047         Q_OBJECT
00048 
00049     public:
00053         PowerManager(QObject *parent = 0);
00054 
00058         virtual ~PowerManager();
00059 
00060 
00066         virtual QStringList supportedSchemes() const = 0;
00067 
00074         virtual QString schemeDescription(const QString &schemeName) const = 0;
00075 
00082         virtual QString scheme() const = 0;
00083 
00090         virtual bool setScheme(const QString &name) = 0;
00091 
00092 
00099         virtual Solid::Control::PowerManager::BatteryState batteryState() const = 0;
00100 
00106         virtual int batteryChargePercent() const = 0;
00107 
00114         virtual Solid::Control::PowerManager::AcAdapterState acAdapterState() const = 0;
00115 
00116 
00124         virtual Solid::Control::PowerManager::SuspendMethods supportedSuspendMethods() const = 0;
00125 
00132         virtual KJob *suspend(Solid::Control::PowerManager::SuspendMethod method) const = 0;
00133 
00134 
00142         virtual Solid::Control::PowerManager::CpuFreqPolicies supportedCpuFreqPolicies() const = 0;
00143 
00150         virtual Solid::Control::PowerManager::CpuFreqPolicy cpuFreqPolicy() const = 0;
00151 
00159         virtual bool setCpuFreqPolicy(Solid::Control::PowerManager::CpuFreqPolicy newPolicy) = 0;
00160 
00167         virtual bool canDisableCpu(int cpuNum) const = 0;
00168 
00176         virtual bool setCpuEnabled(int cpuNum, bool enabled) = 0;
00177 
00183         virtual Solid::Control::PowerManager::BrightnessControlsList brightnessControlsAvailable() = 0;
00184 
00191         virtual float brightness(const QString &device = QString()) = 0;
00192 
00200         virtual bool setBrightness(float brightness, const QString &panel = QString()) = 0;
00201 
00202     Q_SIGNALS:
00208         void schemeChanged(QString newScheme);
00209 
00216         void acAdapterStateChanged(int newState);
00217 
00224         void batteryStateChanged(int newState);
00225 
00232         void buttonPressed(int buttonType);
00233 
00239         void brightnessChanged(float brightness);
00240     };
00241 }
00242 }
00243 }
00244 
00245 #endif

libsolidcontrol

Skip menu "libsolidcontrol"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal