homescreenapp/hsapplication/tsrc/t_hsapplication/t_hsapplicationexe/src/hswidgethost_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 <QGesture>
       
    19 
       
    20 #include <HbTouchArea>
       
    21 
       
    22 #include "hsscene.h"
       
    23 #include "hspage.h"
       
    24 #include "hswidgethost.h"
       
    25 #include "hswidgethostvisual.h"
       
    26 #include "hswidgettoucharea.h"
       
    27 
       
    28 HsWidgetHost::HsWidgetHost(int databaseId, QObject *parent)
       
    29   : QObject(parent),
       
    30     mDatabaseId(databaseId),
       
    31     mVisual(new HsWidgetHostVisual),
       
    32     mStateMachine(0),
       
    33     mWidget(0),
       
    34     mPage(0),
       
    35     mComponent(0),
       
    36     mIsFinishing(false)
       
    37 {
       
    38 }
       
    39 
       
    40 HsWidgetHost::~HsWidgetHost()
       
    41 {
       
    42 }
       
    43 
       
    44 HsWidgetHost *HsWidgetHost::createInstance(HsWidgetData &widgetData,
       
    45                                            const QVariantHash &preferences)
       
    46 {
       
    47     Q_UNUSED(widgetData);
       
    48     Q_UNUSED(preferences);
       
    49     return 0;
       
    50 }
       
    51 
       
    52 int HsWidgetHost::databaseId() const
       
    53 {
       
    54     return mDatabaseId;
       
    55 }
       
    56 
       
    57 bool HsWidgetHost::setPage(HsPage *page)
       
    58 {
       
    59     mPage = page;
       
    60     return true;
       
    61 }
       
    62 
       
    63 HsPage *HsWidgetHost::page() const
       
    64 {
       
    65     return mPage;
       
    66 }
       
    67 
       
    68 bool HsWidgetHost::loadPresentation()
       
    69 {
       
    70     return true;
       
    71 }
       
    72 
       
    73 bool HsWidgetHost::loadPresentation(Qt::Orientation orientation)
       
    74 {
       
    75     Q_UNUSED(orientation);
       
    76     return true;
       
    77 }
       
    78 
       
    79 bool HsWidgetHost::savePresentation()
       
    80 {
       
    81     return true;
       
    82 }
       
    83 
       
    84 bool HsWidgetHost::savePresentation(Qt::Orientation orientation)
       
    85 {
       
    86     Q_UNUSED(orientation);
       
    87     return true;
       
    88 }
       
    89 
       
    90 bool HsWidgetHost::savePresentation(HsWidgetPresentationData &presentation)
       
    91 {
       
    92     Q_UNUSED(presentation);
       
    93     return true;
       
    94 }
       
    95 
       
    96 bool HsWidgetHost::getPresentation(HsWidgetPresentationData &presentation)
       
    97 {
       
    98     Q_UNUSED(presentation);
       
    99     return true;
       
   100 }
       
   101 
       
   102 bool HsWidgetHost::removePresentation(Qt::Orientation orientation)
       
   103 {
       
   104     Q_UNUSED(orientation);
       
   105     return true;
       
   106 }
       
   107 
       
   108 void HsWidgetHost::startWidget(bool show)
       
   109 {
       
   110     if (show) {
       
   111         emit event_startAndShow();
       
   112     } else {
       
   113         emit event_startAndHide();
       
   114     }
       
   115 }
       
   116 
       
   117 void HsWidgetHost::showWidget()
       
   118 {
       
   119     emit event_show();
       
   120 }
       
   121 
       
   122 void HsWidgetHost::hideWidget()
       
   123 {
       
   124     emit event_hide();
       
   125 }
       
   126 
       
   127 void HsWidgetHost::setOnline(bool online)
       
   128 {
       
   129     Q_UNUSED(online);
       
   130 }
       
   131 
       
   132 void HsWidgetHost::remove()
       
   133 {
       
   134 }
       
   135 
       
   136 void HsWidgetHost::close()
       
   137 {
       
   138 }
       
   139 
       
   140 void HsWidgetHost::startDragEffect()
       
   141 {
       
   142 }
       
   143 
       
   144 void HsWidgetHost::startDropEffect()
       
   145 {
       
   146 }
       
   147 
       
   148 void HsWidgetHost::setupStates()
       
   149 {
       
   150 }
       
   151 
       
   152 bool HsWidgetHost::setProperty(const char *name, QMetaProperty &property)
       
   153 {
       
   154     Q_UNUSED(name);
       
   155     Q_UNUSED(property);
       
   156     return true;
       
   157 }
       
   158 
       
   159 bool HsWidgetHost::setMethod(const char *signature, QMetaMethod &method)
       
   160 {
       
   161     Q_UNUSED(signature);
       
   162     Q_UNUSED(method);
       
   163     return true;
       
   164 }
       
   165 
       
   166 bool HsWidgetHost::hasSignal(const char *signature)
       
   167 {
       
   168     Q_UNUSED(signature);
       
   169     return true;
       
   170 }
       
   171 
       
   172 bool HsWidgetHost::setPreferencesToWidget()
       
   173 {
       
   174     return true;
       
   175 }
       
   176 
       
   177 void HsWidgetHost::action_connectComponent()
       
   178 {
       
   179 }
       
   180 
       
   181 void HsWidgetHost::action_disconnectComponent()
       
   182 {
       
   183 }
       
   184 
       
   185 void HsWidgetHost::action_load()
       
   186 {
       
   187 }
       
   188 
       
   189 void HsWidgetHost::action_unload()
       
   190 {
       
   191 }
       
   192 
       
   193 void HsWidgetHost::action_initialize()
       
   194 {
       
   195 }
       
   196 
       
   197 void HsWidgetHost::action_uninitialize()
       
   198 {
       
   199 }
       
   200 
       
   201 void HsWidgetHost::action_show()
       
   202 {
       
   203 }
       
   204 
       
   205 void HsWidgetHost::action_hide()
       
   206 {
       
   207 }
       
   208 
       
   209 void HsWidgetHost::action_finished()
       
   210 {
       
   211     emit finished();
       
   212 }
       
   213 
       
   214 void HsWidgetHost::action_faulted()
       
   215 {
       
   216     emit faulted();
       
   217 }
       
   218 
       
   219 void HsWidgetHost::action_remove()
       
   220 {
       
   221 }
       
   222 
       
   223 void HsWidgetHost::action_notifyRemove()
       
   224 {
       
   225 }
       
   226 
       
   227 void HsWidgetHost::onFinished()
       
   228 {
       
   229     mIsFinishing = true;
       
   230     emit event_finished();
       
   231 }
       
   232 
       
   233 void HsWidgetHost::onError()
       
   234 {
       
   235     mIsFinishing = true;
       
   236     emit event_faulted();
       
   237 }
       
   238 
       
   239 void HsWidgetHost::onSetPreferences(const QStringList &names)
       
   240 {
       
   241     Q_UNUSED(names);
       
   242 }
       
   243 
       
   244 HsWidgetHostVisual *HsWidgetHost::visual() const
       
   245 {
       
   246     return mVisual;
       
   247 }