emailuis/nmailuiengine/inc/nmfolderlistmodel.h
changeset 18 578830873419
equal deleted inserted replaced
4:e7aa27f58ae1 18:578830873419
       
     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 NMFOLDERLISTMODEL_H_
       
    19 #define NMFOLDERLISTMODEL_H_
       
    20 
       
    21 #include <QAbstractListModel>
       
    22 
       
    23 class NmFolder;
       
    24 class NmFolderListModelPrivate;
       
    25 class NmDataManager;
       
    26 
       
    27 class NMUIENGINE_EXPORT NmFolderListModel : public QAbstractListModel
       
    28 {
       
    29 public:
       
    30 
       
    31 	NmFolderListModel(NmDataManager &dataManager, QObject *parent = 0);
       
    32 	virtual ~NmFolderListModel();
       
    33     QModelIndex parent(const QModelIndex &child) const;
       
    34     int rowCount(const QModelIndex &parent = QModelIndex()) const;
       
    35     int columnCount(const QModelIndex &parent = QModelIndex()) const;
       
    36     QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
       
    37     void refresh(QList<NmFolder*> &folderList);
       
    38 
       
    39 private:
       
    40     NmDataManager &mDataManager;    // not owned
       
    41     NmFolderListModelPrivate *d;    // owned
       
    42 };
       
    43 
       
    44 #endif /* NMFOLDERLISTMODEL_H_ */