|
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 * Header file for NotesMainView class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef NOTESMAINVIEW_H |
|
20 #define NOTESMAINVIEW_H |
|
21 |
|
22 // System includes |
|
23 #include <HbView> |
|
24 |
|
25 // User includes |
|
26 #include "notesviewsdefines.h" |
|
27 #include "notesappcontrollerif.h" |
|
28 |
|
29 // Forward declarations |
|
30 class QGraphicsWidget; |
|
31 class HbListView; |
|
32 class HbTextEdit; |
|
33 class HbAction; |
|
34 class HbAbstractViewItem; |
|
35 class HbDialog; |
|
36 class HbLabel; |
|
37 class HbGroupBox; |
|
38 class NotesModel; |
|
39 class NotesDocLoader; |
|
40 class AgendaUtil; |
|
41 class NotesSortFilterProxyModel; |
|
42 class NotesEditor; |
|
43 class AgendaEventViewer; |
|
44 |
|
45 class NotesMainView : public HbView |
|
46 { |
|
47 Q_OBJECT |
|
48 |
|
49 public: |
|
50 NOTESVIEWS_EXPORT NotesMainView(QGraphicsWidget *parent = 0); |
|
51 NOTESVIEWS_EXPORT virtual ~NotesMainView(); |
|
52 |
|
53 public: |
|
54 NOTESVIEWS_EXPORT void setupView( |
|
55 NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader); |
|
56 NOTESVIEWS_EXPORT void setupAfterViewReady(); |
|
57 NOTESVIEWS_EXPORT void updateTitle(); |
|
58 NOTESVIEWS_EXPORT void captureScreenShot(bool captureScreenShot = false); |
|
59 |
|
60 signals: |
|
61 void deleteEntry(ulong entryId); |
|
62 |
|
63 private slots: |
|
64 void createNewNote(); |
|
65 void handleItemReleased(const QModelIndex &index); |
|
66 void handleItemLongPressed( |
|
67 HbAbstractViewItem *item, const QPointF &coords); |
|
68 void deleteNote(); |
|
69 void markTodoStatus(); |
|
70 void markNoteAsFavourite(); |
|
71 void handleEditingCompleted(bool status); |
|
72 void displayCollectionView(); |
|
73 void scrollTo(QModelIndex index); |
|
74 void handleViewingCompleted(); |
|
75 void handleActionStateChanged(); |
|
76 void editTodo(); |
|
77 void handleOrientationChanged(Qt::Orientation); |
|
78 void updateSubTitle(ulong id=0); |
|
79 void markNoteAsTodo(); |
|
80 void openNote(); |
|
81 void selectedMenuAction(HbAction *action); |
|
82 void handleMenuClosed(); |
|
83 void saveActivity(); |
|
84 |
|
85 private: |
|
86 HbListView *mListView; |
|
87 HbAbstractViewItem *mSelectedItem; |
|
88 HbLabel* mViewHeading; |
|
89 |
|
90 HbDialog *mFilterPopup; |
|
91 |
|
92 HbAction *mAddNoteAction; |
|
93 HbAction *mDeleteAction; |
|
94 HbAction *mAllNotesAction; |
|
95 HbAction *mViewCollectionAction; |
|
96 HbAction *mMakeFavouriteAction; |
|
97 HbAction *mTodoStatusAction; |
|
98 HbAction *mEditTodoAction; |
|
99 HbAction *mMarkTodoAction; |
|
100 HbAction *mOpenAction; |
|
101 |
|
102 HbGroupBox *mSubTitle; |
|
103 HbLabel *mEmptyListLabel; |
|
104 |
|
105 AgendaUtil *mAgendaUtil; |
|
106 |
|
107 NotesAppControllerIf *mAppControllerIf; |
|
108 NotesDocLoader *mDocLoader; |
|
109 NotesModel *mNotesModel; |
|
110 NotesSortFilterProxyModel *mProxyModel; |
|
111 NotesEditor *mNotesEditor; |
|
112 AgendaEventViewer *mAgendaEventViewer; |
|
113 bool mIsLongTop; |
|
114 bool mIsScreenShotCapruted; // check if the screenshot captured is valid |
|
115 QVariantHash mScreenShot; // screenshot |
|
116 }; |
|
117 |
|
118 #endif // NOTESMAINVIEW_H |
|
119 |
|
120 // End of file --Don't remove this. |