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

libsolidcontrol

Solid::Control::Ifaces::PowerManager

Solid::Control::Ifaces::PowerManager Class Reference

#include <powermanager.h>

Inheritance diagram for Solid::Control::Ifaces::PowerManager:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class specifies the interface a backend will have to implement in order to be used in the system.

A power manager allows to control or query the power management features or the underlying platform.

Definition at line 45 of file ifaces/powermanager.h.


Signals

void acAdapterStateChanged (int newState)
void batteryStateChanged (int newState)
void brightnessChanged (float brightness)
void buttonPressed (int buttonType)
void schemeChanged (QString newScheme)

Public Member Functions

virtual
Solid::Control::PowerManager::AcAdapterState 
acAdapterState () const =0
virtual int batteryChargePercent () const =0
virtual
Solid::Control::PowerManager::BatteryState 
batteryState () const =0
virtual float brightness (const QString &device=QString())=0
virtual
Solid::Control::PowerManager::BrightnessControlsList 
brightnessControlsAvailable ()=0
virtual bool canDisableCpu (int cpuNum) const =0
virtual
Solid::Control::PowerManager::CpuFreqPolicy 
cpuFreqPolicy () const =0
 PowerManager (QObject *parent=0)
virtual QString scheme () const =0
virtual QString schemeDescription (const QString &schemeName) const =0
virtual bool setBrightness (float brightness, const QString &panel=QString())=0
virtual bool setCpuEnabled (int cpuNum, bool enabled)=0
virtual bool setCpuFreqPolicy (Solid::Control::PowerManager::CpuFreqPolicy newPolicy)=0
virtual bool setScheme (const QString &name)=0
virtual
Solid::Control::PowerManager::CpuFreqPolicies 
supportedCpuFreqPolicies () const =0
virtual QStringList supportedSchemes () const =0
virtual
Solid::Control::PowerManager::SuspendMethods 
supportedSuspendMethods () const =0
virtual KJob * suspend (Solid::Control::PowerManager::SuspendMethod method) const =0
virtual ~PowerManager ()

Constructor & Destructor Documentation

Solid::Control::Ifaces::PowerManager::PowerManager ( QObject *  parent = 0  ) 

Constructs a PowerManager.

Definition at line 23 of file ifaces/powermanager.cpp.

Solid::Control::Ifaces::PowerManager::~PowerManager (  )  [virtual]

Destructs a PowerManager object.

Definition at line 29 of file ifaces/powermanager.cpp.


Member Function Documentation

virtual Solid::Control::PowerManager::AcAdapterState Solid::Control::Ifaces::PowerManager::acAdapterState (  )  const [pure virtual]

Retrieves the current state of the system AC adapter.

Returns:
the current AC adapter state
See also:
Solid::Control::PowerManager::AcAdapterState

void Solid::Control::Ifaces::PowerManager::acAdapterStateChanged ( int  newState  )  [signal]

This signal is emitted when the AC adapter is plugged or unplugged.

Parameters:
newState the new state of the AC adapter, it's one of the type
See also:
Solid::Control::PowerManager::AcAdapterState

virtual int Solid::Control::Ifaces::PowerManager::batteryChargePercent (  )  const [pure virtual]

Retrieves the current charge percentage of the system batteries.

Returns:
the current global battery charge percentage

virtual Solid::Control::PowerManager::BatteryState Solid::Control::Ifaces::PowerManager::batteryState (  )  const [pure virtual]

Retrieves the current state of the system battery.

Returns:
the current battery state
See also:
Solid::Control::PowerManager::BatteryState

void Solid::Control::Ifaces::PowerManager::batteryStateChanged ( int  newState  )  [signal]

This signal is emitted when the system battery state changed.

Parameters:
newState the new state of the system battery, it's one of the type
See also:
Solid::Control::PowerManager::BatteryState

virtual float Solid::Control::Ifaces::PowerManager::brightness ( const QString &  device = QString()  )  [pure virtual]

Gets the screen brightness.

Parameters:
device the name of the device that you would like to control
Returns:
the brightness of the device, as a percentage

void Solid::Control::Ifaces::PowerManager::brightnessChanged ( float  brightness  )  [signal]

This signal is emitted when the brightness changes.

Parameters:
brightness the new brightness level

virtual Solid::Control::PowerManager::BrightnessControlsList Solid::Control::Ifaces::PowerManager::brightnessControlsAvailable (  )  [pure virtual]

Checks if brightness controls are enabled on this system.

Returns:
a list of the devices available to control

void Solid::Control::Ifaces::PowerManager::buttonPressed ( int  buttonType  )  [signal]

This signal is emitted when a button has been pressed.

Parameters:
buttonType the pressed button type, it's one of the type
See also:
Solid::Control::PowerManager::ButtonType

virtual bool Solid::Control::Ifaces::PowerManager::canDisableCpu ( int  cpuNum  )  const [pure virtual]

Checks if a CPU can be disabled.

Parameters:
cpuNum the number of the CPU we want to check
Returns:
true if the given CPU can be disabled, false otherwise

virtual Solid::Control::PowerManager::CpuFreqPolicy Solid::Control::Ifaces::PowerManager::cpuFreqPolicy (  )  const [pure virtual]

Retrieves the current CPU frequency policy of the system.

Returns:
the current CPU frequency policy used by the system
See also:
Solid::Control::PowerManager::CpuFreqPolicy

virtual QString Solid::Control::Ifaces::PowerManager::scheme (  )  const [pure virtual]

Retrieves the name of the current power management scheme used by the system.

Returns:
the current scheme

void Solid::Control::Ifaces::PowerManager::schemeChanged ( QString  newScheme  )  [signal]

This signal is emitted when the power management scheme has changed.

Parameters:
newScheme the new scheme name

virtual QString Solid::Control::Ifaces::PowerManager::schemeDescription ( const QString &  schemeName  )  const [pure virtual]

Retrieves a localized description corresponding to the given scheme.

Parameters:
schemeName the name of the scheme we request the description for
Returns:
the associated description

virtual bool Solid::Control::Ifaces::PowerManager::setBrightness ( float  brightness,
const QString &  panel = QString() 
) [pure virtual]

Sets the screen brightness.

Parameters:
brightness the desired screen brightness, as a percentage
device the name of the device that you would like to control, as given by brightnessControlsAvailable
Returns:
true if the brightness change succeeded, false otherwise

virtual bool Solid::Control::Ifaces::PowerManager::setCpuEnabled ( int  cpuNum,
bool  enabled 
) [pure virtual]

Enables or disables a CPU.

Parameters:
cpuNum the number of the CPU we want to enable or disable
enabled the new state of the CPU
Returns:
true if the state change succeeded, false otherwise

virtual bool Solid::Control::Ifaces::PowerManager::setCpuFreqPolicy ( Solid::Control::PowerManager::CpuFreqPolicy  newPolicy  )  [pure virtual]

Changes the current CPU frequency policy of the system.

Parameters:
newPolicy the new policy
Returns:
true if the policy change succeeded, false otherwise
See also:
Solid::Control::PowerManager::CpuFreqPolicy

virtual bool Solid::Control::Ifaces::PowerManager::setScheme ( const QString &  name  )  [pure virtual]

Changes the current power management scheme.

Parameters:
name the name of the new scheme
Returns:
true if the scheme change succeeded, false otherwise

virtual Solid::Control::PowerManager::CpuFreqPolicies Solid::Control::Ifaces::PowerManager::supportedCpuFreqPolicies (  )  const [pure virtual]

Retrieves the set of CPU frequency policies supported by the system.

Returns:
the CPU frequency policies supported by this system
See also:
Solid::Control::PowerManager::CpuFreqPolicy

Solid::Control::PowerManager::CpuFreqPolicies

virtual QStringList Solid::Control::Ifaces::PowerManager::supportedSchemes (  )  const [pure virtual]

Retrieves the list of power management schemes available on this system.

Returns:
the available power management schemes

virtual Solid::Control::PowerManager::SuspendMethods Solid::Control::Ifaces::PowerManager::supportedSuspendMethods (  )  const [pure virtual]

Retrieves the set of suspend methods supported by the system.

Returns:
the suspend methods supported by this system
See also:
Solid::Control::PowerManager::SuspendMethod

Solid::Control::PowerManager::SuspendMethods

virtual KJob* Solid::Control::Ifaces::PowerManager::suspend ( Solid::Control::PowerManager::SuspendMethod  method  )  const [pure virtual]

Requests a suspend of the system.

Parameters:
method the suspend method to use
Returns:
the job handling the operation


The documentation for this class was generated from the following files:
  • ifaces/powermanager.h
  • ifaces/powermanager.cpp

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