homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hsaddtohomescreenstate.h
changeset 35 f9ce957a272c
child 36 cdae8c6c3876
equal deleted inserted replaced
5:c743ef5928ba 35:f9ce957a272c
       
     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:  Menu Application Library state.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef HSADDSHORTCUTSTATE_H
       
    20 #define HSADDSHORTCUTSTATE_H
       
    21 
       
    22 #include <hsmenubasestate.h>
       
    23 
       
    24 #include "hsmenustates_global.h"
       
    25 HS_STATES_TEST_CLASS(MenuStatesTest)
       
    26 
       
    27 
       
    28 
       
    29 /**
       
    30  * @ingroup group_hsmenustateplugin
       
    31  * @brief Application Library State.
       
    32  *
       
    33  * Parent state for Application Library functionality (browsing applications and collections)
       
    34  *
       
    35  * @see StateMachine
       
    36  *
       
    37  * @lib ?library
       
    38  * @since S60 ?S60_version
       
    39  */
       
    40 class HsAddToHomeScreenState: public  HsMenuBaseState
       
    41 {
       
    42     Q_OBJECT
       
    43 
       
    44     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
       
    45 
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Constructor.
       
    50      *
       
    51      * @since S60 ?S60_version.
       
    52      * @param parent Owner.
       
    53      */
       
    54     HsAddToHomeScreenState(QState *parent = 0);
       
    55 
       
    56     /**
       
    57      * Destructor.
       
    58      *
       
    59      * @since S60 ?S60_version.
       
    60      */
       
    61     virtual ~HsAddToHomeScreenState();
       
    62 
       
    63 private slots:
       
    64 
       
    65     /**
       
    66      * Inherited from HsMenuBaseState.
       
    67      *
       
    68      * @since S60 ?S60_version.
       
    69      */
       
    70     void onEntry(QEvent *event);
       
    71 
       
    72 private:
       
    73 
       
    74     void showMessageWidgetCorrupted(int itemId);
       
    75 
       
    76     void addWidget(HsContentService &service, const QString &library,
       
    77                    const QString &uri, int entryId);
       
    78 
       
    79     void addShortcut(HsContentService &contentService, int entryId);
       
    80 
       
    81     void logActionResult(QString operationName, int entryId,
       
    82                          bool operationSucceded);
       
    83 
       
    84 
       
    85     // keep path in memory so it wont
       
    86     QString mLibraryPath;
       
    87 
       
    88 };
       
    89 
       
    90 #endif //HSADDSHORTCUTSTATE_H