void HbXmlLoaderBaseActions::addToObjectMap( QList<QGraphicsItem *> objects )
{
    for ( int i = 0; i < objects.size(); i++ ) {
        if ( objects.at(i)->isWidget() ) {
            QGraphicsWidget *widget = static_cast<QGraphicsWidget *>( objects.at(i) );
            ObjectMapItem item;
            item.mObject = widget;
            item.mType = HbXml::WIDGET;
            item.mOwned = false;
            mObjectMap.insert( widget->objectName(), item );
            addToObjectMap( widget->childItems() );
        }
    }    
}
void HbXmlLoaderBaseActions::addToObjectMap( QList<QObject *> objects )
{
    for ( int i = 0; i < objects.size(); i++ ) {
        QObject *obj = objects.at(i);
        QGraphicsWidget *widget = qobject_cast<QGraphicsWidget*>(obj);

        ObjectMapItem item;
        item.mObject = obj;
        item.mType = widget ? HbXml::WIDGET : HbXml::OBJECT;
        item.mOwned = false;
        mObjectMap.insert( obj->objectName(), item );

        if ( widget ) {
            addToObjectMap( widget->childItems() );
        } else {
            addToObjectMap( obj->children() );
        }
    }
}