emailuis/nmailui/inc/nmrecipientfield.h
branchRCL_3
changeset 63 d189ee25cf9d
equal deleted inserted replaced
61:dcf0eedfc1a3 63:d189ee25cf9d
       
     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: Email Address Field Widget
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NMRECIPIENTFIELD_H_
       
    19 #define NMRECIPIENTFIELD_H_
       
    20 
       
    21 #include <hbwidget.h>
       
    22 
       
    23 class QGraphicsLinearLayout;
       
    24 class HbLabel;
       
    25 class NmRecipientLineEdit;
       
    26 class HbPushButton;
       
    27 class HbIconItem;
       
    28 class HbDocumentLoader;
       
    29 
       
    30 class NmRecipientField : public QObject
       
    31 {
       
    32     Q_OBJECT
       
    33 public:
       
    34     NmRecipientField(QObject *parent, HbDocumentLoader &docLoader, const QString &objPrefix);
       
    35     virtual ~NmRecipientField();
       
    36     qreal height();
       
    37     void createConnections();
       
    38 
       
    39 signals:
       
    40     void textChanged(const QString &text);
       
    41     void cursorPositionChanged(int oldPos, int newPos);
       
    42     void editingFinished();
       
    43     void selectionChanged();
       
    44     void launchContactsPickerButtonClicked();
       
    45 
       
    46 public:
       
    47     NmRecipientLineEdit *editor() const;
       
    48     const QString text() const;
       
    49 
       
    50 public slots:
       
    51     void setText(const QString &text);
       
    52     void launchContactsPicker();
       
    53 
       
    54 private:
       
    55     HbDocumentLoader &mDocumentLoader;
       
    56     const QString mObjectPrefix;
       
    57     HbWidget *mWidget; // Not owned
       
    58     HbLabel *mLabel; // Not owned
       
    59     NmRecipientLineEdit *mRecipientsEditor; // Not owned
       
    60     HbPushButton *mLaunchContactsPickerButton; // Not owned
       
    61 };
       
    62 
       
    63 #endif   // NMRECIPIENTFIELD_H_