72
|
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 CNTDEFAULTVIEWMANAGER_H_
|
|
18 |
#define CNTDEFAULTVIEWMANAGER_H_
|
|
19 |
|
|
20 |
#include <cntabstractviewmanager.h>
|
|
21 |
#include <hbnamespace.h>
|
|
22 |
#include "cntglobal.h"
|
|
23 |
|
|
24 |
class HbMainWindow;
|
|
25 |
class CntAbstractViewFactory;
|
|
26 |
class CntAbstractView;
|
|
27 |
class CntViewNavigator;
|
|
28 |
class CntSimUtility;
|
|
29 |
class CntAbstractEngine;
|
|
30 |
|
|
31 |
QTM_BEGIN_NAMESPACE
|
|
32 |
class QContactManager;
|
|
33 |
QTM_END_NAMESPACE
|
|
34 |
|
|
35 |
QTM_USE_NAMESPACE
|
|
36 |
|
|
37 |
class QTPBK_EXPORT CntDefaultViewManager : public QObject, public CntAbstractViewManager
|
|
38 |
{
|
|
39 |
Q_OBJECT
|
|
40 |
|
|
41 |
public:
|
|
42 |
CntDefaultViewManager( HbMainWindow* aWindow );
|
|
43 |
~CntDefaultViewManager();
|
|
44 |
|
|
45 |
// ownership transferred
|
|
46 |
void setViewFactory( CntAbstractViewFactory* aFactory );
|
|
47 |
void setViewNavigator( CntViewNavigator* aNavigator );
|
|
48 |
|
|
49 |
CntAbstractEngine& engine();
|
|
50 |
|
|
51 |
public: // From CntAbstractViewManager
|
|
52 |
void changeView( const CntViewParameters aArgs );
|
|
53 |
void back( const CntViewParameters aArgs, bool toRoot = false );
|
|
54 |
|
|
55 |
public:
|
81
|
56 |
bool internalize(QDataStream &stream);
|
|
57 |
QString externalize(QDataStream &stream) const;
|
|
58 |
|
|
59 |
private:
|
|
60 |
void activateView(CntAbstractView* nextView, const CntViewParameters args, QFlags<Hb::ViewSwitchFlag> flags);
|
72
|
61 |
|
|
62 |
private slots:
|
|
63 |
void removeCurrentView();
|
|
64 |
void deleteOldView();
|
|
65 |
void switchView( const CntViewParameters aArgs, QFlags<Hb::ViewSwitchFlag> flags );
|
|
66 |
|
|
67 |
protected slots:
|
|
68 |
virtual void closeApp();
|
|
69 |
|
|
70 |
private:
|
|
71 |
void cleanup();
|
|
72 |
|
|
73 |
private:
|
|
74 |
CntAbstractViewFactory* mFactory;
|
|
75 |
CntAbstractView* mCurrent;
|
|
76 |
CntAbstractView* mOldView;
|
|
77 |
QMap<int, CntAbstractView*> mDefaults;
|
|
78 |
CntViewNavigator* mNavigator;
|
|
79 |
CntViewParameters mArgs;
|
|
80 |
|
|
81 |
QList<QContactManager*> mBackends;
|
|
82 |
HbMainWindow* mMainWindow;
|
|
83 |
|
|
84 |
CntSimUtility* mSimUtility;
|
|
85 |
CntAbstractEngine* mEngine;
|
|
86 |
friend class T_CntDefaultViewManager;
|
|
87 |
};
|
|
88 |
#endif /* CNTDEFAULTVIEWMANAGER_H_ */
|