phonebookui/pbkcommonui/inc/cntdetaileditor.h
changeset 25 76a2435edfd4
child 27 de1630741fbe
equal deleted inserted replaced
24:0ba2181d7c28 25:76a2435edfd4
       
     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 CNTDETAILEDITOR_H_
       
    19 #define CNTDETAILEDITOR_H_
       
    20 
       
    21 #include "cntbaseview.h"
       
    22 
       
    23 #include <hbdataform.h>
       
    24 #include <hbabstractviewitem.h>
       
    25 #include "cntdetaileditormodel.h"
       
    26 
       
    27 #include <qtcontacts.h>
       
    28 #include <hbgroupbox.h>
       
    29 
       
    30 class CntDetailEditor : public CntBaseView
       
    31     {
       
    32     Q_OBJECT
       
    33     
       
    34 public:
       
    35     CntDetailEditor(CntViewManager *viewManager, QGraphicsItem *parent = 0);
       
    36     ~CntDetailEditor();
       
    37     
       
    38 private slots:
       
    39     void aboutToCloseView();
       
    40     void discardChanges();
       
    41     void insertField();
       
    42     
       
    43 public:
       
    44     void setViewId( CntViewParameters::ViewId aId );
       
    45     void setHeader( QString aHeader );
       
    46     void setDetails( CntDetailEditorModel* aModel, HbAbstractViewItem* aPrototype );
       
    47     void setInsertAction( const QString aInsert );
       
    48     
       
    49 public: // from CntBaseView
       
    50     void activateView( const CntViewParameters &viewParameters );
       
    51     CntViewParameters::ViewId viewId() const;
       
    52     
       
    53 private:
       
    54     QPointer<HbDataForm> mDataForm;
       
    55     QPointer<CntDetailEditorModel> mDataFormModel;
       
    56     QPointer<HbAbstractViewItem> mPrototype;
       
    57     QPointer<HbGroupBox> mHeader;
       
    58     CntViewParameters::ViewId iId;
       
    59     };
       
    60 #endif /* CNTDETAILEDITOR_H_ */