/*
* 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);
}