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

StatusIndicatorMenuDropDownView Class Reference

#include <statusindicatormenudropdownview.h>

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

List of all members.

Public Member Functions

 StatusIndicatorMenuDropDownView (StatusIndicatorMenu *controller)
virtual ~StatusIndicatorMenuDropDownView ()

Static Public Attributes

static const int VIEW_INITIALIZATION_DELAY = 30 * 1000
 Delay for the initialization of the view (in milliseconds).

Protected Member Functions

virtual void applyStyle ()
 REIMPLEMENTATION

Detailed Description

Definition at line 107 of file statusindicatormenudropdownview.h.


Constructor & Destructor Documentation

StatusIndicatorMenuDropDownView::StatusIndicatorMenuDropDownView ( StatusIndicatorMenu controller  ) 

Constructs a view for a notification area.

Parameters:
controller the controller of this StatusIndicatorMenuDropDownView

Definition at line 84 of file statusindicatormenudropdownview.cpp.

                                                                                                :
    MSceneWindowView(controller),
    controller(controller),
    statusBar(new MStatusBar),
    settingsPluginsExtensionArea(NULL),
    statusIndicatorExtensionArea(NULL),
    pannableViewport(NULL),
    closeButtonOverlay(NULL),
    backgroundWidget(new MWidgetController)
{
    // Show status bar
    controller->sceneManager()->appearSceneWindowNow(statusBar);

    // Create close button overlay
    closeButtonOverlay = createCloseButtonOverlay();

    // Create the pannable area background widget
    backgroundWidget->setView(new MWidgetView(backgroundWidget));
    backgroundWidget->setObjectName("StatusIndicatorMenuWindowBackground");

    connect(controller, SIGNAL(hideRequested()), this, SLOT(resetViewport()));
    connect(controller, SIGNAL(displayEntered()), SLOT(ensureIsViewable()));

    // Schedule the view to be initialized
    QTimer::singleShot(VIEW_INITIALIZATION_DELAY, this, SLOT(ensureIsViewable()));
}

StatusIndicatorMenuDropDownView::~StatusIndicatorMenuDropDownView (  )  [virtual]

Destroys the notification area view.

Definition at line 112 of file statusindicatormenudropdownview.cpp.

{
    delete backgroundWidget;
    delete statusBar;
    delete closeButtonOverlay;
    delete pannableViewport;
    delete topRowWidget;
}


Member Function Documentation

void StatusIndicatorMenuDropDownView::applyStyle (  )  [protected, virtual]

REIMPLEMENTATION

Definition at line 309 of file statusindicatormenudropdownview.cpp.

{
    MWidgetView::applyStyle();

    if (pannableViewport == NULL) {
        QGraphicsAnchorLayout *backgroundLayout = new QGraphicsAnchorLayout;
        backgroundLayout->setContentsMargins(0, 0, 0, 0);
        backgroundLayout->setSpacing(0);
        backgroundLayout->addCornerAnchors(backgroundWidget, Qt::TopLeftCorner, backgroundLayout, Qt::TopLeftCorner);
        backgroundLayout->setMaximumHeight(0);

        // Put all the stuff into the scene window layout
        pannableViewport = createPannableArea();
        topRowWidget = createTopRow();
        QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
        layout->setContentsMargins(0, 0, 0, 0);
        layout->setSpacing(0);
        layout->addItem(topRowWidget);
        layout->addItem(backgroundLayout);
        layout->addItem(pannableViewport);
        controller->setLayout(layout);
    }
}


Member Data Documentation

Delay for the initialization of the view (in milliseconds).

Definition at line 126 of file statusindicatormenudropdownview.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