|
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 NotesNoteView class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef NOTESNOTEVIEW_H |
|
20 #define NOTESNOTEVIEW_H |
|
21 |
|
22 // System includes |
|
23 #include <QObject> |
|
24 #include <HbView> |
|
25 |
|
26 // User includes |
|
27 #include "notesviewsdefines.h" |
|
28 #include "notesappcontrollerif.h" |
|
29 |
|
30 // Forward declarations |
|
31 class QGraphicsWidget; |
|
32 class HbListView; |
|
33 class HbAction; |
|
34 class HbAbstractViewItem; |
|
35 class HbLabel; |
|
36 class NotesModel; |
|
37 class NotesDocLoader; |
|
38 class AgendaUtil; |
|
39 class NotesSortFilterProxyModel; |
|
40 class NotesEditor; |
|
41 |
|
42 class NotesNoteView : public HbView |
|
43 { |
|
44 Q_OBJECT |
|
45 |
|
46 public: |
|
47 NOTESVIEWS_EXPORT NotesNoteView(QGraphicsWidget *parent = 0); |
|
48 NOTESVIEWS_EXPORT virtual ~NotesNoteView(); |
|
49 |
|
50 public: |
|
51 NOTESVIEWS_EXPORT void setupView( |
|
52 NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader); |
|
53 NOTESVIEWS_EXPORT void updateNoteView(); |
|
54 |
|
55 |
|
56 signals: |
|
57 void deleteEntry(ulong entryId); |
|
58 |
|
59 private slots: |
|
60 void createNewNote(); |
|
61 void handleItemReleased(const QModelIndex &index); |
|
62 void handleItemLongPressed( |
|
63 HbAbstractViewItem *item, const QPointF &coords); |
|
64 void deleteNote(); |
|
65 void markNoteAsFavourite(); |
|
66 void markNoteAsTodo(); |
|
67 void handleEditingCompleted(bool status); |
|
68 void displayCollectionView(); |
|
69 void displayAllNotesView(); |
|
70 void handleActionStateChanged(); |
|
71 void handleOrientationChanged(Qt::Orientation); |
|
72 void openNote(); |
|
73 void selectedMenuAction(HbAction *action); |
|
74 void handleMenuClosed(); |
|
75 void updateView(ulong id=0); |
|
76 |
|
77 private: |
|
78 HbListView *mListView; |
|
79 HbAbstractViewItem *mSelectedItem; |
|
80 |
|
81 HbAction *mAllNotesAction; |
|
82 HbAction *mViewCollectionAction; |
|
83 HbAction *mAddNoteAction; |
|
84 HbAction *mEditAction; |
|
85 HbAction *mDeleteAction; |
|
86 HbAction *mMakeFavouriteAction; |
|
87 HbAction *mMarkTodoAction; |
|
88 HbAction *mOpenAction; |
|
89 |
|
90 HbLabel *mEmptyListLabel; |
|
91 |
|
92 AgendaUtil *mAgendaUtil; |
|
93 |
|
94 NotesAppControllerIf *mAppControllerIf; |
|
95 NotesDocLoader *mDocLoader; |
|
96 NotesModel *mNotesModel; |
|
97 NotesSortFilterProxyModel *mProxyModel; |
|
98 NotesEditor *mNotesEditor; |
|
99 bool mIsLongTop; |
|
100 }; |
|
101 |
|
102 #endif // NOTESNOTEVIEW_H |
|
103 |
|
104 // End of file --Don't remove this. |