tsdevicedialog/tsdevicedialogplugin/src/tsentrymodelitem.cpp
changeset 107 b34d53f6acdf
parent 102 8b8b34fa9751
child 112 dbfb5e38438b
equal deleted inserted replaced
106:e78d6e055a5b 107:b34d53f6acdf
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description: tsentrymodelitem.cpp
    14 * Description: tsentrymodelitem.cpp
    15 *
    15 *
    16 */
    16 */
    17 #include "tsentrymodelitem.h"
       
    18 #include "tsdataroles.h"
       
    19 
    17 
    20 #include <tstask.h>
    18 #include <tstask.h>
    21 #include <HbIcon>
    19 #include <HbIcon>
       
    20 
       
    21 #include "tsentrymodelitem.h"
       
    22 #include "tsdataroles.h"
    22 
    23 
    23 /*!
    24 /*!
    24     \class TsEntryModelItem
    25     \class TsEntryModelItem
    25     \ingroup group_tsdevicedialogplugin
    26     \ingroup group_tsdevicedialogplugin
    26     \brief Item presenting running apps in the grid.
    27     \brief Item presenting running apps in the grid.
    53 {
    54 {
    54     switch (role) {
    55     switch (role) {
    55         case Qt::DisplayRole:
    56         case Qt::DisplayRole:
    56             return QVariant(mEntry->name());
    57             return QVariant(mEntry->name());
    57         case Qt::DecorationRole:
    58         case Qt::DecorationRole:
    58             {
    59             return QVariant::fromValue<HbIcon>(HbIcon(mEntry->screenshot()));
    59             QPixmap icon = mEntry->screenshot();
       
    60             return QVariant::fromValue<HbIcon>(HbIcon(icon));
       
    61             }
       
    62         case TsDataRoles::Closable:
    60         case TsDataRoles::Closable:
    63             return QVariant(mEntry->isClosable());
    61             return QVariant(mEntry->isClosable());
    64         case TsDataRoles::Active:
    62         case TsDataRoles::Active:
    65             return QVariant(mEntry->isActive());
    63             return QVariant(mEntry->isActive());
    66         default:
    64         default: