Home · All Namespaces · All Classes

StatusIndicatorMenuWindow Class Reference

#include <statusindicatormenuwindow.h>

Inheritance diagram for StatusIndicatorMenuWindow:
Inheritance graph
[legend]
Collaboration diagram for StatusIndicatorMenuWindow:
Collaboration graph
[legend]

List of all members.

Public Slots

void makeVisible ()
 

Signals

void visibilityChanged (bool visible)

Public Member Functions

 StatusIndicatorMenuWindow (QWidget *parent=NULL)
 ~StatusIndicatorMenuWindow ()

Protected Member Functions

bool event (QEvent *event)
 REIMPLEMENTATION

Detailed Description

Main window for the M Status Indicator Menu. The window contains an application page which is populated with a list of plugins.

Definition at line 36 of file statusindicatormenuwindow.h.


Constructor & Destructor Documentation

StatusIndicatorMenuWindow::StatusIndicatorMenuWindow ( QWidget parent = NULL  ) 

Constructs a main window for the M Status Indicator Menu.

Parameters:
parent Parent for the widget, defaults to NULL

Definition at line 26 of file statusindicatormenuwindow.cpp.

00026                                                                     :
00027     MWindow(parent),
00028     menuWidget(NULL)
00029 {
00030     currentLanguage = MLocale().language();
00031 
00032     setTranslucentBackground(true);
00033     setWindowTitle("Status Indicator Menu");
00034     setProperty("followsCurrentApplicationWindowOrientation", true);
00035     connect(this, SIGNAL(displayEntered()), this, SLOT(displayActive()));
00036     connect(this, SIGNAL(displayExited()), this, SLOT(displayInActive()));
00037 
00038 #ifdef HAVE_QMSYSTEM
00039     /*
00040      * We need to receive updates when device lock state changes
00041      * to prevent status indicator menu opening when device lock is on
00042      */
00043     connect (&qmLocks, SIGNAL(stateChanged (MeeGo::QmLocks::Lock, MeeGo::QmLocks::State)), this,
00044                                    SLOT(setWindowStateAccordingToDeviceLockState(MeeGo::QmLocks::Lock, MeeGo::QmLocks::State)));
00045     if (qmLocks.getState(MeeGo::QmLocks::Device) != MeeGo::QmLocks::Locked) {
00046         deviceLocked = false;
00047     } else {
00048         deviceLocked = true;
00049     }
00050 #endif
00051 
00052     // Set the X window type, so that the window does not appear in the switcher and
00053     // home screen can provide the correct UI flow
00054     setAttribute(Qt::WA_X11NetWmWindowTypeMenu);
00055 
00056     resetMenuWidget();
00057 }

StatusIndicatorMenuWindow::~StatusIndicatorMenuWindow (  ) 

Destructor

Definition at line 59 of file statusindicatormenuwindow.cpp.

00060 {
00061 }


Member Function Documentation

bool StatusIndicatorMenuWindow::event ( QEvent *  event  )  [protected]

REIMPLEMENTATION

Definition at line 125 of file statusindicatormenuwindow.cpp.

00126 {
00127     bool windowIsHandlingEvent = MWindow::event(event);
00128     // Recreate status menu widget when language changes and window is handling the language change
00129     if (event->type() == QEvent::LanguageChange && windowIsHandlingEvent) {
00130         QString newLanguage = MLocale().language();
00131         // Check that language actually changed to avoid unnecessary resets
00132         if (currentLanguage != newLanguage) {
00133             currentLanguage = newLanguage;
00134             resetMenuWidget();
00135         }
00136     }
00137     return windowIsHandlingEvent;
00138 }

void StatusIndicatorMenuWindow::makeVisible (  )  [slot]

Makes the window visible by showing or raising it.

Definition at line 92 of file statusindicatormenuwindow.cpp.

00093 {
00094 #ifdef HAVE_QMSYSTEM
00095     if (deviceLocked) {
00096         return;
00097     }
00098 #endif
00099     if (!isVisible()) {
00100         // If status indicator window is not visible, then show it
00101         show();
00102     }
00103 
00104     // Raise it on top
00105     raise();
00106 }

void StatusIndicatorMenuWindow::visibilityChanged ( bool  visible  )  [signal]

Signal the current visility status of window

Parameters:
visible true when window is top and false when window is obscured

The documentation for this class was generated from the following files:

Copyright © 2010 Nokia Corporation Generated on Wed Nov 10 16:05:13 2010
Doxygen 1.6.1
MeeGo Touch