emailuis/nmailui/inc/nmmessagesearchlistview.h
changeset 72 64e38f08e49c
parent 30 759dc5235cdb
child 68 83cc6bae1de8
equal deleted inserted replaced
65:478bc57ad291 72:64e38f08e49c
    16 */
    16 */
    17 
    17 
    18 #ifndef NMMESSAGESEARCHLISTVIEW_H_
    18 #ifndef NMMESSAGESEARCHLISTVIEW_H_
    19 #define NMMESSAGESEARCHLISTVIEW_H_
    19 #define NMMESSAGESEARCHLISTVIEW_H_
    20 
    20 
       
    21 #include <QModelIndex>
       
    22 #include <nmactionobserver.h>
    21 #include "nmbaseview.h"
    23 #include "nmbaseview.h"
    22 #include <nmactionobserver.h>
    24 
    23 #include <QModelIndex>
       
    24 
    25 
    25 class HbAbstractViewItem;
    26 class HbAbstractViewItem;
    26 class HbDocumentLoader;
    27 class HbDocumentLoader;
    27 class HbGroupBox;
    28 class HbGroupBox;
    28 class HbLabel;
    29 class HbLabel;
    29 class HbLineEdit;
    30 class HbLineEdit;
    30 class HbMenu;
    31 class HbMenu;
    31 class HbPushButton;
    32 class HbPushButton;
    32 class HbTreeView;
    33 class HbTreeView;
       
    34 class HbSearchPanel;
       
    35 class HbIcon;
       
    36 class HbShrinkingVkbHost;
    33 
    37 
    34 class NmActionResponse;
    38 class NmActionResponse;
    35 class NmApplication;
    39 class NmApplication;
    36 class NmMessageListModel;
    40 class NmMessageListModel;
    37 class NmMessageListModelItem;
    41 class NmMessageListModelItem;
    55 
    59 
    56 
    60 
    57 public: // From NmBaseView
    61 public: // From NmBaseView
    58 
    62 
    59     NmUiViewId nmailViewId() const;
    63     NmUiViewId nmailViewId() const;
       
    64     void aboutToExitView();
    60     void viewReady();
    65     void viewReady();
    61 
       
    62 
    66 
    63 public: // From NmActionObserver
    67 public: // From NmActionObserver
    64 
    68 
    65     void handleActionCommand(NmActionResponse &menuResponse);
    69     void handleActionCommand(NmActionResponse &menuResponse);
    66 
    70 
    67 
    71 
    68 private: // Data types
    72 private: // Data types
    69 
    73 
    70     enum NmSearchInputMode {
    74     enum NmSearchInputMode {
    71         NmNormalMode = 0,
    75         NmNormalMode = 0,
    72         NmHighlightedMode,
       
    73         NmDimmedMode
    76         NmDimmedMode
    74     };
    77     };
    75 
       
    76 
    78 
    77 private:
    79 private:
    78 
    80 
    79     void loadViewLayout();
    81     void loadViewLayout();
    80     void initTreeView();
    82     void initTreeView();
    81     void setViewTitle();
    83     void setViewTitle();
    82     void noMessagesLabelVisibility(bool visible);
    84     void noMessagesLabelVisibility(bool visible);
    83     void updateSearchResultCountInfo();
    85     void updateResultView();
    84     void setSearchInputMode(NmSearchInputMode mode);
    86     void setSearchInputMode(NmSearchInputMode mode);
    85 
       
    86 
    87 
    87 public slots:
    88 public slots:
    88 
    89 
    89     void reloadViewContents(NmUiStartParam *startParam);
    90     void reloadViewContents(NmUiStartParam *startParam);
    90 
    91 
    91 
    92 
    92 private slots:
    93 private slots:
    93 
    94 
    94     void criteriaChanged(QString text);
       
    95     void showItemContextMenu(HbAbstractViewItem *index, const QPointF &coords);
    95     void showItemContextMenu(HbAbstractViewItem *index, const QPointF &coords);
    96     void itemActivated(const QModelIndex &index);
    96     void itemActivated(const QModelIndex &index);
    97     void handleSelection();
    97     void handleSelection();
    98     void itemsAdded(const QModelIndex &parent, int start, int end);
    98     void itemsAdded(const QModelIndex &parent, int start, int end);
    99     void itemsRemoved();
    99     void itemsRemoved();
   100     void refreshList();
   100     void refreshList();
   101     void toggleSearch();
   101     void toggleSearch();
   102     void handleSearchComplete();
   102     void handleSearchComplete();
   103 
   103     void textChanged(const QString &text);
       
   104     void exitClicked();
       
   105     void orientationAboutToChange();
       
   106     void orientationChanged();
       
   107     void sendSoftwareInputPanelRequest(QEvent::Type eventType = QEvent::RequestSoftwareInputPanel);
       
   108     void vkbOpened();
       
   109     void vkbClosed();
   104 
   110 
   105 private: // Data
   111 private: // Data
   106 
   112 
   107     NmApplication &mApplication;
   113     NmApplication &mApplication;
   108     NmUiEngine &mUiEngine;
   114     NmUiEngine &mUiEngine;
   109     NmMessageListModel &mMsgListModel;
   115     NmMessageListModel &mMsgListModel;
   110     HbDocumentLoader *mDocumentLoader; // Owned
   116     HbDocumentLoader *mDocumentLoader;          // Owned
   111     QObjectList mWidgetList;
   117     QObjectList mWidgetList;
   112     HbMenu *mItemContextMenu; // Owned
   118     HbMenu *mItemContextMenu;                   // Owned
   113     HbTreeView *mMessageListWidget; // Not owned
   119     HbTreeView *mMessageList;                   // Not owned
   114     HbGroupBox *mInfoLabel; // Not owned
   120     HbLabel *mNoMessagesLabel;                  // Not owned
   115     HbLabel *mNoMessagesLabel; // Not owned
   121     HbSearchPanel *mSearchPanel;                // Not owned
   116     HbLineEdit *mLineEdit; // Not owned
   122     NmMessageListModelItem *mLongPressedItem;   // Not owned
   117     HbPushButton *mPushButton; // Not owned
   123     HbPushButton *mProgressButton;              // Not owned
   118     NmMessageListModelItem *mLongPressedItem; // Not owned
   124     HbLineEdit *mLineEdit;                      // Not owned
   119 	QModelIndex mActivatedIndex;
   125 	QModelIndex mActivatedIndex;
   120     bool mViewReady;
   126     bool mViewReady;
   121     bool mSearchInProgress;
   127     bool mSearchInProgress;
       
   128     HbIcon *mSpinnerIcon;                       // Owned
       
   129     bool mAnimationAddedToManger;
       
   130     bool mSelectTextAfterOrientationChange;
       
   131     HbShrinkingVkbHost *mVkbHost;               // Owned
   122 };
   132 };
   123 
   133 
   124 
   134 
   125 #endif /* NMMESSAGESEARCHLISTVIEW_H_ */
   135 #endif /* NMMESSAGESEARCHLISTVIEW_H_ */
   126 
   136