messagingapp/msgui/unifiedviewer/inc/univieweraddresswidget.h
changeset 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
equal deleted inserted replaced
5:4697dfb2d7ad 23:238255e8b033
       
     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 UNI_VIEWER_ADDRESS_WIDGET_H
       
    19 #define UNI_VIEWER_ADDRESS_WIDGET_H
       
    20 
       
    21 // SYSTEM INCLUDES
       
    22 #include <HbWidget>
       
    23 
       
    24 // USER INCLUDES
       
    25 #include "convergedmessageaddress.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class QPointF;
       
    29 class HbMenu;
       
    30 class UniTextEditor;
       
    31 
       
    32 class UniViewerAddressWidget : public HbWidget
       
    33 {
       
    34 Q_OBJECT
       
    35 
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Constructor
       
    40      */
       
    41     explicit UniViewerAddressWidget(QGraphicsItem *parent = 0);
       
    42 
       
    43     /**
       
    44      * Destructor
       
    45      */
       
    46     virtual ~UniViewerAddressWidget();
       
    47 
       
    48     /**
       
    49      * Populates the addresses and creates the anchors on them.
       
    50      * @param label Label of the address like - "From"
       
    51      * @param address Address string to be populated.
       
    52      */
       
    53     void populate(const QString &label, const QString &address, const QString &alias);
       
    54 
       
    55     /**
       
    56      * Populates the addresses and creates the anchors on them.
       
    57      * @param label Label of the address like - "To", "Cc"
       
    58      * @param addressList List of addresses to be populated.
       
    59      */
       
    60     void populate(const QString &label,
       
    61                 ConvergedMessageAddressList addressList);
       
    62 
       
    63     /**
       
    64      * Clears the contents of the widget.
       
    65      */
       
    66     void clearContent();
       
    67 
       
    68 private slots:
       
    69 
       
    70     /**
       
    71      * Handles the aboutToShowContextMenu() signal generated by HbAbstractEdit.
       
    72      * @see HbAbstractEdit
       
    73      * @param contextMenu Reference of the context menu.
       
    74      * @param pos Position at which the context menu will be displayed.
       
    75      */
       
    76     void handleAboutToShowContextMenu(HbMenu *contextMenu, const QPointF &pos);
       
    77 
       
    78 private:
       
    79 
       
    80     /**
       
    81      * Reference of the editor.
       
    82      * Own
       
    83      */
       
    84     UniTextEditor *mAddress;
       
    85 };
       
    86 
       
    87 #endif // UNI_VIEWER_ADDRESS_WIDGET_H
       
    88 // EOF