homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamestate.cpp
changeset 62 341166945d65
parent 55 03646e8da489
child 71 1db7cc813a4e
equal deleted inserted replaced
57:2e2dc3d30ca8 62:341166945d65
    48  Signal emitted when user selects cancel.
    48  Signal emitted when user selects cancel.
    49  */
    49  */
    50 
    50 
    51 /*!
    51 /*!
    52  Constructor
    52  Constructor
    53  \param parent owner
    53  \param parent Parent state.
    54  \retval void
    54  \retval void
    55  */
    55  */
    56 HsCollectionNameState::HsCollectionNameState(QState *parent) :
    56 HsCollectionNameState::HsCollectionNameState(QState *parent) :
    57     QState(parent),
    57     QState(parent),
    58     mItemId(0), mCollectionNameDialog(NULL)
    58     mItemId(0), mCollectionNameDialog(NULL)
    72 /*!
    72 /*!
    73  Constructs contained objects.
    73  Constructs contained objects.
    74  */
    74  */
    75 void HsCollectionNameState::construct()
    75 void HsCollectionNameState::construct()
    76 {
    76 {
    77     setObjectName(this->parent()->objectName() + "/collectionnamestate");
    77     setObjectName("/collectionnamestate");
       
    78     if (this->parent()) {
       
    79         setObjectName(this->parent()->objectName() + objectName());
       
    80     }
       
    81     
    78     connect(this, SIGNAL(exited()), SLOT(cleanUp()));
    82     connect(this, SIGNAL(exited()), SLOT(cleanUp()));
    79 }
    83 }
    80 
    84 
    81 /*!
    85 /*!
    82  Sets entry event.
    86  Sets entry event.
    83  \param event entry event.
    87  \param event entry event.
    84  */
    88  */
    85 #ifdef COVERAGE_MEASUREMENT
       
    86 #pragma CTC SKIP
       
    87 #endif //COVERAGE_MEASUREMENT
       
    88 void HsCollectionNameState::onEntry(QEvent *event)
    89 void HsCollectionNameState::onEntry(QEvent *event)
    89 {
    90 {
    90     qDebug("CollectionState::onEntry()");
    91     qDebug("CollectionState::onEntry()");
    91     HSMENUTEST_FUNC_ENTRY("HsCollectionNameState::onEntry");
    92     HSMENUTEST_FUNC_ENTRY("HsCollectionNameState::onEntry");
    92     QState::onEntry(event);
    93     QState::onEntry(event);
   101     mCollectionNameDialog = new HsCollectionNameDialog(mItemId);
   102     mCollectionNameDialog = new HsCollectionNameDialog(mItemId);
   102     mCollectionNameDialog->open(this, SLOT(dialogFinished(HbAction*)));
   103     mCollectionNameDialog->open(this, SLOT(dialogFinished(HbAction*)));
   103 
   104 
   104     HSMENUTEST_FUNC_EXIT("HsCollectionNameState::onEntry");
   105     HSMENUTEST_FUNC_EXIT("HsCollectionNameState::onEntry");
   105 }
   106 }
   106 
       
   107 #ifdef COVERAGE_MEASUREMENT
       
   108 #pragma CTC ENDSKIP
       
   109 #endif //COVERAGE_MEASUREMENT
       
   110 
   107 
   111 // ---------------------------------------------------------------------------
   108 // ---------------------------------------------------------------------------
   112 // ---------------------------------------------------------------------------
   109 // ---------------------------------------------------------------------------
   113 //
   110 //
   114 void HsCollectionNameState::dialogFinished(HbAction* finishedAction)
   111 void HsCollectionNameState::dialogFinished(HbAction* finishedAction)