calendarui/application/src/calenserviceprovider.cpp
changeset 18 c198609911f9
child 45 b6db4fd4947b
equal deleted inserted replaced
0:f979ecb2b13e 18:c198609911f9
       
     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 <qdebug.h>
       
    19 #include <hbmainwindow.h>
       
    20 
       
    21 #include "calencontroller.h"
       
    22 #include "caleneditor.h"
       
    23 #include "calenserviceprovider.h"
       
    24 
       
    25 CalenServiceProvider::CalenServiceProvider(CCalenController *controller, QObject* parent) :
       
    26  XQServiceProvider(QLatin1String("com.nokia.services.calendar.Launch"), parent)
       
    27 {
       
    28 	publishAll();
       
    29 	mController = controller;
       
    30 	//Q_IMPLEMENT_USER_METATYPE_ENUM(CalenView);
       
    31 }
       
    32 
       
    33 CalenServiceProvider::~CalenServiceProvider()
       
    34 {
       
    35 }
       
    36 
       
    37 void CalenServiceProvider::launchCalendarApp(const QDateTime& date, int viewId)
       
    38 {	
       
    39 	qDebug() << "launchCalendarApp slot getting called -->";
       
    40 	
       
    41 	// Check the view ID and launch the corresponding view
       
    42 	switch(viewId) {
       
    43 		case 0:
       
    44 			// Launch the month view
       
    45 			mController->handleServiceManagerSlot(ECalenMonthView, date);
       
    46 			break;
       
    47 		case 1:
       
    48 			// Launch the month view
       
    49 			mController->handleServiceManagerSlot(ECalenDayView, date);
       
    50 			break;
       
    51 		default:
       
    52 			// Keep Quiet
       
    53 			break;
       
    54 	}
       
    55 }
       
    56 
       
    57 // End of file	--Don't remove this.
       
    58