phoneuis/bubblemanager2/bubblecore/src/bubbleutils.h
changeset 37 ba76fc04e6c2
child 46 bc5a64e5bc3c
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:  Utility methods.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BUBBLEUTILS_H_
       
    19 #define BUBBLEUTILS_H_
       
    20 
       
    21 #include <QString>
       
    22 
       
    23 class BubbleHeader;
       
    24 class BubbleCallIndicator;
       
    25 class HbIconItem;
       
    26 class BubbleButton;
       
    27 class HbAction;
       
    28 class HbTextItem;
       
    29 
       
    30 class BubbleUtils
       
    31     {
       
    32 public:
       
    33     static void setCallHeaderTexts3Lines(
       
    34         const BubbleHeader& header,
       
    35         HbTextItem& textLine1,
       
    36         HbTextItem& textLine2,
       
    37         HbTextItem& textLine3,
       
    38         int& cliLineNumber,
       
    39         int& timerLineNumber);
       
    40 
       
    41     static void setCallHeaderTexts2Lines(
       
    42         const BubbleHeader& header,
       
    43         HbTextItem& textLine1,
       
    44         HbTextItem& textLine2,
       
    45         int& cliLineNumber,
       
    46         int& timerLineNumber);
       
    47 
       
    48     static bool compareHeaders(
       
    49         const BubbleHeader* header1,
       
    50         const BubbleHeader* header2);
       
    51 
       
    52     static void setButtonStyleForAction(
       
    53         BubbleButton& button,
       
    54         const HbAction& action);
       
    55 
       
    56     static void setCallStatusIcon(
       
    57         int callState,
       
    58         int callFlags,
       
    59         HbIconItem& icon);
       
    60 
       
    61     static void setNumberTypeIcon(
       
    62         int callState,
       
    63         int callFlags,
       
    64         HbIconItem& icon);
       
    65 
       
    66     static void setCipheringIcon(
       
    67         int callState,
       
    68         int callFlags,
       
    69         HbIconItem& icon);
       
    70 
       
    71 private:
       
    72     static void setText(
       
    73         HbTextItem& item,
       
    74         const QString& text,
       
    75         Qt::TextElideMode clip);
       
    76 
       
    77     };
       
    78 
       
    79 #endif /* BUBBLEUTILS_H_ */