phonebookui/pbkcommonui/inc/cntnamesview_p.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 CNTABSTRACTLISTVIEW_H_
       
    19 #define CNTABSTRACTLISTVIEW_H_
       
    20 
       
    21 #include "cntnamesview.h"
       
    22 #include "cntaction.h"
       
    23 #include "cntactionmenubuilder.h"
       
    24 
       
    25 #include <hbaction.h>
       
    26 #include <hbabstractviewitem.h>
       
    27 #include <QObject>
       
    28 
       
    29 #include <qcontact.h>
       
    30 #include <mobcntmodel.h>
       
    31 
       
    32 class HbView;
       
    33 class HbListView;
       
    34 class HbGroupBox;
       
    35 class HbTextItem;
       
    36 class HbDocumentLoader;
       
    37 class HbSearchPanel;
       
    38 class HbStaticVkbHost;
       
    39 class QGraphicsLinearLayout;
       
    40 
       
    41 class CntNamesViewPrivate : public QObject
       
    42     {
       
    43     Q_OBJECT
       
    44     Q_DECLARE_PUBLIC(CntNamesView);
       
    45     
       
    46 public:
       
    47     CntNamesViewPrivate();
       
    48     virtual ~CntNamesViewPrivate();
       
    49 
       
    50 public slots:
       
    51     void showBanner( const QString aText );
       
    52     void hideBanner();
       
    53     
       
    54     void showFinder();
       
    55     void hideFinder();
       
    56     void setFilter(const QString &filterString);
       
    57     
       
    58     void handleKeypadOpen();
       
    59     void handleKeypadClose();
       
    60     
       
    61     void createNewContact();
       
    62     void showPreviousView();
       
    63     void showCollectionView();
       
    64     void showContactView( QContact& aContact );
       
    65     void showContactView( const QModelIndex& );
       
    66     void showContactEditorView( QContact& aContact );
       
    67     void showContextMenu(HbAbstractViewItem* aItem, QPointF aPoint);
       
    68         
       
    69     void executeAction( QContact& aContact, QString aAction );
       
    70     void actionExecuted( CntAction* aAction );
       
    71     void deleteContact( QContact& aContact );        
       
    72     void importSim();
       
    73         
       
    74 public:
       
    75     bool isFinderVisible();
       
    76     void activate( CntAbstractViewManager* aMgr, const CntViewParameters& aArgs );
       
    77     void deactivate();
       
    78     void scrollTo(const QContact &aContact);
       
    79     
       
    80 public:
       
    81     CntNamesView* q_ptr;
       
    82     
       
    83 public: // lazy initializations
       
    84     HbListView* list();
       
    85     HbTextItem* emptyLabel();
       
    86     HbGroupBox* groupBox();
       
    87     HbSearchPanel* search();
       
    88     QGraphicsLinearLayout* layout();
       
    89     HbDocumentLoader* document();
       
    90 
       
    91 private:
       
    92     CntAbstractViewManager*     mViewManager;
       
    93     MobCntModel*                mListModel;
       
    94     HbView*                     mView;
       
    95     HbListView*                 mListView;
       
    96     HbTextItem*                 mEmptyList;
       
    97     HbGroupBox*                 mBanner;
       
    98     HbSearchPanel*              mSearchPanel;
       
    99     HbDocumentLoader*           mLoader;
       
   100     QGraphicsLinearLayout*      mLayout;
       
   101     HbStaticVkbHost*            mVirtualKeyboard;
       
   102     HbAction*                   mSoftkey; // own
       
   103     CntActionMenuBuilder*       mMenuBuilder; // own
       
   104     
       
   105     bool mIsDefault;
       
   106     CntViewParameters::ViewId mId;
       
   107     };
       
   108 #endif /* CNTABSTRACTLISTVIEW_H_ */