inc/mpcollectiontbonelistdatamodel.h
author hgs
Fri, 14 May 2010 18:54:37 -0500
changeset 35 fdb31ab341af
child 32 c163ef0b758d
permissions -rw-r--r--
201019

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: Music Player collection abstract data model. This is
*              primarily used to support TBone Mediawall in Collection View.
*              This model represents the list containing album songs.
*
*/

#ifndef MPCOLLECTIONTBONELISTDATAMODEL_H
#define MPCOLLECTIONTBONELISTDATAMODEL_H

#include <QAbstractListModel>

class MpMpxCollectionData;

#if defined(BUILD_MPDATA_LIB)
#define MPDATA_EXPORT Q_DECL_EXPORT
#else
#define MPDATA_EXPORT Q_DECL_IMPORT
#endif

class MPDATA_EXPORT MpCollectionTBoneListDataModel : public QAbstractListModel
{
    Q_OBJECT

public:

    explicit MpCollectionTBoneListDataModel( MpMpxCollectionData *data, QObject *parent=0 );
    virtual ~MpCollectionTBoneListDataModel();

    int rowCount(const QModelIndex &parent=QModelIndex()) const;
    QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const;

signals:

    void albumDataChanged();

public slots:

    void refreshModel();

private:

    MpMpxCollectionData             *mCollectionData;   // Not own
    int                             mRowCount;

};

#endif // MPCOLLECTIONTBONELISTDATAMODEL_H