homescreenapp/stateplugins/hshomescreenstateplugin/src/hsrootstate.cpp
changeset 51 4785f57bf3d4
equal deleted inserted replaced
46:23b5d6a29cce 51:4785f57bf3d4
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 #include <HbMainWindow>
       
    19 #include "hsbackuprestoreobserver.h"
       
    20 #include "hsrootstate.h"
       
    21 
       
    22 /*!
       
    23     \class HsRootState
       
    24     \ingroup group_hshomescreenstateplugin
       
    25     \brief View part of the home screen idle state.
       
    26 
       
    27     Loads the home screen scene.
       
    28 */
       
    29 
       
    30 /*!
       
    31     Constructs a new load scene state with the given \a parent.
       
    32 */
       
    33 HsRootState::HsRootState(QState *parent)
       
    34     : QState(parent)
       
    35 {	
       
    36     connect(this, SIGNAL(entered()), SLOT(action_startListenBURStatus()));
       
    37     connect(this, SIGNAL(exited()), SLOT(action_stopListenBURStatus()));
       
    38 }
       
    39 
       
    40 /*!
       
    41     Destroys this idle state.
       
    42 */
       
    43 HsRootState::~HsRootState()
       
    44 {
       
    45 }
       
    46 
       
    47 /*!
       
    48     Starts listen backup/restore status.
       
    49 */
       
    50 void HsRootState::action_startListenBURStatus()
       
    51 {
       
    52     HsBackupRestoreObserver *backupRestoreObserver = 
       
    53         HsBackupRestoreObserver::instance();
       
    54     
       
    55     connect(backupRestoreObserver, 
       
    56             SIGNAL(event_backupRestoreStarted()),
       
    57             SIGNAL(event_backupRestore()));
       
    58 }
       
    59 
       
    60 /*!
       
    61     Stops listen backup/restore status.
       
    62 */
       
    63 void HsRootState::action_stopListenBURStatus()
       
    64 {
       
    65     HsBackupRestoreObserver *backupRestoreObserver = 
       
    66         HsBackupRestoreObserver::instance();
       
    67                 
       
    68     backupRestoreObserver->disconnect(this);    
       
    69 }