phonebookui/cntcommonui/views/cnthistoryview.h
changeset 81 640d30f4fb64
parent 72 6abfb1094884
equal deleted inserted replaced
77:c18f9fa7f42e 81:640d30f4fb64
    18 #ifndef CNTHISTORYVIEW_H
    18 #ifndef CNTHISTORYVIEW_H
    19 #define CNTHISTORYVIEW_H
    19 #define CNTHISTORYVIEW_H
    20 
    20 
    21 #include <QObject>
    21 #include <QObject>
    22 #include <cntabstractview.h>
    22 #include <cntabstractview.h>
    23 #include <qcontactid.h>
    23 #include <qtcontacts.h>
    24 
    24 
    25 class HbListView;
    25 class HbListView;
    26 class CntHistoryModel;
       
    27 class HbView;
    26 class HbView;
    28 class QModelIndex;
       
    29 class HbAction;
    27 class HbAction;
    30 class HbDocumentLoader;
    28 class HbDocumentLoader;
       
    29 class HbAbstractViewItem;
    31 class XQAiwRequest;
    30 class XQAiwRequest;
    32 class HbAbstractViewItem;
    31 class QModelIndex;
       
    32 class CntHistoryModel;
       
    33 
    33 
    34 
    34 QTM_BEGIN_NAMESPACE
    35 QTM_BEGIN_NAMESPACE
    35 class QContact;
    36 class QContact;
    36 QTM_END_NAMESPACE
    37 QTM_END_NAMESPACE
    37 
    38 
    38 QTM_USE_NAMESPACE
    39 QTM_USE_NAMESPACE
    39 
    40 
    40 class CntHistoryView : public QObject, public CntAbstractView
    41 class CntHistoryView : public QObject, public CntAbstractView
    41 {
    42 {
    42     Q_OBJECT
    43     Q_OBJECT
       
    44     friend class TestCntHistoryView;
    43     
    45     
    44 public: // From CntAbstractView
    46 public: // From CntAbstractView
    45     CntHistoryView();
    47     CntHistoryView();
    46     ~CntHistoryView();
    48     ~CntHistoryView();
    47     void activate( const CntViewParameters aArgs );
    49     void activate( const CntViewParameters aArgs );
    55     void updateScrollingPosition();
    57     void updateScrollingPosition();
    56     void clearHistory();
    58     void clearHistory();
    57     void handleClearHistory(int action);
    59     void handleClearHistory(int action);
    58     void itemActivated(const QModelIndex &index);
    60     void itemActivated(const QModelIndex &index);
    59     void showPreviousView();
    61     void showPreviousView();
       
    62     void showRootView();
    60     void showClearHistoryMenu();
    63     void showClearHistoryMenu();
    61     void showRootView();
       
    62     void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds);
    64     void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds);
    63     void onLongPressed (HbAbstractViewItem *item, const QPointF &coords);
       
    64     
       
    65     
       
    66     
    65     
    67 private:
    66 private:
    68     HbDocumentLoader* docLoader();
    67     HbDocumentLoader* docLoader();
    69     
    68     
    70 #ifdef PBK_UNIT_TEST
    69 private:   
    71 public:
    70     HbListView              *mHistoryListView; // not own
    72 #else
    71     CntHistoryModel         *mHistoryModel; // own
    73 private:
    72     HbView                  *mView; // not own
    74 #endif    
    73     HbDocumentLoader        *mDocumentLoader; // own
    75     HbListView*                 mHistoryListView; // not own
    74     CntAbstractViewManager  *mViewMgr; // not own
    76     CntHistoryModel*            mHistoryModel; // own
    75     HbAction                *mBackKey; // not own
    77     HbView*                     mView; // not own
    76     QContact                *mContact; // own
    78     HbDocumentLoader*           mDocumentLoader; // own
    77     HbAction                *mClearHistory;  // not own
    79     CntAbstractViewManager*     mViewMgr; // not own
    78     CntViewParameters        mArgs;
    80     HbAction*                   mBackKey; // not own
    79     XQAiwRequest            *mRequest;    
    81     QContact*                   mContact; // own
    80     CntAbstractEngine       *mEngine;
    82     HbAction*                   mClearHistory;  // not own
       
    83     CntViewParameters           mArgs;
       
    84     XQAiwRequest*               mRequest;    
       
    85     CntAbstractEngine*          mEngine;
       
    86 };
    81 };
    87 
    82 
    88 #endif // CNTHISTORYVIEW_H
    83 #endif // CNTHISTORYVIEW_H
    89 
    84 
    90 // EOF
    85 // EOF