locationpickerservice/inc/locationpickerlandscapeview.h
changeset 31 8db05346071b
parent 30 96df3ab41000
child 32 9bd2e0ffe298
child 35 59575560d1e6
equal deleted inserted replaced
30:96df3ab41000 31:8db05346071b
     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: LocationPickerLandscapeView declaration
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef LOCATIONPICKERLANDSCAPEVIEW_H_
       
    19 #define LOCATIONPICKERLANDSCAPEVIEW_H_
       
    20 
       
    21 
       
    22 
       
    23 #include <HbView>
       
    24 #include <hbdocumentloader.h>
       
    25 #include "locationpickertypes.h"
       
    26 
       
    27 //forward declarations
       
    28 class HbListView;
       
    29 class QStandardItemModel;
       
    30 class HbAction;
       
    31 class QGraphicsLinearLayout;
       
    32 class HbLabel;
       
    33 class HgWidgetDataModel;
       
    34 class HbTextItem;
       
    35 class HgMediawall;
       
    36 class QPoint;
       
    37 class HbMenu;
       
    38 
       
    39 class LocationPickerProxyModel;
       
    40 class LocationPickerCollectionContent;
       
    41 class LocatipnPickerProxyModel;
       
    42 
       
    43 
       
    44 
       
    45 /**  
       
    46  * Class defines the location picker view
       
    47  */
       
    48 class LocationPickerLandscapeView : public HbView
       
    49 {
       
    50 
       
    51     Q_OBJECT
       
    52 public:
       
    53     // constructor
       
    54     LocationPickerLandscapeView( HbDocumentLoader* aLoader );
       
    55     // destructor
       
    56     ~LocationPickerLandscapeView();
       
    57 public:
       
    58     //get the items from docml and connect to respective slots
       
    59     void init( Qt::Orientation aOrientation, QStandardItemModel *aModel );
       
    60     //Set the appropriate model on hgwidget
       
    61     void manageHgWidget();
       
    62     //Create collection list and sets to list view
       
    63     void setCollectionData( quint32 aCategoryId );
       
    64     //Set Ctegory ID
       
    65     void setCategoryID( quint32 aCategoryId  );
       
    66     //Get the view type
       
    67     TViewType getViewType();
       
    68     //set the view type
       
    69     void setViewType( TViewType aViewType );
       
    70     //clear collection content
       
    71     void clearContentModel();
       
    72 private slots:
       
    73     //slot to handle list item actions     
       
    74     void handleActivated( const QModelIndex &aIndex );
       
    75     //slots to handle menu action items     
       
    76     void sortDescending();
       
    77     void sortAscending();
       
    78     void backButtonTriggered();
       
    79     //slot to handle search tab
       
    80     void searchTabTriggered();
       
    81 	//launch context menu
       
    82     void launchPopUpMenu(const QModelIndex &aIndex, const QPointF &aPoint);
       
    83 	//handle long press
       
    84     void handleLongPress();
       
    85 public slots:
       
    86     //slot to handle all tab
       
    87     void allTabTriggered();
       
    88     //slot to handle collection tab
       
    89     void colectionTabTriggered();
       
    90 signals:
       
    91     void switchToSearchView();
       
    92     void handleCollectionList();
       
    93     void selectItem( quint32 aLm );
       
    94     void completeService();
       
    95     void sendCategoryID( quint32 acategoryId );
       
    96     void collectionContentExited();
       
    97 private:
       
    98     //document loader
       
    99     HbDocumentLoader* mDocumentLoader;
       
   100     //locationPickerProxyModel
       
   101     LocationPickerProxyModel *mProxyModel;
       
   102     QStandardItemModel *mStandardModel;
       
   103     //actions
       
   104     HbAction *mAllAction;
       
   105     HbAction *mCollectionAction;
       
   106     HbAction *mSearchAction;
       
   107     HbAction *mAscendingAction;
       
   108     HbAction *mDescendingAction;
       
   109     //secondary back action
       
   110     HbAction *mLandscapeBackAction;
       
   111     //collection content 
       
   112     LocationPickerCollectionContent *mCollectionContent;
       
   113     //view type
       
   114     TViewType mViewType ;
       
   115     //get the collection/category id
       
   116     quint32 mCategoryId;
       
   117 	//model for hurriganes
       
   118     HgWidgetDataModel       *mModel;
       
   119 	//hurriganes 
       
   120     HgMediawall                *mWidget;
       
   121 	//Linear layout
       
   122     QGraphicsLinearLayout   *mLayout;
       
   123 	//text Item to display No Entry
       
   124     HbTextItem*             mEmptyLabel;
       
   125     QModelIndex mIndex;
       
   126     //context menu
       
   127     HbMenu* mLongPressMenu;
       
   128 };
       
   129 
       
   130 #endif /* LOCATIONPICKERLANDSCAPEVIEW_H_ */