qtinternetradio/ui/inc/irsonghistorymodel.h
changeset 0 09774dfdd46b
child 3 ee64f059b8e1
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 IRSONGHISTORYMODEL_H_
       
    19 #define IRSONGHISTORYMODEL_H_
       
    20 
       
    21 #include <QAbstractItemModel>
       
    22 
       
    23 class IRQSongHistoryEngine;
       
    24 class IRQSongInfo;
       
    25 class IRQMetaData;
       
    26 
       
    27 class IRSongHistoryModel : public QAbstractListModel
       
    28 {
       
    29 Q_OBJECT
       
    30 public:
       
    31     explicit IRSongHistoryModel(QObject *aParent = NULL);
       
    32     ~IRSongHistoryModel();
       
    33     
       
    34     int rowCount(const QModelIndex &aParent = QModelIndex()) const;
       
    35     QVariant data(const QModelIndex &aIndex, int aRole = Qt::DisplayRole) const;
       
    36     
       
    37     IRQSongInfo* getSongHistoryInfo(int aIndex);
       
    38     void clearAllList();
       
    39     bool checkSongHistoryUpdate();   
       
    40     void clearHisotrySongDB();  
       
    41     
       
    42 signals:
       
    43     void modelChanged();   
       
    44 
       
    45 private:
       
    46     void getAllList();
       
    47 
       
    48 private:
       
    49     QList<IRQSongInfo *> iSongHistoryList;
       
    50     IRQSongHistoryEngine *iHistoryEngine;  
       
    51 };
       
    52 
       
    53 #endif