notes/notesui/notesviews/inc/notescollectionview.h
branchRCL_3
changeset 29 12af337248b1
equal deleted inserted replaced
28:96907930389d 29:12af337248b1
       
     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 NotesCollectionView class.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef NOTESCOLLECTIONVIEW_H
       
    20 #define NOTESCOLLECTIONVIEW_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 HbLabel;
       
    33 class AgendaUtil;
       
    34 class NotesModel;
       
    35 class NotesDocLoader;
       
    36 class NotesEditor;
       
    37 class NotesSortFilterProxyModel;
       
    38 
       
    39 class NotesCollectionView : public HbView
       
    40 {
       
    41 	Q_OBJECT
       
    42 
       
    43 public:
       
    44 	NOTESVIEWS_EXPORT NotesCollectionView(QGraphicsWidget *parent = 0);
       
    45 	NOTESVIEWS_EXPORT virtual ~NotesCollectionView();
       
    46 
       
    47 public:
       
    48 	NOTESVIEWS_EXPORT void setupView(
       
    49 			NotesAppControllerIf &controllerIf, NotesDocLoader *docLoader);
       
    50 	NOTESVIEWS_EXPORT void populateListView();
       
    51 
       
    52 private slots:
       
    53 	void displayAllNotesView();
       
    54 	void resetCollectionView();
       
    55 	void createNewNote();
       
    56 	void handleEditingCompleted(bool status);
       
    57 	void updateData(ulong id);
       
    58 	void updateData(QList<ulong> ids);
       
    59 	void handleActivated(const QModelIndex &index);
       
    60 	void updateFavouritesCount(const QModelIndex &index, int start, int end);
       
    61 	void handleActionStateChanged();
       
    62 
       
    63 private:
       
    64 
       
    65 	int todosCount();
       
    66 	int recentNotesCount();
       
    67 
       
    68 private:
       
    69 	HbListView *mListView;
       
    70 	HbAction *mAllNotesAction;
       
    71 	HbAction *mViewCollectionAction;
       
    72 	HbAction *mAddNoteAction;
       
    73 
       
    74 	AgendaUtil *mAgendaUtil;
       
    75 
       
    76 	NotesAppControllerIf *mAppControllerIf;
       
    77 	NotesDocLoader *mDocLoader;
       
    78 	NotesModel *mNotesModel;
       
    79 	NotesEditor *mNotesEditor;
       
    80 	NotesSortFilterProxyModel *mFavouriteModel;
       
    81 };
       
    82 
       
    83 #endif // NOTESCOLLECTIONVIEW_H
       
    84 
       
    85 // End of file	--Don't remove this.