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 |
|
|
18 |
#ifndef CNTHISTORYVIEW_H
|
|
19 |
#define CNTHISTORYVIEW_H
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
#include <cntabstractview.h>
|
|
23 |
#include <qcontactid.h>
|
|
24 |
|
|
25 |
class HbListView;
|
|
26 |
class CntHistoryModel;
|
|
27 |
class HbView;
|
|
28 |
class QModelIndex;
|
|
29 |
class HbAction;
|
|
30 |
class HbDocumentLoader;
|
|
31 |
class XQAiwRequest;
|
|
32 |
class HbAbstractViewItem;
|
|
33 |
|
|
34 |
QTM_BEGIN_NAMESPACE
|
|
35 |
class QContact;
|
|
36 |
QTM_END_NAMESPACE
|
|
37 |
|
|
38 |
QTM_USE_NAMESPACE
|
|
39 |
|
|
40 |
class CntHistoryView : public QObject, public CntAbstractView
|
|
41 |
{
|
|
42 |
Q_OBJECT
|
|
43 |
|
|
44 |
public: // From CntAbstractView
|
|
45 |
CntHistoryView();
|
|
46 |
~CntHistoryView();
|
|
47 |
void activate( const CntViewParameters aArgs );
|
|
48 |
void deactivate();
|
|
49 |
bool isDefault() const{ return false; }
|
|
50 |
HbView* view() const { return mView; }
|
|
51 |
int viewId() const { return historyView; }
|
|
52 |
inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
|
|
53 |
|
|
54 |
public slots:
|
|
55 |
void updateScrollingPosition();
|
|
56 |
void clearHistory();
|
|
57 |
void handleClearHistory(int action);
|
|
58 |
void itemActivated(const QModelIndex &index);
|
|
59 |
void showPreviousView();
|
|
60 |
void showClearHistoryMenu();
|
|
61 |
void showRootView();
|
|
62 |
void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds);
|
|
63 |
void onLongPressed (HbAbstractViewItem *item, const QPointF &coords);
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
private:
|
|
68 |
HbDocumentLoader* docLoader();
|
|
69 |
|
|
70 |
#ifdef PBK_UNIT_TEST
|
|
71 |
public:
|
|
72 |
#else
|
|
73 |
private:
|
|
74 |
#endif
|
|
75 |
HbListView* mHistoryListView; // not own
|
|
76 |
CntHistoryModel* mHistoryModel; // own
|
|
77 |
HbView* mView; // not own
|
|
78 |
HbDocumentLoader* mDocumentLoader; // own
|
|
79 |
CntAbstractViewManager* mViewMgr; // not own
|
|
80 |
HbAction* mBackKey; // not own
|
|
81 |
QContact* mContact; // own
|
|
82 |
HbAction* mClearHistory; // not own
|
|
83 |
CntViewParameters mArgs;
|
|
84 |
XQAiwRequest* mRequest;
|
|
85 |
CntAbstractEngine* mEngine;
|
|
86 |
};
|
|
87 |
|
|
88 |
#endif // CNTHISTORYVIEW_H
|
|
89 |
|
|
90 |
// EOF
|