phoneuis/bubblemanager2/bubblecore/src/bubbleparticipantlistmodel.h
changeset 21 92ab7f8d0eab
child 22 6bb1b21d2484
equal deleted inserted replaced
4:c84cf270c54f 21:92ab7f8d0eab
       
     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: Model for conference participant list.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BUBBLEPARTICIPANTLISTMODEL_H
       
    19 #define BUBBLEPARTICIPANTLISTMODEL_H
       
    20 
       
    21 #include <QAbstractListModel>
       
    22 #include <QObject>
       
    23 
       
    24 class Participant; // helper class
       
    25 
       
    26 class BubbleParticipantListModel : public QAbstractListModel
       
    27 {
       
    28     Q_OBJECT
       
    29 
       
    30 public:
       
    31     BubbleParticipantListModel();
       
    32     ~BubbleParticipantListModel();
       
    33 
       
    34     void addParticipant(
       
    35         int bubbleId,
       
    36         const QString &name,
       
    37         int state );
       
    38 
       
    39     int bubbleId(int row);
       
    40 
       
    41     void reset();
       
    42 
       
    43     int rowCount(const QModelIndex &parent=QModelIndex()) const;
       
    44 
       
    45     QVariant data( const QModelIndex &index,
       
    46                    int role = Qt::DisplayRole ) const;
       
    47 
       
    48 private:
       
    49     QList<Participant*> mParticipants;
       
    50 };
       
    51 
       
    52 
       
    53 #endif // BUBBLEPARTICIPANTLISTMODEL_H