|
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 NotesFavoriteView class. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef NOTESFAVORITEVIEW_H |
|
20 #define NOTESFAVORITEVIEW_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 NotesFavoriteView : public HbView |
|
43 { |
|
44 Q_OBJECT |
|
45 |
|
46 public: |
|
47 NOTESVIEWS_EXPORT NotesFavoriteView(QGraphicsWidget *parent = 0); |
|
48 NOTESVIEWS_EXPORT virtual ~NotesFavoriteView(); |
|
49 |
|
50 public: |
|
51 NOTESVIEWS_EXPORT void setupView( |
|
52 NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader); |
|
53 NOTESVIEWS_EXPORT void updateFavoriteView(); |
|
54 |
|
55 signals: |
|
56 void deleteEntry(ulong entryId); |
|
57 |
|
58 private slots: |
|
59 void createNewNote(); |
|
60 void handleItemReleased(const QModelIndex &index); |
|
61 void handleItemLongPressed( |
|
62 HbAbstractViewItem *item, const QPointF &coords); |
|
63 void deleteNote(); |
|
64 void markNoteAsNotFavourite(); |
|
65 void markNoteAsTodo(); |
|
66 void handleEditingCompleted(bool status); |
|
67 void displayCollectionView(); |
|
68 void displayAllNotesView(); |
|
69 void handleActionStateChanged(); |
|
70 void handleOrientationChanged(Qt::Orientation); |
|
71 void openNote(); |
|
72 void selectedMenuAction(HbAction *action); |
|
73 void handleMenuClosed(); |
|
74 void updateView(ulong id=0); |
|
75 |
|
76 private: |
|
77 HbListView *mListView; |
|
78 HbAbstractViewItem *mSelectedItem; |
|
79 |
|
80 HbAction *mAllNotesAction; |
|
81 HbAction *mViewCollectionAction; |
|
82 HbAction *mAddNoteAction; |
|
83 HbAction *mDeleteAction; |
|
84 HbAction *mRemoveFavoriteAction; |
|
85 HbAction *mMarkTodoAction; |
|
86 HbAction *mOpenAction; |
|
87 |
|
88 HbLabel *mEmptyListLabel; |
|
89 |
|
90 AgendaUtil *mAgendaUtil; |
|
91 |
|
92 NotesAppControllerIf *mAppControllerIf; |
|
93 NotesDocLoader *mDocLoader; |
|
94 NotesModel *mNotesModel; |
|
95 NotesSortFilterProxyModel *mProxyModel; |
|
96 NotesEditor *mNotesEditor; |
|
97 bool mIsLongTop; |
|
98 }; |
|
99 |
|
100 #endif // NOTESFAVORITEVIEW_H |
|
101 |
|
102 // End of file --Don't remove this. |