diff -r 4e8ebe173323 -r 23b5d6a29cce homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h Mon May 03 12:24:59 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddappstocollectionstate.h Fri May 14 15:43:04 2010 +0300 @@ -25,43 +25,25 @@ HS_STATES_TEST_CLASS(MenuStatesTest) class QStandardItemModel; +class HbAction; class HsAppsCheckList; +class HsCollectionNameDialog; +class HsCollectionsListDialog; -/** - * @ingroup group_hsworkerstateplugin - * @brief Application Library State. - * - * State responsible for adding new applications to collections. - * - * @see StateMachine - * - * @lib ?library - * @since S60 ?S60_version - */ class HsAddAppsToCollectionState: public QState { Q_OBJECT - // Friend classes HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest) public: - /** - * Types of collection's related actions. - */ enum CollectionActionType { - // No action NoActionType, - // Adding a specific application to an existing collection via item specific menu ViaItemSpecificMenuType = 1000, - // Add one/many applications to a new/an existing collection via the All view ViaAllViewOptionMenuType, - // Adding a new collection via the Collections view ViaAllCollectionsViewType, - // Add items to a collection via the collection's view options meu ViaCollectionsViewOptionsMenuType, - // Add a specific item to a collection via collection specific menu ViaCollectionSpecificMenuType }; @@ -70,60 +52,18 @@ signals: - /** - * Signal emitted when collection name is selected. - * - * @since S60 ?S60_version. - * @param collectionName name of collection. - */ void transitToSaveState(const QString &collectionName); - /** - * Signal emitted when collection name is selected - version to trigger - * transition to mAppCheckListState. - * - * @since S60 ?S60_version. - * @param collectionName name of collection. - */ void transitToAppsCheckListState(const QString &collectionName); - /** - * Signal emitted when collection id is selected. - * - * @since S60 ?S60_version. - * @param collectionId id of collection. - */ void transitToSaveState(int collectionId); - /** - * Signal emitted when collection id is selected - version to trigger - * transition to mAppCheckListState. - * - * @since S60 ?S60_version. - * @param collectionId id of collection. - */ void transitToAppsCheckListState(int collectionId); - /** - * Signal emitted when user selects creating new collection. - * - * @since S60 ?S60_version. - */ void transitToNewCollectionState(); - /** - * Signal emitted when applications are selected. - * - * @param appList application list. - * @since S60 ?S60_version. - */ void transitToSaveState(const QList &appList); - /** - * Signal emitted when user selects cancel. - * - * @since S60 ?S60_version. - */ void transitToFinalState(); protected: @@ -156,6 +96,10 @@ void appsCheckListState(); + void editorDialogFinished(HbAction* finishedAction); + + void listDialogFinished(HbAction* finishedAction); + private: void construct(); @@ -164,66 +108,38 @@ private: - /** - * Collection name. - */ QString mCollectionName; - /** - * Collection id. - */ int mCollectionId; - /** - * Applications list. - */ QList mAppList; - /** - * Boll indicating need of confirmation note after saving in content arsenal. - */ bool mShowConfirmation; - /** - * Initial state. - */ QState *mInitialState; - /** - * Select collection state. - */ QState *mSelectCollectionState; - /** - * Collection name state. - */ QState *mNewCollectionState; - /** - * Collection name state. - */ QState *mAppsCheckListState; - /** - * Collection action type. - */ CollectionActionType mActionType; - /** - * Applications sort order. - */ HsSortAttribute mApplicationsSortAttribute; - /** - * Collections sort order. - */ HsSortAttribute mCollectionsSortAttribute; - /** - * Applications check list. - */ HsAppsCheckList *mAppsCheckList; + HsCollectionNameDialog *mEditorDialog; + + bool mEditorFinishedEntered; + + HsCollectionsListDialog *mListDialog; + + bool mListFinishedEntered; + }; #endif /* ADDAPPSTOCOLLECTIONSTATE_H */