diff -r 000000000000 -r 4a5361db8937 logsui/logsapp/inc/logsviewmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/logsui/logsapp/inc/logsviewmanager.h Tue May 04 12:39:37 2010 +0300 @@ -0,0 +1,92 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +#ifndef LOGVIEWMANAGER_H +#define LOGVIEWMANAGER_H + + +#include +#include +#include +#include +#include "logsabstractviewmanager.h" + +class HbMainWindow; +class LogsComponentRepository; +class LogsServiceHandler; +class LogsMainWindow; +class HbView; +class LogsBaseView; + +/** + * + */ +class LogsViewManager : public QObject, public LogsAbstractViewManager +{ + Q_OBJECT + + friend class UT_LogsViewManager; + friend class UT_LogsServiceHandler; + +public: + + /** + * Constructor + * @param mainWindow + * @param service + */ + LogsViewManager( LogsMainWindow& mainWindow, LogsServiceHandler& service ); + ~LogsViewManager(); + +public slots: + + void changeRecentView(LogsServices::LogsView view, bool showDialpad); + void changeMatchesView(QString dialpadText); + void appFocusGained(); + void appFocusLost(); + +public: // From LogsAbstractViewManager + + virtual bool activateView(LogsAppViewId viewId); + virtual bool activateView(LogsAppViewId viewId, bool showDialpad, QVariant args); + virtual bool activatePreviousView(); + virtual HbMainWindow& mainWindow(); + virtual void exitApplication(); + +private slots: + + void proceedExit(); + void handleOrientationChanged(); + void completeViewActivation(); + +private: + + void initViews(); + bool doActivateView(LogsAppViewId viewId, bool showDialpad, QVariant args); + +private: //data + + LogsMainWindow& mMainWindow; + LogsServiceHandler& mService; + LogsComponentRepository* mComponentsRepository; + QList mViewStack; + bool mFirstActivation; + QVariant mViewActivationArgs; + bool mViewActivationShowDialpad; + +}; + +#endif //LOGVIEWMANAGER_H