calendarui/views/dayview/tsrc/unittests/unittest_calendayview/calennativeview.h
changeset 75 7ac58b2aae6f
parent 72 27feeedec790
child 79 6ff09f16627b
child 81 ce92091cbd61
equal deleted inserted replaced
72:27feeedec790 75:7ac58b2aae6f
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  This class is the base class of all Calendar views.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CALENNATIVEVIEW_H
       
    20 #define CALENNATIVEVIEW_H
       
    21 
       
    22 #ifdef  CALENVIEWS_DLL
       
    23 #define CALENNATIVEVIEW_EXPORT Q_DECL_EXPORT
       
    24 #else
       
    25 #define CALENNATIVEVIEW_EXPORT Q_DECL_IMPORT
       
    26 #endif
       
    27 
       
    28 //  System includes
       
    29 #include <hblabel.h>
       
    30 #include <hblistwidget.h>
       
    31 #include <hbabstractviewitem.h>
       
    32 
       
    33 // User includes
       
    34 #include "calennotificationhandler.h"   // MCalenNotificationHandler
       
    35 #include "calenview.h"
       
    36 
       
    37 const int WORKAROUND_TO_LIMIT_MAX_SPEED=8000;
       
    38 
       
    39 class MCalenServices;
       
    40 class HbDateTimePicker;
       
    41 
       
    42 class  CalenNativeView : public CalenView,
       
    43                         public MCalenNotificationHandler
       
    44     {
       
    45     Q_OBJECT
       
    46     
       
    47 	public:  // Constructors and destructor
       
    48         /**
       
    49          * Destructor.
       
    50          */
       
    51 	    virtual ~CalenNativeView(){}
       
    52 	    virtual void populationComplete(){}
       
    53 		TBool pluginEnabled(){return EFalse;}
       
    54 		virtual void refreshViewOnGoToDate(){}
       
    55 		QString *pluginText() {QString* str = new QString("string"); return str;}
       
    56 	    /**
       
    57 	     * captureScreenshot captures the current screenshot
       
    58 	     */
       
    59 		CALENNATIVEVIEW_EXPORT void captureScreenshot(bool captureScreenShot = false) {Q_UNUSED(captureScreenShot);}
       
    60 		
       
    61 	protected:  // New functions
       
    62 	    CalenNativeView( MCalenServices& services ) : mServices(services){}
       
    63 	    
       
    64 	    void HandleNotification( const TCalenNotification notification ){Q_UNUSED(notification);}
       
    65 	    virtual void onLocaleChanged(int reason) {Q_UNUSED(reason);}
       
    66 	    virtual void onContextChanged() {}
       
    67 
       
    68 	protected slots:
       
    69 	
       
    70         void goToDate(){}
       
    71         void goToSelectedDate(){}
       
    72         void deleteBeforeDate(){}
       
    73         void deleteAllEntries(){}
       
    74         void launchSettingsView(){}
       
    75 	    virtual void changeOrientation(Qt::Orientation orientation){Q_UNUSED(orientation);}
       
    76 	    /**
       
    77 	     * saveActivity saves the current view as an activity
       
    78 	     * 
       
    79 	     */
       
    80 	    void saveActivity(){}
       
    81 	    
       
    82     protected:
       
    83     
       
    84         MCalenServices	&mServices; // not owned.
       
    85         int             mActivityId; // Recent Activity ID, currently it holdes wither of ECalenMonthView or ECalenAgendaView
       
    86         QVariantHash    mScreenShotMetadata; // Screenshot
       
    87 
       
    88 	};
       
    89 
       
    90 #endif  // CALENNATIVEVIEW_H
       
    91 
       
    92 // End of file