coreapplicationuis/powersaveutilities/batterypopupcontrol/inc/batterypopupcontrol.h
changeset 21 c4cbaa4fb734
parent 0 2e3d3ce01487
child 28 b0b858956ed5
equal deleted inserted replaced
0:2e3d3ce01487 21:c4cbaa4fb734
     1 /*
     1 /*
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    17 
    17 
    18 
    18 
    19 #ifndef CBATTERYPOPUPCONTROL_H
    19 #ifndef CBATTERYPOPUPCONTROL_H
    20 #define CBATTERYPOPUPCONTROL_H
    20 #define CBATTERYPOPUPCONTROL_H
    21 
    21 
    22 #include <AknControl.h>
    22 //#include <akncontrol.h>
    23 #include <AknUtils.h>
    23 //#include <aknutils.h>
    24 #include <AknPreviewPopUpController.h> // Controlling the preview pop-up component
    24 //#include <aknpreviewpopupcontroller.h> // Controlling the preview pop-up component
    25 
    25 #include<coecobs.h>
    26 class MEikCommandObserver; 
    26 class MEikCommandObserver; 
    27 class CEikLabel;
    27 class CEikLabel;
    28 class CGulIcon;
    28 class CGulIcon;
    29 
    29 
    30 
    30 
    40 *  when the link is tapped.  
    40 *  when the link is tapped.  
    41 *
    41 *
    42 *  @lib BatteryPopupControl.lib
    42 *  @lib BatteryPopupControl.lib
    43 *  @since S60 5.0
    43 *  @since S60 5.0
    44 */
    44 */
    45 NONSHARABLE_CLASS( CBatteryPopupControl ) :
    45 NONSHARABLE_CLASS( CBatteryPopupControl ) :public MCoeControlObserver
    46     public CAknControl,
    46    // public CAknControl,
    47     public MCoeControlObserver,
    47        // public MAknPreviewPopUpObserver
    48     public MAknPreviewPopUpObserver
       
    49     {
    48     {
    50 public:
    49 public:
    51     
    50     
    52     /** Preview popup command ids */
    51     /** Preview popup command ids */
    53     enum TLinkCommandID
    52     enum TLinkCommandID
   132 // From MAknPreviewPopUpObserver
   131 // From MAknPreviewPopUpObserver
   133    
   132    
   134     /**
   133     /**
   135      * @see MAknPreviewPopUpObserver
   134      * @see MAknPreviewPopUpObserver
   136      */
   135      */
   137     void HandlePreviewPopUpEventL( CAknPreviewPopUpController* aController,
   136  //   void HandlePreviewPopUpEventL( CAknPreviewPopUpController* aController,
   138                                    TPreviewPopUpEvent aEvent );     
   137  //                                  TPreviewPopUpEvent aEvent );     
   139 
   138 
   140     /**
   139     /**
   141      * Default constructor.
   140      * Default constructor.
   142      */
   141      */
   143     CBatteryPopupControl();
   142     CBatteryPopupControl();
   157      *
   156      *
   158      * @since S60 5.0
   157      * @since S60 5.0
   159      * @param aParent Parent rect.
   158      * @param aParent Parent rect.
   160      * @param aComponentLayout Layout data.
   159      * @param aComponentLayout Layout data.
   161      */
   160      */
   162     TRect RectFromLayout( const TRect& aParent,
   161  //   TRect RectFromLayout( const TRect& aParent,
   163         const TAknWindowComponentLayout& aComponentLayout ) const;
   162  //       const TAknWindowComponentLayout& aComponentLayout ) const;
   164 
   163 
   165     /**
   164     /**
   166      * Gets rect from layout data.
   165      * Gets rect from layout data.
   167      *
   166      *
   168      * @since S60 5.0
   167      * @since S60 5.0
   169      * @param aComponentLayout Layout data.
   168      * @param aComponentLayout Layout data.
   170      */
   169      */
   171     TRect PopUpWindowRectFromLayout( const TAknWindowComponentLayout&
   170  //   TRect PopUpWindowRectFromLayout( const TAknWindowComponentLayout&
   172         aComponentLayout ) const;
   171  //       aComponentLayout ) const;
   173     
   172     
   174     /**
   173     /**
   175      * Creates CGulIcon.
   174      * Creates CGulIcon.
   176      *
   175      *
   177      * @since S60 5.0
   176      * @since S60 5.0
   269     CGulIcon* iIcon;
   268     CGulIcon* iIcon;
   270         
   269         
   271     /**
   270     /**
   272      * Layout for icon  
   271      * Layout for icon  
   273      */
   272      */
   274     TAknLayoutRect iBitmapLayout;  
   273   //  TAknLayoutRect iBitmapLayout;  
   275 
   274 
   276     /**
   275     /**
   277      * Variant, 
   276      * Variant, 
   278      * 0 = icon and text
   277      * 0 = icon and text
   279      * 1 = icon, text and function link
   278      * 1 = icon, text and function link
   282     
   281     
   283     /**
   282     /**
   284      * Popup controller
   283      * Popup controller
   285      * Own.  
   284      * Own.  
   286      */    
   285      */    
   287     CAknPreviewPopUpController* iController;
   286   //  CAknPreviewPopUpController* iController;
   288     
   287     
   289     /**
   288     /**
   290      * Rect for link  
   289      * Rect for link  
   291      */     
   290      */     
   292     TRect iLinkRect;
   291     TRect iLinkRect;