locationpickerservice/inc/locationpickerpotraitview.h
changeset 20 cd10d5b85554
parent 17 0f22fb80ebba
child 24 ccec19943943
equal deleted inserted replaced
17:0f22fb80ebba 20:cd10d5b85554
    17 
    17 
    18 #ifndef LOCATIONPICKERPOTRAITVIEW_H
    18 #ifndef LOCATIONPICKERPOTRAITVIEW_H
    19 #define LOCATIONPICKERPOTRAITVIEW_H
    19 #define LOCATIONPICKERPOTRAITVIEW_H
    20 
    20 
    21 
    21 
    22 #include <hbview>
    22 #include <HbView>
    23 #include <hbdocumentloader.h>
    23 #include <hbdocumentloader.h>
    24 #include "locationpickertypes.h"
    24 #include "locationpickertypes.h"
    25 
    25 
    26 //forward declarations
    26 //forward declarations
    27 class HbListView;
    27 class HbListView;
    28 class QStandardItemModel;
    28 class QStandardItemModel;
    29 class LocationPickerProxyModel;
    29 class LocationPickerProxyModel;
    30 class LocationPickerContent;
       
    31 class LocationPickerCollectionListContent;
    30 class LocationPickerCollectionListContent;
    32 class LocationPickerCollectionContent;
    31 class LocationPickerCollectionContent;
    33 class HbListViewItem;
    32 class HbListViewItem;
    34 class HbAction;
    33 class HbAction;
    35 
    34 
    39 class LocationPickerPotraitView : public HbView
    38 class LocationPickerPotraitView : public HbView
    40 {
    39 {
    41     Q_OBJECT
    40     Q_OBJECT
    42 public:
    41 public:
    43     // constructor
    42     // constructor
    44     LocationPickerPotraitView(HbDocumentLoader* aLoader);
    43     LocationPickerPotraitView( HbDocumentLoader* aLoader );
    45     // destructor
    44     // destructor
    46     ~LocationPickerPotraitView();
    45     ~LocationPickerPotraitView();
    47 private:
    46 public:
    48     //disable the tabs
    47     //disable the tabs
    49     void disableTabs();
    48     void disableTabs( QStandardItemModel *aModel );
    50 public:
       
    51     //get the items from docml and connect to respective slots
    49     //get the items from docml and connect to respective slots
    52     void init(Qt::Orientation aOrientation );
    50     void init( bool aPopulated, Qt::Orientation aOrientation, QStandardItemModel *aModel );
    53     //Set the appropriate model on list view
    51     //Set the appropriate model on list view
    54     void manageListView();
    52     void manageListView();
    55     //Create collection list and sets to list view
    53     //Create collection list and sets to list view
    56     void setCollectionData( quint32 acategoryId );
    54     void setCollectionData( quint32 acategoryId );
    57     //Set Ctegory ID
    55     //Set Ctegory ID
    58     void setCategoryID( quint32 acategoryId  );
    56     void setCategoryID( quint32 acategoryId  );
    59     //Get the view type
    57     //Get the view type
    60     TViewType getViewType();
    58     TViewType getViewType();
    61     //set the view type
    59     //set the view type
    62     void setViewType(TViewType aViewType);
    60     void setViewType( TViewType aViewType );
       
    61     //clear collection Model
       
    62     void clearContentModel();
    63 private slots:
    63 private slots:
    64     //slot to handle list item actions     
    64     //slot to handle list item actions     
    65     void handleActivated(const QModelIndex &aIndex);
    65     void handleActivated( const QModelIndex &aIndex );
    66     //slots to handle menu action items     
    66     //slots to handle menu action items     
    67     void sortDescending();
    67     void sortDescending();
    68     void sortAscending();
    68     void sortAscending();
    69     void backTriggered();
    69     void backTriggered();
    70     //slot to handle search tab
    70     //slot to handle search tab
    78     void switchToSearchView();
    78     void switchToSearchView();
    79     void selectItem( quint32 aLm );
    79     void selectItem( quint32 aLm );
    80     void completeService();
    80     void completeService();
    81     void sendCategoryID( quint32 aCategoryId );
    81     void sendCategoryID( quint32 aCategoryId );
    82     void handleAllList();
    82     void handleAllList();
       
    83     void collectionContentExited();
    83 private:
    84 private:
    84     //document loader
    85     //document loader
    85     HbDocumentLoader* mDocumentLoader;
    86     HbDocumentLoader* mDocumentLoader;
    86     // all view
       
    87     LocationPickerContent* mLocationPickerContent;
       
    88     // collection list content
    87     // collection list content
    89     LocationPickerCollectionListContent* mLocationPickerCollectionListContent;
    88     LocationPickerCollectionListContent* mLocationPickerCollectionListContent;
       
    89     //locationPickerProxyModel
       
    90     LocationPickerProxyModel *mProxyModel;
       
    91 	//standard model
       
    92     QStandardItemModel *mModel;
    90     //actions
    93     //actions
    91     HbAction *mAllAction;
    94     HbAction *mAllAction;
    92     HbAction *mCollectionAction;
    95     HbAction *mCollectionAction;
    93     HbAction *mSearchAction;
    96     HbAction *mSearchAction;
    94     HbAction *mAscendingAction;
    97     HbAction *mAscendingAction;