homescreenapp/hsapplication/tsrc/t_hsapplication/t_hsapplicationexe/src/hswidgetcomponent_mock.cpp
changeset 90 3ac3aaebaee5
equal deleted inserted replaced
86:e4f038c420f7 90:3ac3aaebaee5
       
     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 "hswidgetcomponent.h"
       
    19 
       
    20 /*!
       
    21 
       
    22 */
       
    23 HsWidgetComponent::~HsWidgetComponent()
       
    24 {
       
    25 }
       
    26 
       
    27 /*!
       
    28 
       
    29 */
       
    30 QString HsWidgetComponent::rootPath() const
       
    31 {
       
    32     return mRootPath;
       
    33 }
       
    34 
       
    35 /*!
       
    36 
       
    37 */
       
    38 QString HsWidgetComponent::uri() const
       
    39 {
       
    40     return mUri;
       
    41 }
       
    42 
       
    43 
       
    44 bool HsWidgetComponent::isAvailable() const
       
    45 {
       
    46     return  true;
       
    47 }
       
    48 /*!
       
    49 
       
    50 */
       
    51 HsWidgetComponent::HsWidgetComponent(const QString &uri, QObject *parent)
       
    52   : QObject(parent),
       
    53     mUri(uri),
       
    54     mState(Available)
       
    55 {
       
    56 }
       
    57 
       
    58 
       
    59 /*!
       
    60 
       
    61 */
       
    62 void HsWidgetComponent::resolveRootPathAndTranslationFilename()
       
    63 {
       
    64 }
       
    65 
       
    66 /*!
       
    67 
       
    68 */
       
    69 void HsWidgetComponent::installTranslator()
       
    70 {
       
    71 }
       
    72 
       
    73 /*!
       
    74 
       
    75 */
       
    76 void HsWidgetComponent::uninstallTranslator()
       
    77 {
       
    78 }
       
    79 
       
    80 void HsWidgetComponent::emitAboutToUninstall()
       
    81 {
       
    82     if (mState == Available) {
       
    83         mState = Uninstalling;
       
    84         emit aboutToUninstall();
       
    85     }
       
    86 }
       
    87 void HsWidgetComponent::emitUninstalled()
       
    88 {
       
    89     if (mState == Uninstalling) {
       
    90         mState = Available;
       
    91         emit uninstalled();
       
    92     }
       
    93 }
       
    94 void HsWidgetComponent::emitUpdated()
       
    95 {
       
    96     if (mState == Uninstalling) {
       
    97         mState = Available;
       
    98         emit updated();
       
    99     }
       
   100 }
       
   101 void HsWidgetComponent::emitUnavailable()
       
   102 {
       
   103     if (mState == Available) {
       
   104         mState = Unavailable;
       
   105         emit unavailable();
       
   106     }
       
   107 }
       
   108 void HsWidgetComponent::emitAvailable()
       
   109 {
       
   110     if (mState == Unavailable) {
       
   111         mState = Available;
       
   112         emit available();
       
   113     }
       
   114 }