homescreenapp/hsutils/src/hsmenueventfactory.cpp
changeset 90 3ac3aaebaee5
parent 86 e4f038c420f7
child 98 e6f74eb7f69f
equal deleted inserted replaced
86:e4f038c420f7 90:3ac3aaebaee5
   133 
   133 
   134     \return Open Applications Library event.
   134     \return Open Applications Library event.
   135  */
   135  */
   136 QEvent *HsMenuEventFactory::createOpenAppLibraryEvent(
   136 QEvent *HsMenuEventFactory::createOpenAppLibraryEvent(
   137     Hs::HsMenuMode menuMode,
   137     Hs::HsMenuMode menuMode,
   138 	QVariant homescreenData)
   138     QVariant homescreenData)
   139 {
   139 {
   140     QVariantMap params;
   140     QVariantMap params;
   141     params.insert(Hs::menuModeType, menuMode);
   141     params.insert(Hs::menuModeType, menuMode);
   142     params.insert(Hs::homescreenData, homescreenData);
   142     params.insert(Hs::homescreenData, homescreenData);
   143     return new HsMenuEvent(HsMenuEvent::OpenApplicationLibrary, params);
   143     return new HsMenuEvent(HsMenuEvent::OpenApplicationLibrary, params);
   144 }
   144 }
   145 
   145 
   146 /*!
   146 /*!
   147     Creates an HsMenuEvent::OpenApplicationLibrary event.
   147     Creates an HsMenuEvent::BackFromInstalledView event.
   148 
   148 
   149     \return Open Applications Library event.
   149     \return Back from installed view event.
   150  */
   150  */
   151 QEvent *HsMenuEventFactory::createOpenInstalledViewEvent()
   151 QEvent *HsMenuEventFactory::createBackFromInstalledViewEvent(
   152 {
   152     int id, QString collectionType)
   153 	return new HsMenuEvent(HsMenuEvent::OpenInstalledView);
   153 {
       
   154     QVariantMap params;
       
   155     params.insert(Hs::itemIdKey, id);
       
   156     params.insert(Hs::entryTypeNameKey, collectionType);
       
   157     return new HsMenuEvent(HsMenuEvent::BackFromInstalledView, params);
       
   158 }
       
   159 
       
   160 /*!
       
   161     Creates an HsMenuEvent::OpenInstalledView event.
       
   162 
       
   163     \return Open Installed View event.
       
   164  */
       
   165 QEvent *HsMenuEventFactory::createOpenInstalledViewEvent(
       
   166     int id, QString collectionType)
       
   167 {
       
   168     QVariantMap params;
       
   169     params.insert(Hs::itemIdKey, id);
       
   170     params.insert(Hs::entryTypeNameKey, collectionType);
       
   171 	return new HsMenuEvent(HsMenuEvent::OpenInstalledView, params);
   154 }
   172 }
   155 
   173 
   156 /*!
   174 /*!
   157     Creates an HsMenuEvent::OpenHomeScreen event.
   175     Creates an HsMenuEvent::OpenHomeScreen event.
   158 
   176 
   209 
   227 
   210 /*!
   228 /*!
   211     Creates an HsMenuEvent::RemoveAppFromCollection event.
   229     Creates an HsMenuEvent::RemoveAppFromCollection event.
   212 
   230 
   213     \param aItemId Item id of the application to be removed from a collection.
   231     \param aItemId Item id of the application to be removed from a collection.
   214     \param aCollectionId Item id of the collection the application is to be removed from.
   232     \param aCollectionId Item id of the collection the application is to be
       
   233      removed from.
   215     \return RemoveAppFromCollection event.
   234     \return RemoveAppFromCollection event.
   216  */
   235  */
   217 QEvent *HsMenuEventFactory::createRemoveAppFromCollectionEvent(int aItemId,
   236 QEvent *HsMenuEventFactory::createRemoveAppFromCollectionEvent(int aItemId,
   218         int aCollectionId)
   237         int aCollectionId)
   219 {
   238 {
   225 
   244 
   226 /*!
   245 /*!
   227     Creates an HsMenuEvent::UninstallApplication event.
   246     Creates an HsMenuEvent::UninstallApplication event.
   228 
   247 
   229     \param aItemId Item id of the application to be removed from a collection.
   248     \param aItemId Item id of the application to be removed from a collection.
   230     \param aCollectionId Item id of the collection the application is to be removed from.
   249     \param aCollectionId Item id of the collection the application is to be
       
   250      removed from.
   231     \return UninstallApplication event.
   251     \return UninstallApplication event.
   232  */
   252  */
   233 QEvent *HsMenuEventFactory::createUninstallApplicationEvent(int aItemId)
   253 QEvent *HsMenuEventFactory::createUninstallApplicationEvent(int aItemId)
   234 {
   254 {
   235     QVariantMap params;
   255     QVariantMap params;