logsui/logsapp/tsrc/ut_logsapp/inc/logsviewmanagerstub.h
changeset 0 4a5361db8937
child 15 76d2cf7a585e
equal deleted inserted replaced
-1:000000000000 0:4a5361db8937
       
     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 #ifndef LOGSVIEWMANAGERSTUB_H
       
    18 #define LOGSVIEWMANAGERSTUB_H
       
    19 
       
    20 #include <QVariant>
       
    21 #include <hbmainwindow.h>
       
    22 #include "logsdefs.h"
       
    23 #include "logsabstractviewmanager.h"
       
    24 
       
    25 
       
    26 class LogsViewManagerStub : public LogsAbstractViewManager
       
    27 {
       
    28 public: 
       
    29     LogsViewManagerStub(HbMainWindow& window) : mMainWindow(window), 
       
    30         mViewId( LogsUnknownViewId ), mShowDialer(false), 
       
    31         mArgs(QVariant()), mPreviousActivated(false), mExitCalled(false)
       
    32     {
       
    33     }
       
    34     
       
    35     virtual ~LogsViewManagerStub()
       
    36     {
       
    37     }
       
    38     
       
    39     void reset()
       
    40     {
       
    41         mViewId = LogsUnknownViewId;
       
    42         mShowDialer = false; 
       
    43         mArgs = QVariant();
       
    44         mPreviousActivated = false;
       
    45         mExitCalled = false;
       
    46     }
       
    47 
       
    48 public: // From LogsAbstractViewManager
       
    49     
       
    50     virtual bool activateView(LogsAppViewId viewId)
       
    51     {
       
    52         mViewId = viewId;
       
    53         return true;
       
    54     }
       
    55     virtual bool activateView(LogsAppViewId viewId, bool showDialer, QVariant args)
       
    56     {
       
    57         mViewId = viewId;
       
    58         mShowDialer = showDialer;
       
    59         mArgs = args;
       
    60         return true;
       
    61     }
       
    62     virtual bool activatePreviousView()
       
    63     {
       
    64         mPreviousActivated = true;
       
    65         return true;
       
    66     }
       
    67     
       
    68     virtual HbMainWindow& mainWindow()
       
    69     {
       
    70         return mMainWindow;
       
    71     }
       
    72     
       
    73     virtual void exitApplication()
       
    74     {
       
    75         mExitCalled = true;
       
    76     }
       
    77     
       
    78 public:   
       
    79     
       
    80      LogsAppViewId mViewId;
       
    81      bool mShowDialer; 
       
    82      QVariant mArgs;
       
    83      bool mPreviousActivated;
       
    84      HbMainWindow& mMainWindow;
       
    85      bool mExitCalled;
       
    86 
       
    87 };
       
    88 
       
    89 #endif //LOGSVIEWMANAGERSTUB_H