contentstorage/caclient/stub/src/caobjectadapter.cpp
author hgs
Fri, 30 Apr 2010 15:22:08 +0300
changeset 93 82b66994846c
parent 92 782e3408c2ab
child 96 5d243a69bdda
permissions -rw-r--r--
201017

/*
 * Copyright (c)2008 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
 * Description:  ?Description
 *
 */

#include <QDir>
#include <HbIcon>


#include "caobjectadapter.h"
#include "caentry.h"
#include "caicondescription.h"
#include <cadefs.h>

//----------------------------------------------------------------------------
//
//----------------------------------------------------------------------------
HbIcon CaObjectAdapter::makeIcon(const CaEntry &entry, const QSize &size)
{
    HbIcon icon;
    QString filename(entry.iconDescription().filename());
    if (!filename.isEmpty()) {
        icon = HbIcon(filename);
        //icon.addBadge( Qt::AlignTop | Qt::AlignRight,  HbIcon("qtg_small_hs_widget"));
    }
    if (icon.isNull() || !(icon.size().isValid())) {
        icon = HbIcon("qtg_large_application");
    }
    return icon;
}


//----------------------------------------------------------------------------
//
//----------------------------------------------------------------------------
void CaObjectAdapter::setId(CaEntry &entry,
                            int id)
{
    entry.setId(id);
}

//----------------------------------------------------------------------------
//
//----------------------------------------------------------------------------
void CaObjectAdapter::setId(CaIconDescription &iconDescription,
                            int id)
{
    iconDescription.setId(id);
}