Home · All Namespaces · All Classes
Signals | Public Member Functions | Protected Member Functions | Protected Attributes

LockScreenView Class Reference

#include <lockscreenview.h>

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

List of all members.

Signals

void unlocked ()

Public Member Functions

 LockScreenView (MSceneWindow *controller)
 ~LockScreenView ()

Protected Member Functions

virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 REIMPLEMENTATION

Protected Attributes

QGraphicsLinearLayout * layout
 
MWidgetControllerlockScreenHeader
 lock screen header widget

Detailed Description

Definition at line 29 of file lockscreenview.h.


Constructor & Destructor Documentation

LockScreenView::LockScreenView ( MSceneWindow controller  ) 

Definition at line 28 of file lockscreenview.cpp.

                                                       : MSceneWindowView(controller),
    layout(new QGraphicsLinearLayout(Qt::Vertical)),
    lockScreenHeader(new MWidgetController),
    controller(controller),
    gconfBgLandscape(new MGConfItem(GCONF_BG_LANDSCAPE, this)),
    gconfBgPortrait(new MGConfItem(GCONF_BG_PORTRAIT, this)),
    landscapePixmap(new QPixmap),
    portraitPixmap(new QPixmap)
{
    // Set the main layout
    layout->setContentsMargins(0, 0, 0, 0);
    layout->setSpacing(0);
    controller->setLayout(layout);

    // Create a header for the lock screen
    lockScreenHeader->setViewType("lockScreenHeader");
    layout->addItem(lockScreenHeader);

    connect(gconfBgLandscape, SIGNAL(valueChanged()), this, SLOT(reloadLandscapeBackground()));
    connect(gconfBgPortrait, SIGNAL(valueChanged()), this, SLOT(reloadPortraitBackground()));

    // Load the backgrounds if any...
    reloadLandscapeBackground();
    reloadPortraitBackground();
}

LockScreenView::~LockScreenView (  ) 

Definition at line 54 of file lockscreenview.cpp.

{
    delete gconfBgLandscape;
    delete gconfBgPortrait;
    delete landscapePixmap;
    delete portraitPixmap;
    delete lockScreenHeader;
}


Member Function Documentation

void LockScreenView::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget widget = 0 
) [protected, virtual]

REIMPLEMENTATION

Definition at line 63 of file lockscreenview.cpp.

{
    QPixmap *pixmap = (geometry().height() > geometry().width()) ? portraitPixmap : landscapePixmap;

    painter->drawPixmap(0, 0, pixmap->width(), pixmap->height(), *pixmap);
}

void LockScreenView::unlocked (  )  [signal]

Member Data Documentation

QGraphicsLinearLayout* LockScreenView::layout [protected]

Layout for the view

Definition at line 51 of file lockscreenview.h.

lock screen header widget

Definition at line 53 of file lockscreenview.h.


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

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