homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsmenuworkerstate.cpp
changeset 63 52b0f64eeb51
parent 62 341166945d65
child 86 e4f038c420f7
equal deleted inserted replaced
62:341166945d65 63:52b0f64eeb51
    26 #include "hscollectionnamestate.h"
    26 #include "hscollectionnamestate.h"
    27 #include "hsarrangestate.h"
    27 #include "hsarrangestate.h"
    28 #include "hspreviewhswidgetstate.h"
    28 #include "hspreviewhswidgetstate.h"
    29 #include "hsviewappsettingsstate.h"
    29 #include "hsviewappsettingsstate.h"
    30 #include "hsviewappdetailsstate.h"
    30 #include "hsviewappdetailsstate.h"
       
    31 #include "hsinstallationlogstate.h"
    31 
    32 
    32 /*!
    33 /*!
    33  \class HsMenuWorkerState
    34  \class HsMenuWorkerState
    34  \ingroup group_hsworkerstateplugin
    35  \ingroup group_hsworkerstateplugin
    35  \brief Menu Worker State.
    36  \brief Menu Worker State.
    77     createChildState<HsDeleteCollectionItemState> (
    78     createChildState<HsDeleteCollectionItemState> (
    78         HsMenuEvent::RemoveAppFromCollection);
    79         HsMenuEvent::RemoveAppFromCollection);
    79     createChildState<HsUninstallItemState> (
    80     createChildState<HsUninstallItemState> (
    80         HsMenuEvent::UninstallApplication);
    81         HsMenuEvent::UninstallApplication);
    81     createChildState<HsArrangeState> (HsMenuEvent::ArrangeCollection);
    82     createChildState<HsArrangeState> (HsMenuEvent::ArrangeCollection);
       
    83     createChildState<HsArrangeState> (HsMenuEvent::ArrangeAllCollections);
    82 
    84 
       
    85     
    83     // create a new child state based on the template
    86     // create a new child state based on the template
    84     HsCollectionNameState *newChildState = new HsCollectionNameState(this);
    87     HsCollectionNameState *newChildState = new HsCollectionNameState(this);
    85     // create a transition to the new child state which will be triggered by
    88     // create a transition to the new child state which will be triggered by
    86     // an event with specified operation type
    89     // an event with specified operation type
    87     HsMenuEventTransition *renameCollectionTransition =
    90     HsMenuEventTransition *renameCollectionTransition =
    93         new HsMenuEventTransition(HsMenuEvent::CreateCollection,
    96         new HsMenuEventTransition(HsMenuEvent::CreateCollection,
    94                                   mInitialState, newChildState);
    97                                   mInitialState, newChildState);
    95     mInitialState->addTransition(createCollectionTransition);
    98     mInitialState->addTransition(createCollectionTransition);
    96     // set a transition to the initial state after child processing finished
    99     // set a transition to the initial state after child processing finished
    97     newChildState->addTransition(newChildState, SIGNAL(exit()), mInitialState);
   100     newChildState->addTransition(newChildState, SIGNAL(exit()), mInitialState);
    98 
   101     connect(this, SIGNAL(reset()), newChildState, SIGNAL(exit()));
       
   102     
    99     HsAddAppsToCollectionState *addAppsToCollectionState =
   103     HsAddAppsToCollectionState *addAppsToCollectionState =
   100         new HsAddAppsToCollectionState(this);
   104         new HsAddAppsToCollectionState(this);
   101     // create a transition to the new child state which will be triggered by
   105     // create a transition to the new child state which will be triggered by
   102     // an event with specified operation type
   106     // an event with specified operation type
   103     HsMenuEventTransition *addAppsToCollectionTransition =
   107     HsMenuEventTransition *addAppsToCollectionTransition =
   106     mInitialState->addTransition(addAppsToCollectionTransition);
   110     mInitialState->addTransition(addAppsToCollectionTransition);
   107     // set a transition to the initial state after child processing finished
   111     // set a transition to the initial state after child processing finished
   108     addAppsToCollectionState->addTransition(addAppsToCollectionState,
   112     addAppsToCollectionState->addTransition(addAppsToCollectionState,
   109                                             SIGNAL(finished()), mInitialState);
   113                                             SIGNAL(finished()), mInitialState);
   110     connect(this, SIGNAL(reset()), addAppsToCollectionState, SIGNAL(finished()));
   114     connect(this, SIGNAL(reset()), addAppsToCollectionState, SIGNAL(finished()));
       
   115     
       
   116     
   111     createChildState<HsPreviewHSWidgetState> (HsMenuEvent::PreviewHSWidget);
   117     createChildState<HsPreviewHSWidgetState> (HsMenuEvent::PreviewHSWidget);
   112     createChildState<HsViewAppSettingsState> (HsMenuEvent::ShowAppSettings);
   118     createChildState<HsViewAppSettingsState> (HsMenuEvent::ShowAppSettings);
   113     createChildState<HsViewAppDetailsState> (HsMenuEvent::ShowAppDetails);
   119     createChildState<HsViewAppDetailsState> (HsMenuEvent::ShowAppDetails);
       
   120     createChildState<HsInstallationLogState> (HsMenuEvent::ShowInstallationLog);
   114 
   121 
   115     HSMENUTEST_FUNC_EXIT("HsMenuWorkerState::construct");
   122     HSMENUTEST_FUNC_EXIT("HsMenuWorkerState::construct");
   116 }
   123 }
   117 
   124 
   118 /*!
   125 /*!