Home · All Namespaces · All Classes
Public Member Functions

LockScreenHeaderView Class Reference

#include <lockscreenheaderview.h>

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

List of all members.

Public Member Functions

 LockScreenHeaderView (MWidgetController *controller)
virtual ~LockScreenHeaderView ()

Detailed Description

The feed view draws a header for the lock screen.

Definition at line 31 of file lockscreenheaderview.h.


Constructor & Destructor Documentation

LockScreenHeaderView::LockScreenHeaderView ( MWidgetController controller  ) 

Constructs a LockScreenHeaderView.

Parameters:
controller the controller to be used

Definition at line 27 of file lockscreenheaderview.cpp.

                                                                        :
    MWidgetView(controller),
    layout(new QGraphicsLinearLayout(Qt::Vertical))
{
    layout->setContentsMargins(0, 0, 0, 0);
    layout->setSpacing(0);

    // Add a status area to the main layout
    StatusArea *statusArea = new StatusArea;
    statusArea->setViewType("lockScreen");
    layout->addItem(statusArea);

    // Create a layout for the time and date
    Clock *clock = new Clock;
    clock->setObjectName("LockScreenHeaderClock");
    QGraphicsLinearLayout *dateTimeVerticalLayout = new QGraphicsLinearLayout(Qt::Vertical);
    dateTimeVerticalLayout->setContentsMargins(0, 0, 0, 0);
    dateTimeVerticalLayout->setSpacing(0);
    dateTimeVerticalLayout->addItem(clock);
    dateTimeVerticalLayout->addItem(new Date);
    dateTimeVerticalLayout->addStretch();

    // Create a widget with a horizontal layout to align the time and date to the right and to apply a background image
    MWidgetController *dateTimeWidget = new MWidgetController;
    dateTimeWidget->setView(new MWidgetView(dateTimeWidget));
    dateTimeWidget->setObjectName("LockScreenHeaderDateTime");
    QGraphicsLinearLayout *dateTimeHorizontalLayout = new QGraphicsLinearLayout(Qt::Horizontal);
    dateTimeHorizontalLayout->setContentsMargins(0, 0, 0, 0);
    dateTimeHorizontalLayout->setSpacing(0);
    dateTimeHorizontalLayout->addStretch();
    dateTimeHorizontalLayout->addItem(dateTimeVerticalLayout);
    dateTimeWidget->setLayout(dateTimeHorizontalLayout);

    // Add the date and time to the main layout
    layout->addItem(dateTimeWidget);
    controller->setLayout(layout);
}

LockScreenHeaderView::~LockScreenHeaderView (  )  [virtual]

Destroys the LockScreenHeaderView.

Definition at line 65 of file lockscreenheaderview.cpp.

{
}


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