logsui/logsapp/inc/logsmatchesview.h
changeset 0 4a5361db8937
child 2 7119b73b84d6
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 LOGSMATCHESVIEW_H
       
    18 #define LOGSMATCHESVIEW_H
       
    19 
       
    20 #include "logsbaseview.h"
       
    21 #include "logscall.h"
       
    22 
       
    23 class HbListView;
       
    24 class HbAction;
       
    25 class HbPushButton;
       
    26 class LogsComponentRepository;
       
    27 class LogsAbstractViewManager;
       
    28 class LogsMatchesModel;
       
    29 
       
    30 /**
       
    31  * 
       
    32  */
       
    33 class LogsMatchesView : public LogsBaseView
       
    34 {
       
    35     Q_OBJECT
       
    36     friend class UT_LogsMatchesView;
       
    37     
       
    38 public:
       
    39     explicit LogsMatchesView( LogsComponentRepository& repository,
       
    40                               LogsAbstractViewManager& viewManager );
       
    41     ~LogsMatchesView();
       
    42 
       
    43 public: // From LogsBaseView
       
    44     
       
    45     virtual void activated(bool showDialer, QVariant args);
       
    46     virtual void deactivated();
       
    47  
       
    48 public slots:
       
    49     
       
    50     void callKeyPressed();
       
    51     void saveNumberInDialpadToContacts();
       
    52     void videoCallToCurrentNum();
       
    53     void sendMessageToCurrentNum();
       
    54     
       
    55 protected slots: //from LogsBaseView
       
    56 
       
    57     virtual void handleBackSoftkey();
       
    58     virtual void dialpadEditorTextChanged();
       
    59     virtual void dialpadOpened();
       
    60     virtual void dialpadClosed();
       
    61     virtual void updateWidgetsSizeAndLayout();
       
    62     virtual void updateEmptyListWidgetsVisibility();
       
    63 
       
    64 private: //from LogsBaseView
       
    65     
       
    66     virtual void initView();
       
    67     virtual QAbstractItemModel* model() const;
       
    68     
       
    69 private:
       
    70     
       
    71     void initListWidget();
       
    72     void updateModel(LogsMatchesModel* model);
       
    73     void updateMenu();
       
    74     void callToCurrentNum( LogsCall::CallType callType );
       
    75     void updateAddContactButton();
       
    76     
       
    77 private:
       
    78     
       
    79     HbListView* mListView;    //not owned
       
    80     LogsMatchesModel* mModel; //owned
       
    81     HbPushButton* mAddToContactsButton; // not owned
       
    82 };
       
    83 
       
    84 #endif // LOGSMATCHESVIEW_H