qtinternetradio/ui/inc/irchannelmodel.h
changeset 0 09774dfdd46b
child 8 3b03c28289e6
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     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 IRCHANNELMODEL_H
       
    19 #define IRCHANNELMODEL_H
       
    20 
       
    21 #include <QAbstractItemModel>
       
    22 
       
    23 class HbIcon;
       
    24 class IRQChannelItem;
       
    25 
       
    26 class IrChannelModel : public QAbstractListModel
       
    27 {
       
    28     Q_OBJECT
       
    29 
       
    30 public:
       
    31     explicit IrChannelModel(QObject *aParent = NULL);
       
    32     ~IrChannelModel();
       
    33 
       
    34     int rowCount(const QModelIndex &aParent = QModelIndex()) const;
       
    35     QVariant data(const QModelIndex &aIndex, int aRole = Qt::DisplayRole) const;
       
    36     QString imageUrl(int aRow);
       
    37     void setLogo(HbIcon *aIcon, int aIndex);
       
    38 
       
    39     void clearAndDestroyLogos();
       
    40     
       
    41 public slots:
       
    42     void updateData(QList<IRQChannelItem*> *aPushItemsList);
       
    43 
       
    44 signals:
       
    45     void dataAvailable();
       
    46 
       
    47 private:
       
    48     void clearAndDestroyItems();
       
    49     
       
    50 private:
       
    51     QList<IRQChannelItem*> *iChannelList;
       
    52     QMap<int, HbIcon*>     iLogos;
       
    53     HbIcon *iStationLogo;
       
    54 };
       
    55 
       
    56 #endif