phonebookui/pbkcommonui/inc/cntcollectionview.h
changeset 24 0ba2181d7c28
child 25 76a2435edfd4
equal deleted inserted replaced
0:e686773b3f54 24:0ba2181d7c28
       
     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 CNTCOLLECTIONVIEW_H
       
    19 #define CNTCOLLECTIONVIEW_H
       
    20 
       
    21 #include "cntbaselistview.h"
       
    22 #include "cntcollectionlistmodel.h"
       
    23 
       
    24 class QStringListModel;
       
    25 
       
    26 class CntCollectionView : public CntBaseListView
       
    27 {
       
    28     Q_OBJECT
       
    29 
       
    30 public slots:
       
    31 
       
    32     void aboutToCloseView();
       
    33     void onListViewActivated(const QModelIndex &index);
       
    34     void onLongPressed(HbAbstractViewItem *item, const QPointF &coords);
       
    35     void handleExecutedCommand(QString command, QContact contact);
       
    36     void newGroup();
       
    37     void addMenuItems();
       
    38     void reorderGroup();
       
    39     void deleteGroups();
       
    40     void disconnectAll();
       
    41 
       
    42 public:
       
    43     CntCollectionView(CntViewManager *viewManager, QGraphicsItem *parent = 0);
       
    44     ~CntCollectionView();
       
    45 
       
    46     CntViewParameters::ViewId viewId() const { return CntViewParameters::collectionView; }
       
    47 
       
    48 #ifdef PBK_UNIT_TEST
       
    49 public:
       
    50 #else
       
    51 protected:
       
    52 #endif
       
    53     void addActionsToToolBar();
       
    54     void setDataModel();
       
    55     void refreshDataModel();
       
    56 
       
    57 #ifdef PBK_UNIT_TEST
       
    58 public:
       
    59 #else
       
    60 private:
       
    61 #endif
       
    62     QList<QContactLocalId>   mContactsLocalIdList;
       
    63     CntCollectionListModel * mModel;
       
    64     QList<QContactId>        mContactIdList;
       
    65     //Option menu item
       
    66     HbAction         *mReorderAction; 
       
    67     HbAction         *mDeleteGroupAction; 
       
    68     HbAction         *mDisconnectAllAction;
       
    69     HbMenu           *mOptionsMenu;
       
    70 };
       
    71 
       
    72 #endif // CNTCOLLECTIONVIEW_H
       
    73 
       
    74 // EOF