locationpickerservice/inc/locationpickerdatamanager_p.h
changeset 20 cd10d5b85554
parent 17 0f22fb80ebba
child 30 96df3ab41000
equal deleted inserted replaced
17:0f22fb80ebba 20:cd10d5b85554
    20 
    20 
    21 #include <QStandardItemModel>
    21 #include <QStandardItemModel>
    22 #include "locationpickertypes.h"
    22 #include "locationpickertypes.h"
    23 #include "qlocationpickeritem.h"
    23 #include "qlocationpickeritem.h"
    24 
    24 
    25 class CPosLmItemIterator;
    25 class LocationDataLookupDb;
    26 class CPosLandmarkDatabase;
    26 class QLookupItem;
    27 class CPosLmCategoryManager;
       
    28 class CPosLandmarkSearch;
       
    29 
    27 
    30 /**  Class used for managing the data of model
    28 /**  Class used for managing the data of model
    31  *
    29  *
    32  */
    30  */
    33 class LocationPickerDataManagerPrivate
    31 class LocationPickerDataManagerPrivate
    34 {
    32 {
    35 public:
    33 public:
    36     // constructors
    34     // constructor
    37     LocationPickerDataManagerPrivate();
    35     LocationPickerDataManagerPrivate();
    38     LocationPickerDataManagerPrivate( QStandardItemModel &aModel, TViewType aViewType );
       
    39     
    36     
    40     // destructor
    37     // destructor
    41     ~LocationPickerDataManagerPrivate();
    38     ~LocationPickerDataManagerPrivate();
    42     
    39     
    43     // populates the model with data
    40     // populates the model with data
    44     bool populateModel( const Qt::Orientations aOrientation, quint32 aCollectionId = 0 );
    41     bool populateModel( QStandardItemModel &aModel, TViewType aViewType, 
    45     
    42             const Qt::Orientations aOrientation, quint32 aCollectionId = 0 );
    46     // gets the data pointed to by index and copies to the aValue
       
    47     void getData(int index, quint32& aValue );
       
    48     
    43     
    49     // gets the location item
    44     // gets the location item
    50     void getLocationItem( quint32 aLmId, QLocationPickerItem &aItem );
    45     void getLocationItem( quint32 aLmId, QLocationPickerItem &aItem );
    51 
    46 
    52 private:
    47 private:
    53     // populates model
       
    54     bool populateModelL( quint32 aCollectionId );
       
    55     // populates landmarks
    48     // populates landmarks
    56     void populateLandmarksL();
    49     bool populateLandmarks( QList<QLookupItem> &aItemArray );
    57     // populates collections
    50     // populates collections
    58     void populateCollectionsL();
    51     void populateCollections();
    59     // gets the location item
       
    60     void getLocationItemL( quint32 aLmId, QLocationPickerItem &aItem );
       
    61 
    52 
    62 private:
    53 private:
    63     Qt::Orientations mOrientation;
    54     Qt::Orientations mOrientation;
    64     QStandardItemModel *mModel;
    55     QStandardItemModel *mModel;
    65     TViewType mViewType;
    56     TViewType mViewType;
    66     CPosLmItemIterator* mIterator;
    57     LocationDataLookupDb *mDb; 
    67     CPosLandmarkDatabase* mLandmarkDb;
       
    68     CPosLmCategoryManager *mLmCategoryManager;
       
    69     CPosLandmarkSearch *mLandmarkSearch;
       
    70     quint32 mCategoryId;
    58     quint32 mCategoryId;
    71 };
    59 };
    72 
    60 
    73 #endif // LOCATIONPICKERDATAMANAGER_P_H
    61 #endif // LOCATIONPICKERDATAMANAGER_P_H