diff -r 5723da102db1 -r 38bbf2dcd608 qtinternetradio/ui/inc/irhistorymodel.h --- a/qtinternetradio/ui/inc/irhistorymodel.h Fri Sep 17 08:27:59 2010 +0300 +++ b/qtinternetradio/ui/inc/irhistorymodel.h Mon Oct 04 00:07:46 2010 +0300 @@ -19,9 +19,13 @@ #include -class IRQSongHistoryEngine; -class IRQSongHistoryInfo; class HbIcon; +class IRQPreset; +class channelHistoryWrapper; +class urlInfoWrapper; +class IRLogoProvider; +class IRQIsdsClient; +class QTimer; class IRHistoryModel : public QAbstractListModel { @@ -33,25 +37,43 @@ int rowCount(const QModelIndex &aParent = QModelIndex()) const; QVariant data(const QModelIndex &aIndex, int aRole = Qt::DisplayRole) const; - IRQSongHistoryInfo* getHistoryInfo(int aIndex); - void clearAllList(); + IRQPreset* getHistoryInfo(int aIndex); + void clearAllHistory(); bool checkHistoryUpdate(); - void clearAndDestroyLogos(); - QString getImageUrl(int aRow) const; - void setLogo(HbIcon *aIcon, int aIndex); - bool deleteOneItem(int aIndex); + bool deleteHistory(int aIndex); + + void startDownloadingLogo(); + void stopDownloadingLogo(); signals: void modelChanged(); -private: - void getAllList(); - +private slots: + void downloadNextLogo(); + void logoData(const QByteArray &aLogoData); + private: - QList iHistoryList; - IRQSongHistoryEngine *iHistoryEngine; - QMap iLogos; - HbIcon *iStationLogo; + void refreshModel(); + void clearModel(); + + void clearAndDestroyLogos(); + QString getImageUrl(int aRow) const; + void setLogo(HbIcon *aIcon, int aIndex); + + bool isLogoReady(int aIndex) const; + void updateIconIndexArray(); + +private: + QList iHistoryList; + channelHistoryWrapper *iHistoryEngine; + urlInfoWrapper *iUrlInfoWrapper; + QList iLogos; + HbIcon *iStationLogo; + + QList iIconIndexArray; + IRQIsdsClient *iIsdsClient; + IRLogoProvider *iLogoProvider; + QTimer *iTimer; }; #endif /* IRHISTORYMODEL_H_ */