locationpickerservice/inc/locationpickersearchview.h
changeset 15 13ae750350c9
child 17 0f22fb80ebba
equal deleted inserted replaced
0:522cd55cc3d7 15:13ae750350c9
       
     1 /*
       
     2 * Copyright (c) 2010 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: LocationPickerSearchView declaration
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef LOCATIONPICKERSEARCHVIEW_H
       
    19 #define LOCATIONPICKERSEARCHVIEW_H
       
    20 
       
    21 
       
    22 #include <HbView>
       
    23 
       
    24 //forward declarations
       
    25 class HbListView;
       
    26 class HbAction;
       
    27 class QGraphicsLinearLayout;
       
    28 class QStandardItemModel;
       
    29 class HbSearchPanel;
       
    30 class LocationPickerAppWindow;
       
    31 class LocationPickerDataManager;
       
    32 class LocationPickerProxyModel;
       
    33 
       
    34 /**  Class defines the search view of location picker
       
    35  *
       
    36  */
       
    37 class LocationPickerSearchView : public HbView
       
    38 {
       
    39     Q_OBJECT
       
    40 public:
       
    41     // constructor
       
    42     LocationPickerSearchView( LocationPickerAppWindow *aWindow, QGraphicsItem* aParent = 0 );
       
    43     // destructor
       
    44     ~LocationPickerSearchView();
       
    45 
       
    46 private slots:
       
    47     // slot to perform search
       
    48     void doSearch(QString aCriteria);
       
    49     // slot to handle select event on a list item
       
    50     void handleActivated(const QModelIndex &aIndex);
       
    51 
       
    52 private:
       
    53 
       
    54     //proxymodel used for sort and filter
       
    55     LocationPickerProxyModel *mProxyModel;
       
    56     // model for the view
       
    57     QStandardItemModel *mModel;
       
    58     // graphics linear layout for list items and search panel
       
    59     QGraphicsLinearLayout* mLayout;
       
    60     // list view
       
    61     HbListView  *mListView;
       
    62     // search panel
       
    63     HbSearchPanel *mSearchPanel;
       
    64     // handle to main window
       
    65     LocationPickerAppWindow *mWindow;
       
    66     // handle to data manager to populate model
       
    67     LocationPickerDataManager *mDataManager;
       
    68     HbAction *mSecondaryBackAction;
       
    69 };
       
    70 
       
    71 
       
    72 #endif // LOCATIONPICKERSEARCHVIEW_H