void MToolBarLayoutPolicy::setLayoutPosition(int widgetIndex, M::Position position)
{
    MWidgetController* widget = dynamic_cast<MWidgetController*>(widgetAt(widgetIndex));
    if (widget) {
        widget->setLayoutPosition(position);
    }
}
void StatusIndicatorMenuVerticalView::setExtensionLayoutPosition(MApplicationExtensionInterface *extension)
{
    MWidgetController *widget = dynamic_cast<MWidgetController*>(extension->widget());

    if (widget) {
        widget->setLayoutPosition(M::VerticalCenterPosition);
    }
}
void MLinearLayoutPolicyPrivate::notifyWidgetOfLayoutPosition(int index, M::Position position)
{
    MWidgetController* widget = dynamic_cast<MWidgetController*>(static_cast<ProxyItem *>(engine->itemAt(index))->proxiedItem());
    if (widget)
        widget->setLayoutPosition(position);
}