locationpickerservice/src/locationpickercollectionlistcontent.cpp
changeset 31 8db05346071b
parent 30 96df3ab41000
equal deleted inserted replaced
30:96df3ab41000 31:8db05346071b
    23 // ======== MEMBER FUNCTIONS ========
    23 // ======== MEMBER FUNCTIONS ========
    24 
    24 
    25 // ----------------------------------------------------------------------
    25 // ----------------------------------------------------------------------
    26 // LocationPickerCollectionListContent::LocationPickerCollectionListContent()
    26 // LocationPickerCollectionListContent::LocationPickerCollectionListContent()
    27 // ----------------------------------------------------------------------
    27 // ----------------------------------------------------------------------
    28 LocationPickerCollectionListContent::LocationPickerCollectionListContent( Qt::Orientation aOrientation )
    28 LocationPickerCollectionListContent::LocationPickerCollectionListContent()
    29     :mOrientation(aOrientation),
    29     :mModel(NULL),
    30     mModel(NULL),
       
    31     mDataManager(NULL)
    30     mDataManager(NULL)
    32 {
    31 {
    33     // Create a standard model for the view list
    32     // Create a standard model for the view list
    34     mModel = new QStandardItemModel( this );
    33     mModel = new QStandardItemModel( this );
    35     if(mModel)
    34     if(mModel)
    36     {
    35     {
    37         // create data manager to manage data in the model
    36         // create data manager to manage data in the model
    38         mDataManager = LocationPickerDataManager::getInstance();
    37         mDataManager = LocationPickerDataManager::getInstance();
    39         bool populated = mDataManager->populateModel( *mModel, ELocationPickerCollectionListContent, mOrientation );
    38         bool populated = mDataManager->populateModel( *mModel, ELocationPickerCollectionListContent);
    40         if(!populated)
    39         if(!populated)
    41         {
    40         {
    42         qFatal("Error creating collection");
    41         qFatal("Error creating collection");
    43         }
    42         }
    44     }
    43     }
    54 
    53 
    55 // ----------------------------------------------------------------
    54 // ----------------------------------------------------------------
    56 // LocationPickerCollectionListContent::getStandardModel
    55 // LocationPickerCollectionListContent::getStandardModel
    57 // -----------------------------------------------------------------
    56 // -----------------------------------------------------------------
    58 QStandardItemModel* LocationPickerCollectionListContent::getStandardModel()
    57 QStandardItemModel* LocationPickerCollectionListContent::getStandardModel()
    59     {
    58 {
    60     return mModel;
    59     return mModel;
    61     }
    60 }
    62 
    61 
    63 // ----------------------------------------------------------------------------
    62 // ----------------------------------------------------------------------------
    64 // LocationPickerCollectionListContent::getData()
    63 // LocationPickerCollectionListContent::getData()
    65 // ----------------------------------------------------------------------------
    64 // ----------------------------------------------------------------------------
    66 
    65