homescreenapp/stateplugins/hshomescreenstateplugin/inc/hswallpaperselectionstate.h
changeset 62 341166945d65
child 90 3ac3aaebaee5
equal deleted inserted replaced
57:2e2dc3d30ca8 62:341166945d65
       
     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 #ifndef HSWALLPAPERSELECTIONSTATE_H
       
    19 #define HSWALLPAPERSELECTIONSTATE_H
       
    20 
       
    21 #include <QState>
       
    22 
       
    23 #include "hstest_global.h"
       
    24 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
       
    25 
       
    26 class HsWallpaper;
       
    27 class HsSpinnerDialog;
       
    28 
       
    29 #ifdef Q_OS_SYMBIAN
       
    30 class HsImageFetcherClient;
       
    31 #else
       
    32 class XQAIWGetImageClient;
       
    33 #endif
       
    34 
       
    35 class HsWallpaperSelectionState : public QState
       
    36 {
       
    37     Q_OBJECT
       
    38 
       
    39 public:
       
    40     HsWallpaperSelectionState(QState *parent = 0);
       
    41     ~HsWallpaperSelectionState();
       
    42 
       
    43 signals:
       
    44     void event_assignImage();
       
    45     void event_error();
       
    46     void event_waitInput();
       
    47     
       
    48 private:
       
    49     Q_DISABLE_COPY(HsWallpaperSelectionState)        
       
    50     void setupStates();
       
    51 
       
    52 private slots:    
       
    53     void action_selectingImage_start();
       
    54     void action_selectingImage_cleanup();
       
    55     void action_assigningImage_showWaitDialog();
       
    56     void action_assigningImage_start();
       
    57     void action_assigningImage_cleanup();
       
    58     void action_assigningImage_hideWaitDialog();
       
    59     void action_errorMessage_show();
       
    60 
       
    61     void onFetchCompleted(const QString &imagePath);
       
    62     void onFetchFailed(int errorCode, const QString &errorMessage);
       
    63     void onImageSet();
       
    64     void onImageSetFailed();
       
    65 
       
    66 private:    
       
    67 #ifdef Q_OS_SYMBIAN
       
    68     HsImageFetcherClient *mImageFetcher;
       
    69 #else
       
    70     XQAIWGetImageClient *mImageFetcher;
       
    71 #endif
       
    72     QString mImagePath;
       
    73     HsWallpaper *mWallpaper;    
       
    74     HsSpinnerDialog *mWaitDialog;
       
    75     
       
    76     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
       
    77 };
       
    78 
       
    79 #endif // HSWALLPAPERSELECTIONSTATE_H