![]() |
Home · All Namespaces · All Classes |
#include <batterybusinesslogic.h>


Public Slots | |
| void | showLowBatteryNotification () |
Signals | |
| void | lowBatteryAlert () |
Public Member Functions | |
| LowBatteryNotifier (QObject *parent=0) | |
| virtual | ~LowBatteryNotifier () |
Please note that this class will emit the lowBatteryAlert() when the user needed to be alerted about the low battery condition, that is this class will not generate new notifications. The BatteryBusinessLogic will connect to this signal and handle the notifications.
Definition at line 41 of file batterybusinesslogic.h.
| LowBatteryNotifier::LowBatteryNotifier | ( | QObject * | parent = 0 |
) |
Definition at line 42 of file batterybusinesslogic.cpp.
:
QObject (parent),
m_Timer (new QTimer (this)),
m_Sleep (false)
{
m_ActiveInterval = LowBatteryActiveInterval;
m_InactiveInterval = LowBatteryInactiveInterval;
m_Time.start ();
#ifdef HAVE_QMSYSTEM
m_Display = new MeeGo::QmDisplayState;
m_Sleep = m_Display->get () == MeeGo::QmDisplayState::Off;
connect (m_Display,
SIGNAL (displayStateChanged (MeeGo::QmDisplayState::DisplayState)),
this,
SLOT (displayStateChanged (MeeGo::QmDisplayState::DisplayState)));
#endif
connect (m_Timer, SIGNAL (timeout ()),
this, SLOT (showLowBatteryNotification ()));
}

| LowBatteryNotifier::~LowBatteryNotifier | ( | ) | [virtual] |
Definition at line 65 of file batterybusinesslogic.cpp.
{
}
| void LowBatteryNotifier::lowBatteryAlert | ( | ) | [signal] |
| void LowBatteryNotifier::showLowBatteryNotification | ( | ) | [slot] |
Definition at line 71 of file batterybusinesslogic.cpp.
{
emit lowBatteryAlert ();
m_Time.start (); //restart time
#ifdef HAVE_QMSYSTEM
switch (m_Display->get ()) {
case MeeGo::QmDisplayState::On:
case MeeGo::QmDisplayState::Dimmed:
m_Sleep = false;
m_Timer->start (m_ActiveInterval);
break;
case MeeGo::QmDisplayState::Off:
m_Sleep = true;
m_Timer->start (m_InactiveInterval);
break;
default:
break;
}
#endif
}

| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:19:35 Doxygen 1.7.1 |
MeeGo Touch |