equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <hbicon.h> |
18 #include <hbicon.h> |
19 #include <QBrush> |
|
20 |
19 |
21 #include "irchannelmodel.h" |
20 #include "irchannelmodel.h" |
22 #include "irqisdsdatastructure.h" |
21 #include "irqisdsdatastructure.h" |
23 #include "iruidefines.h" |
|
24 |
22 |
25 IrChannelModel::IrChannelModel(QObject *aParent): QAbstractListModel(aParent) |
23 IrChannelModel::IrChannelModel(QObject *aParent): QAbstractListModel(aParent) |
26 , iChannelList(NULL) |
24 , iChannelList(NULL) |
27 { |
25 { |
28 QIcon icon(":/stationlist/icon_stationdefault.png"); |
26 iStationLogo = new HbIcon("qtg_large_internet_radio"); |
29 iStationLogo = new HbIcon(icon); |
|
30 } |
27 } |
31 |
28 |
32 IrChannelModel::~IrChannelModel() |
29 IrChannelModel::~IrChannelModel() |
33 { |
30 { |
34 clearAndDestroyItems(); |
31 clearAndDestroyItems(); |
107 list.append(*iStationLogo); |
104 list.append(*iStationLogo); |
108 } |
105 } |
109 |
106 |
110 return list; |
107 return list; |
111 } |
108 } |
112 else if (aRole == Qt::BackgroundRole) |
|
113 { |
|
114 if (aIndex.row() % 2 == 0) |
|
115 { |
|
116 return QBrush(KListEvenRowColor); |
|
117 } |
|
118 else |
|
119 { |
|
120 return QBrush(KListOddRowColor); |
|
121 } |
|
122 } |
|
123 else |
109 else |
124 { |
110 { |
125 return QVariant(); |
111 return QVariant(); |
126 } |
112 } |
127 } |
113 } |