inc/mpcollectiontbonelistdatamodel.h
changeset 35 fdb31ab341af
child 32 c163ef0b758d
equal deleted inserted replaced
34:2c5162224003 35:fdb31ab341af
       
     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: Music Player collection abstract data model. This is
       
    15 *              primarily used to support TBone Mediawall in Collection View.
       
    16 *              This model represents the list containing album songs.
       
    17 *
       
    18 */
       
    19 
       
    20 #ifndef MPCOLLECTIONTBONELISTDATAMODEL_H
       
    21 #define MPCOLLECTIONTBONELISTDATAMODEL_H
       
    22 
       
    23 #include <QAbstractListModel>
       
    24 
       
    25 class MpMpxCollectionData;
       
    26 
       
    27 #if defined(BUILD_MPDATA_LIB)
       
    28 #define MPDATA_EXPORT Q_DECL_EXPORT
       
    29 #else
       
    30 #define MPDATA_EXPORT Q_DECL_IMPORT
       
    31 #endif
       
    32 
       
    33 class MPDATA_EXPORT MpCollectionTBoneListDataModel : public QAbstractListModel
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37 public:
       
    38 
       
    39     explicit MpCollectionTBoneListDataModel( MpMpxCollectionData *data, QObject *parent=0 );
       
    40     virtual ~MpCollectionTBoneListDataModel();
       
    41 
       
    42     int rowCount(const QModelIndex &parent=QModelIndex()) const;
       
    43     QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const;
       
    44 
       
    45 signals:
       
    46 
       
    47     void albumDataChanged();
       
    48 
       
    49 public slots:
       
    50 
       
    51     void refreshModel();
       
    52 
       
    53 private:
       
    54 
       
    55     MpMpxCollectionData             *mCollectionData;   // Not own
       
    56     int                             mRowCount;
       
    57 
       
    58 };
       
    59 
       
    60 #endif // MPCOLLECTIONTBONELISTDATAMODEL_H
       
    61