phoneuis/bubblemanager2/bubblecore/src/bubbleheader.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
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:  Container for call data.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BUBBLEHEADER_H_
       
    19 #define BUBBLEHEADER_H_
       
    20 
       
    21 #include "bubblemanager2.h"
       
    22 
       
    23 class HbAction;
       
    24 
       
    25 class BubbleHeader
       
    26     {
       
    27 public:
       
    28     BubbleHeader();
       
    29     virtual ~BubbleHeader();
       
    30     
       
    31 public:
       
    32     /**
       
    33     * To put everything in initial state.
       
    34     */
       
    35     virtual void reset();
       
    36     
       
    37     // used
       
    38     void setIsUsed( bool used );
       
    39     bool isUsed() const;
       
    40     
       
    41     // bubble id
       
    42     void setBubbleId( int bubbleId );
       
    43     int bubbleId() const;
       
    44 
       
    45     // call state
       
    46     void setCallState( BubbleManager::PhoneCallState state );
       
    47     BubbleManager::PhoneCallState callState() const;
       
    48     
       
    49     // call flags
       
    50     void setCallFlags( int flags ); 
       
    51     void setCallFlag( BubbleManager::PhoneCallFlags flag );
       
    52     void removeCallFlag( BubbleManager::PhoneCallFlags flag );
       
    53     int callFlags() const;
       
    54     
       
    55     // number type
       
    56     void setNumberType( BubbleManager::PhoneNumberType numberType );
       
    57     BubbleManager::PhoneNumberType numberType() const;
       
    58     
       
    59     // text "calling"
       
    60     void setText( 
       
    61         const QString& text,
       
    62         Qt::TextElideMode clip );
       
    63     const QString& text() const;
       
    64     Qt::TextElideMode textClipDirection() const;
       
    65 
       
    66     // call index or name
       
    67     void setCli( 
       
    68         const QString& cli, 
       
    69         Qt::TextElideMode clip );
       
    70     const QString& cli() const;
       
    71     Qt::TextElideMode cliClipDirection() const;
       
    72     
       
    73     // number
       
    74     void setSecondaryCli( 
       
    75         const QString& cli, 
       
    76         Qt::TextElideMode clip );
       
    77     const QString& secondaryCli() const;
       
    78     Qt::TextElideMode secondaryCliClipDirection() const;
       
    79     
       
    80     // timer or cost
       
    81     void setTimerCost( 
       
    82             const QString& timerCost );
       
    83     const QString& timerCost() const;
       
    84     
       
    85     // caller image
       
    86     void setCallImage( const QString& image );
       
    87     const QString& callImage() const;
       
    88 
       
    89     // default avatar
       
    90     void setShowDefaultAvatar(bool show);
       
    91     bool showDefaultAvatar() const;
       
    92     
       
    93     // actions
       
    94     void addAction( HbAction* action );
       
    95     const QList<HbAction*>& actions() const; 
       
    96     void clearActions();
       
    97     
       
    98     // header type
       
    99     virtual bool isConference() const;
       
   100 
       
   101     // conference participation
       
   102     void setInConference( bool inConference );
       
   103     bool isInConference() const;
       
   104 
       
   105     // expand action
       
   106     void setExpandAction( HbAction* action );
       
   107     HbAction* expandAction() const;
       
   108     
       
   109 private: //data
       
   110     
       
   111     bool mIsUsed;
       
   112     int mBubbleId;
       
   113     BubbleManager::PhoneCallState mCallState;
       
   114     BubbleManager::PhoneNumberType mNumberType;
       
   115     int mCallFlags; 
       
   116     QString mText;
       
   117     Qt::TextElideMode mTextClip;
       
   118     QString mCli;
       
   119     Qt::TextElideMode mCliClip;
       
   120     QString mSecondaryCli;
       
   121     Qt::TextElideMode mSecondaryCliClip;
       
   122     QString mTimerCost;
       
   123     QString mCallImage;
       
   124     QList<HbAction*> mActions;
       
   125     HbAction* mExpandAction;
       
   126     bool mIsInConference;
       
   127     bool mShowDefaultAvatar;
       
   128     };
       
   129 
       
   130 #endif /* BUBBLEHEADER_H_ */