|
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 * This file contains the NotesAppControllerIfImpl class definition. |
|
16 * |
|
17 */ |
|
18 |
|
19 // System includes |
|
20 #include <QDebug> |
|
21 |
|
22 // User includes |
|
23 #include "notesappcontrollerifimpl.h" |
|
24 #include "notesmodelhandler.h" |
|
25 #include "notesappcontroller.h" |
|
26 #include "notesviewmanager.h" |
|
27 |
|
28 /*! |
|
29 \class NotesAppControllerIfImpl |
|
30 |
|
31 This class implements the NotesAppControllerIf interface which is used |
|
32 by the views and other componets to access the services of |
|
33 notesviewmanager and notesmodelhandler. |
|
34 */ |
|
35 |
|
36 /*! |
|
37 Constructor. |
|
38 |
|
39 \param controller Pointer to an object of NotesAppController. |
|
40 \param parent QObject pointer. |
|
41 */ |
|
42 NotesAppControllerIfImpl::NotesAppControllerIfImpl( |
|
43 NotesAppController *controller, QObject *parent) |
|
44 :QObject(parent), |
|
45 mAppController(controller) |
|
46 { |
|
47 qDebug() << "notes: NotesAppControllerIfImpl::NotesAppControllerIfImpl -->"; |
|
48 |
|
49 // Nothing yet. |
|
50 |
|
51 qDebug() << "notes: NotesAppControllerIfImpl::NotesAppControllerIfImpl <--"; |
|
52 } |
|
53 |
|
54 /*! |
|
55 Destructor. |
|
56 */ |
|
57 NotesAppControllerIfImpl::~NotesAppControllerIfImpl() |
|
58 { |
|
59 qDebug() << "notes: NotesAppControllerIfImpl::~NotesAppControllerIfImpl -->"; |
|
60 |
|
61 // Nothing yet. |
|
62 |
|
63 qDebug() << "notes: NotesAppControllerIfImpl::~NotesAppControllerIfImpl <--"; |
|
64 } |
|
65 |
|
66 /*! |
|
67 From NotesAppControllerIf. |
|
68 Returns a pointer to agendautil object. |
|
69 |
|
70 \return AgendaUtil* Pointer to agendautil object. |
|
71 \sa NotesAppControllerIf |
|
72 */ |
|
73 AgendaUtil *NotesAppControllerIfImpl::agendaUtil() |
|
74 { |
|
75 qDebug() << "notes: NotesAppControllerIfImpl::agendaUtil -->"; |
|
76 |
|
77 qDebug() << "notes: NotesAppControllerIfImpl::agendaUtil <--"; |
|
78 |
|
79 return mAppController->mNotesModelHandler->agendaInterface(); |
|
80 } |
|
81 |
|
82 /*! |
|
83 From NotesAppControllerIf. |
|
84 Returns a pointer to notesmodel object. |
|
85 |
|
86 \return NotesModel* Pointer to notesmodel object. |
|
87 \sa NotesAppControllerIf |
|
88 */ |
|
89 NotesModel *NotesAppControllerIfImpl::notesModel() |
|
90 { |
|
91 qDebug() << "notes: NotesAppControllerIfImpl::notesModel -->"; |
|
92 |
|
93 qDebug() << "notes: NotesAppControllerIfImpl::notesModel <--"; |
|
94 |
|
95 return mAppController->mNotesModelHandler->notesModel(); |
|
96 } |
|
97 |
|
98 /*! |
|
99 From NotesAppControllerIf. |
|
100 Issues a request to NotesViewManager to switch to a given view. |
|
101 |
|
102 \param viewId The id of the view to be switched to. |
|
103 \sa NotesAppControllerIf |
|
104 */ |
|
105 void NotesAppControllerIfImpl::switchToView(NotesNamespace::NotesViewIds viewId) |
|
106 { |
|
107 qDebug() << "notes: NotesAppControllerIfImpl::switchToView -->"; |
|
108 |
|
109 mAppController->mViewManager->switchToView(viewId); |
|
110 |
|
111 qDebug() << "notes: NotesAppControllerIfImpl::switchToView <--"; |
|
112 } |
|
113 |
|
114 // End of file --Don't remove this. |