contentstorage/caclient/stub/inc/caobjectadapter.h
changeset 85 7feec50967db
child 86 e492551a0d54
equal deleted inserted replaced
4:1a2a00e78665 85:7feec50967db
       
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef OBJECTADAPTER_H
       
    19 #define OBJECTADAPTER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <QPixmap>
       
    23 
       
    24 class QSize;
       
    25 class CaEntry;
       
    26 class CaIconDescription;
       
    27 
       
    28 /**
       
    29  *  CaObjectAdapter
       
    30  *
       
    31  */
       
    32 class CaObjectAdapter
       
    33 {
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Create an icon.
       
    38      * @param entry entry.
       
    39      * @param size size of the icon
       
    40      * @return QPixmap.
       
    41      */
       
    42     static QPixmap makeIcon(
       
    43         const CaEntry& entry,
       
    44         const QSize &size);
       
    45 
       
    46     /**
       
    47      * Set entry id.
       
    48      * @param entry entry.
       
    49      * @param id entry id.
       
    50      */
       
    51     static void setId(CaEntry &entry,
       
    52         int id);
       
    53 
       
    54     /**
       
    55      * Set icon description id.
       
    56      * @param iconDescription icon description.
       
    57      * @param id icon description id.
       
    58      */
       
    59     static void setId(CaIconDescription &iconDescription,
       
    60         int id);
       
    61 
       
    62 };
       
    63 
       
    64 #endif // OBJECTADAPTER_H