Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QPowerSourceProvider Class Reference
[QtBaseModule]

The QPowerSourceProvider class provides an interface for power sources to integrate into Qtopia. More...

    #include <QPowerSourceProvider>

Inherits QPowerSource.

Inherited by DefaultBattery.

Public Functions

Public Slots

Additional Inherited Members


Detailed Description

The QPowerSourceProvider class provides an interface for power sources to integrate into Qtopia.

Power sources are components, either external or internal, such as batteries or wall sockets that provide power to a Qt Extended device. The QPowerSourceProvider API allows the addition of information about new power sources into Qtopia.

By deriving from the QPowerSourceProvider (or just creating an instance), an application or system component can provide information about a power source that can then be accessed through the QPowerSource API. For example,

    QPowerSourceProvider *battery = new QPowerSourceProvider(QPowerSource::Battery, "My Pretend Battery");
    battery->setAvailability(QPowerSource::NotAvailable);
    battery->setCharging(true);

See also QPowerSource.


Member Function Documentation

QPowerSourceProvider::QPowerSourceProvider ( Type type, const QString & id, QObject * parent = 0 )

Create a new QPowerSourceProvider of the given type and with the specified id and parent.

QPowerSourceProvider::~QPowerSourceProvider ()   [virtual]

Destroy the QPowerSourceProvider instance and remove information about the power source from Qtopia.

void QPowerSourceProvider::setAvailability ( QPowerSource::Availability availability )   [slot]

Set the availability of the power source.

void QPowerSourceProvider::setCapacity ( int capacity )   [slot]

Set the capacity, in milliamp-hourse, of the power source.

void QPowerSourceProvider::setCharge ( int charge )   [slot]

Set the current charge of the power source.

void QPowerSourceProvider::setCharging ( bool charging )   [slot]

Set the charging status of the power source.

void QPowerSourceProvider::setTimeRemaining ( int remaining )   [slot]

Set the time remaining, in minutes, for the power source.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3