MApplicationExtensionArea* StatusIndicatorMenuDropDownView::createVerticalExtensionArea()
{
    // Create an extension area for the call ui and transfer ui plugins
    MApplicationExtensionArea *extensionArea = new MApplicationExtensionArea("com.meego.core.MStatusIndicatorMenuExtensionInterface/1.0");
    extensionArea->setObjectName("StatusIndicatorMenuVerticalExtensionArea");
    extensionArea->setInProcessFilter(QRegExp("/statusindicatormenu-(call|transfer).desktop$"));
    extensionArea->setOutOfProcessFilter(QRegExp("$^"));
    extensionArea->setOrder((QStringList() << "statusindicatormenu-call.desktop" << "statusindicatormenu-transfer.desktop"));
    connect(extensionArea, SIGNAL(extensionInstantiated(MApplicationExtensionInterface*)), controller, SLOT(setStatusIndicatorMenuInterface(MApplicationExtensionInterface*)));
    return extensionArea;
}
StatusIndicatorMenuVerticalView::StatusIndicatorMenuVerticalView(StatusIndicatorMenu *controller) :
    MSceneWindowView(controller),
    controller(controller)
{
    // Create an extension area for the top row plugins
    MApplicationExtensionArea *extensionArea = new MApplicationExtensionArea("com.meego.core.MStatusIndicatorMenuExtensionInterface/1.0");
    connect(extensionArea, SIGNAL(extensionInstantiated(MApplicationExtensionInterface*)), controller, SLOT(setStatusIndicatorMenuInterface(MApplicationExtensionInterface*)));
    connect(extensionArea, SIGNAL(extensionInstantiated(MApplicationExtensionInterface*)), this, SLOT(setExtensionLayoutPosition(MApplicationExtensionInterface*)));
    extensionArea->setObjectName("StatusIndicatorMenuExtensionArea");
    setSafeMode(extensionArea, QFile(CRASH_FILE).exists());
    extensionArea->init();

    // Add panning to the expension area
    MPannableViewport* viewport = new MPannableViewport();
    viewport->setWidget(extensionArea);
    viewport->setVerticalPanningPolicy(MPannableWidget::PanningAsNeeded);
    viewport->setStyleName("StatusIndicatorMenuViewport");
    viewport->positionIndicator()->setStyleName("CommonPositionIndicatorInverted");

    // Put the extension area to a horizontal layout
    QGraphicsLinearLayout *vlayout = new QGraphicsLinearLayout(Qt::Vertical);
    vlayout->setContentsMargins(0, 0, 0, 0);
    vlayout->setSpacing(0);
    vlayout->addItem(viewport);

    // Add a separator line on the bottom of the menu
    MStylableWidget *bottomSeparator = new MStylableWidget;
    bottomSeparator->setStyleName("StatusIndicatorMenuBottomSeparator");
    bottomSeparator->setLayoutPosition(M::VerticalTopPosition);
    vlayout->addItem(bottomSeparator);

    // Create a container widget for extension area and settings button layout
    containerWidget = new MStylableWidget;
    containerWidget->setStyleName("StatusIndicatorMenuExtensionAreaWidget");
    containerWidget->setLayout(vlayout);

    QGraphicsLinearLayout *hlayout = new QGraphicsLinearLayout(Qt::Horizontal);
    hlayout->setContentsMargins(0, 0, 0, 0);
    hlayout->setSpacing(0);
    hlayout->addStretch();
    hlayout->addItem(containerWidget);
    hlayout->addStretch();

    // Add a separator line on the right of the menu
    MStylableWidget *rightSeparator = new MStylableWidget;
    rightSeparator->setStyleName("StatusIndicatorMenuRightSeparator");
    rightSeparator->setLayoutPosition(M::HorizontalLeftPosition);
    hlayout->addItem(rightSeparator);

    controller->setLayout(hlayout);
    containerWidget->installEventFilter(this);
}