locationpickerservice/inc/locationpickerpotraitview.h
changeset 17 0f22fb80ebba
child 20 cd10d5b85554
equal deleted inserted replaced
15:13ae750350c9 17:0f22fb80ebba
       
     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: LocationPickerPotraitView declaration
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef LOCATIONPICKERPOTRAITVIEW_H
       
    19 #define LOCATIONPICKERPOTRAITVIEW_H
       
    20 
       
    21 
       
    22 #include <hbview>
       
    23 #include <hbdocumentloader.h>
       
    24 #include "locationpickertypes.h"
       
    25 
       
    26 //forward declarations
       
    27 class HbListView;
       
    28 class QStandardItemModel;
       
    29 class LocationPickerProxyModel;
       
    30 class LocationPickerContent;
       
    31 class LocationPickerCollectionListContent;
       
    32 class LocationPickerCollectionContent;
       
    33 class HbListViewItem;
       
    34 class HbAction;
       
    35 
       
    36 /**  
       
    37  * Class defines the location picker view
       
    38  */
       
    39 class LocationPickerPotraitView : public HbView
       
    40 {
       
    41     Q_OBJECT
       
    42 public:
       
    43     // constructor
       
    44     LocationPickerPotraitView(HbDocumentLoader* aLoader);
       
    45     // destructor
       
    46     ~LocationPickerPotraitView();
       
    47 private:
       
    48     //disable the tabs
       
    49     void disableTabs();
       
    50 public:
       
    51     //get the items from docml and connect to respective slots
       
    52     void init(Qt::Orientation aOrientation );
       
    53     //Set the appropriate model on list view
       
    54     void manageListView();
       
    55     //Create collection list and sets to list view
       
    56     void setCollectionData( quint32 acategoryId );
       
    57     //Set Ctegory ID
       
    58     void setCategoryID( quint32 acategoryId  );
       
    59     //Get the view type
       
    60     TViewType getViewType();
       
    61     //set the view type
       
    62     void setViewType(TViewType aViewType);
       
    63 private slots:
       
    64     //slot to handle list item actions     
       
    65     void handleActivated(const QModelIndex &aIndex);
       
    66     //slots to handle menu action items     
       
    67     void sortDescending();
       
    68     void sortAscending();
       
    69     void backTriggered();
       
    70     //slot to handle search tab
       
    71     void searchTabTriggered();
       
    72 public slots:
       
    73     //slot to handle all tab
       
    74     void allTabTriggered();
       
    75     //slot to handle collection tab
       
    76     void colectionTabTriggered();
       
    77 signals:
       
    78     void switchToSearchView();
       
    79     void selectItem( quint32 aLm );
       
    80     void completeService();
       
    81     void sendCategoryID( quint32 aCategoryId );
       
    82     void handleAllList();
       
    83 private:
       
    84     //document loader
       
    85     HbDocumentLoader* mDocumentLoader;
       
    86     // all view
       
    87     LocationPickerContent* mLocationPickerContent;
       
    88     // collection list content
       
    89     LocationPickerCollectionListContent* mLocationPickerCollectionListContent;
       
    90     //actions
       
    91     HbAction *mAllAction;
       
    92     HbAction *mCollectionAction;
       
    93     HbAction *mSearchAction;
       
    94     HbAction *mAscendingAction;
       
    95     HbAction *mDescendingAction;
       
    96     //secondary back action
       
    97     HbAction *mPotraitBackAction;
       
    98     // list view
       
    99     HbListView  *mListView;
       
   100     //list item
       
   101     HbListViewItem *mListItem;
       
   102     //collection content 
       
   103     LocationPickerCollectionContent *mCollectionContent;
       
   104     //ViewType
       
   105     TViewType mViewType ;
       
   106     // get the collection/category id
       
   107     quint32 mCategoryId;
       
   108 };
       
   109 
       
   110 
       
   111 #endif // LOCATIONPICKERPOTRAITVIEW_H