phoneuis/bubblemanager2/bubblecore/src/bubbleconferenceheader.cpp
changeset 37 ba76fc04e6c2
parent 21 92ab7f8d0eab
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     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: Conference call header
       
    15 *
       
    16 */
       
    17 
       
    18 #include "bubbleconferenceheader.h"
       
    19 
       
    20 BubbleConferenceHeader::BubbleConferenceHeader()
       
    21 {
       
    22     reset();
       
    23 }
       
    24 
       
    25 void BubbleConferenceHeader::reset()
       
    26 {
       
    27     BubbleHeader::reset();
       
    28 
       
    29     mExpanded = false;
       
    30     mSelection = -1;
       
    31 
       
    32     foreach(BubbleHeader* header,mHeaders) {
       
    33         header->setInConference(false);
       
    34     }
       
    35     mHeaders.clear();
       
    36 
       
    37     mParticipantListActions.clear();
       
    38 }
       
    39 
       
    40 void BubbleConferenceHeader::addHeader(BubbleHeader* header)
       
    41 {
       
    42     header->setInConference(true);
       
    43     mHeaders.append(header);
       
    44 }
       
    45 
       
    46 void BubbleConferenceHeader::removeHeader(int bubbleId)
       
    47 {
       
    48     for(int i=0; i<mHeaders.count(); i++) {
       
    49         if (mHeaders.at(i)->bubbleId()==bubbleId) {
       
    50             mHeaders.at(i)->setInConference(false);
       
    51             mHeaders.removeAt(i);            
       
    52             break;
       
    53         }
       
    54     }
       
    55 }
       
    56 
       
    57 bool BubbleConferenceHeader::isConference() const
       
    58 {
       
    59     return true;
       
    60 }
       
    61 
       
    62 QList<BubbleHeader*> BubbleConferenceHeader::headers() const
       
    63 {
       
    64     return mHeaders;
       
    65 }
       
    66 
       
    67 void BubbleConferenceHeader::addParticipantListAction( HbAction* action )
       
    68 {
       
    69     mParticipantListActions.append( action );
       
    70 }
       
    71 
       
    72 const QList<HbAction*>& BubbleConferenceHeader::participantListActions() const
       
    73 {
       
    74     return mParticipantListActions;
       
    75 }
       
    76 
       
    77 void BubbleConferenceHeader::clearParticipantListActions()
       
    78 {
       
    79     mParticipantListActions.clear();
       
    80 }
       
    81 
       
    82 void BubbleConferenceHeader::setExpanded(bool expanded)
       
    83 {
       
    84     mExpanded = expanded;
       
    85 }
       
    86 
       
    87 bool BubbleConferenceHeader::isExpanded() const
       
    88 {
       
    89     return mExpanded;
       
    90 }
       
    91 
       
    92 void BubbleConferenceHeader::setSelectedHeader(int bubbleId)
       
    93 {
       
    94     mSelection = bubbleId;
       
    95 }
       
    96 
       
    97 int BubbleConferenceHeader::selectedHeader() const
       
    98 {
       
    99     return mSelection;
       
   100 }
       
   101