phonebookui/pbkcommonui/inc/cntbaseselectionview.h
changeset 24 0ba2181d7c28
child 27 de1630741fbe
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 CNTBASESELECTIONVIEW_H
       
    19 #define CNTBASESELECTIONVIEW_H
       
    20 
       
    21 #include "cntbaseview.h"
       
    22 #include "qtpbkglobal.h"
       
    23 #include <hbabstractviewitem.h>
       
    24 #include <hbabstractitemview.h>
       
    25 
       
    26 class HbListView;
       
    27 class QGraphicsLinearLayout;
       
    28 class QItemSelectionModel;
       
    29 
       
    30 class QTPBK_EXPORT CntBaseSelectionView : public CntBaseView
       
    31 {
       
    32     Q_OBJECT
       
    33 
       
    34 public:
       
    35     CntBaseSelectionView(CntViewManager *viewManager, QGraphicsItem *parent = 0, HbAbstractItemView::SelectionMode newMode = HbAbstractItemView::MultiSelection);
       
    36     ~CntBaseSelectionView();
       
    37 
       
    38 public:
       
    39 
       
    40     virtual void setupView();
       
    41     virtual void activateView(const CntViewParameters &viewParameters);
       
    42     void addItemsToLayout();
       
    43     
       
    44 public slots:
       
    45     virtual void onListViewActivated(const QModelIndex &index) { Q_UNUSED(index); }
       
    46 
       
    47 public:
       
    48 
       
    49     HbListView             *listView();
       
    50     QGraphicsLinearLayout  *listLayout();
       
    51     QItemSelectionModel    *selectionModel();
       
    52 
       
    53 private:
       
    54     HbListView              *mListView;
       
    55     QGraphicsLinearLayout   *mListLayout;
       
    56 
       
    57     // needed in subclasses
       
    58 #ifdef PBK_UNIT_TEST
       
    59 public:
       
    60 #else
       
    61 protected:
       
    62 #endif
       
    63     HbAbstractItemView::SelectionMode   mSelectionMode;
       
    64 
       
    65 };
       
    66 
       
    67 #endif /* CNTBASESELECTIONVIEW_H */