|
1 /* |
|
2 * Copyright (c) 2010 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 * |
|
16 */ |
|
17 //#include <qdatetime.h> |
|
18 #include <hbmainwindow.h> |
|
19 |
|
20 #include <CalenLauncher> |
|
21 #include <CalenEditor> |
|
22 |
|
23 #include "calencontroller.h" |
|
24 #include "calenserviceprovider.h" |
|
25 |
|
26 CalenServiceProvider::CalenServiceProvider(CCalenController *controller, QObject* parent) : |
|
27 XQServiceProvider(QLatin1String("com.nokia.services.calendar.Launch"), parent) |
|
28 { |
|
29 publishAll(); |
|
30 mController = controller; |
|
31 //Q_IMPLEMENT_USER_METATYPE_ENUM(CalenView); |
|
32 } |
|
33 |
|
34 CalenServiceProvider::~CalenServiceProvider() |
|
35 { |
|
36 } |
|
37 |
|
38 void CalenServiceProvider::launchCalendarApp(const QDateTime& date, int viewId) |
|
39 { |
|
40 |
|
41 // Check the view ID and launch the corresponding view |
|
42 switch(viewId) { |
|
43 case CalenLauncher::MonthView: |
|
44 // Launch the month view |
|
45 mController->handleServiceManagerSlot(ECalenMonthView, date); |
|
46 break; |
|
47 case CalenLauncher::AgendaView: |
|
48 // Launch the agenda view |
|
49 mController->handleServiceManagerSlot(ECalenAgendaView, date); |
|
50 break; |
|
51 default: |
|
52 // Keep Quiet |
|
53 break; |
|
54 } |
|
55 } |
|
56 |
|
57 // End of file --Don't remove this. |
|
58 |