Home · All Namespaces · All Classes

UnlockArea Class Reference

#include <unlockarea.h>

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

List of all members.

Public Member Functions

 UnlockArea (QGraphicsItem *parent=NULL)
virtual ~UnlockArea ()
void setEnabled (bool enabled)
virtual void setActive (bool active)

Detailed Description

Definition at line 36 of file unlockarea.h.


Constructor & Destructor Documentation

UnlockArea::UnlockArea ( QGraphicsItem *  parent = NULL  ) 

Definition at line 29 of file unlockarea.cpp.

00029                                             :
00030     MStylableWidget(parent),
00031     m_enabled(false),
00032     m_active(false)
00033 {
00034     QGraphicsLinearLayout   *layout =
00035         new QGraphicsLinearLayout (Qt::Vertical);
00036 
00037     setObjectName ("LockLandArea");
00038 
00039     // Create the unlock icon
00040     MImageWidget    *unlock_icon;
00041 
00042     unlock_icon = new MImageWidget;
00043     unlock_icon->setImage ("icon-m-common-unlocked", QSize (32, 32));
00044     unlock_icon->setZoomFactor (1.0);
00045     unlock_icon->setObjectName ("LockScreenUnlockIcon");
00046 
00047     m_unlock_icon = new MWidget;
00048     QGraphicsLinearLayout   *icon_layout =
00049         new QGraphicsLinearLayout (Qt::Horizontal);
00050     icon_layout->addStretch ();
00051     icon_layout->addItem (unlock_icon);
00052     icon_layout->addStretch ();
00053     m_unlock_icon->setLayout (icon_layout);
00054 
00055     // Add the unlock icon centered
00056     layout->addStretch ();
00057     layout->addItem (m_unlock_icon);
00058     layout->addStretch ();
00059 
00060     setLayout (layout);
00061 
00062     updateState ();
00063 }

UnlockArea::~UnlockArea (  )  [virtual]

Definition at line 65 of file unlockarea.cpp.

00066 {
00067     // Free the resources here...
00068 }


Member Function Documentation

void UnlockArea::setActive ( bool  active  )  [virtual]

Definition at line 71 of file unlockarea.cpp.

00072 {
00073     if (m_enabled == false)
00074         return; /* no-op when disabled... */
00075 
00076     if (m_active == active)
00077         return;
00078 
00079     m_active = active;
00080 
00081     updateState ();
00082 }

void UnlockArea::setEnabled ( bool  enabled  ) 

Definition at line 85 of file unlockarea.cpp.

00086 {
00087     if (m_enabled == enabled)
00088         return;
00089 
00090     m_enabled = enabled;
00091     // Set active to false when enable val. has been changed...
00092     m_active = false;
00093 
00094     updateState ();
00095 }


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

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