calendarui/commonutils/src/CalenStatusPaneUtils.cpp
branchRCL_3
changeset 66 bd7edf625bdd
child 67 1539a383d7b6
equal deleted inserted replaced
65:12af337248b1 66:bd7edf625bdd
       
     1 /*
       
     2 * Copyright (c) 2007 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:  For view of calendar application.
       
    15  *
       
    16 */
       
    17 
       
    18  //debug
       
    19  #include "calendarui_debug.h"
       
    20  #include <CalenStatusPaneUtils.h>
       
    21  #include <gdi.h>
       
    22  #include "CalenStatusPaneUtilsImpl.h"
       
    23  
       
    24  
       
    25  // ================= MEMBER FUNCTIONS =========================================
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // ?classname::?member_function
       
    29 // ?implementation_description
       
    30 // (other items were commented in a header).
       
    31 // -----------------------------------------------------------------------------
       
    32 //
       
    33 EXPORT_C void CCalenStatusPaneUtils::HideNaviPane()
       
    34     {
       
    35     TRACE_ENTRY_POINT;
       
    36     iStatusPaneUtils->HideNaviPane();
       
    37 
       
    38     TRACE_EXIT_POINT;
       
    39     }
       
    40 // -----------------------------------------------------------------------------
       
    41 // ?classname::?member_function
       
    42 // ?implementation_description
       
    43 // (other items were commented in a header).
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46  EXPORT_C CAknNavigationDecorator* CCalenStatusPaneUtils::ShowNaviPaneL( const TTime& aActiveDay )
       
    47     {
       
    48     TRACE_ENTRY_POINT;
       
    49 
       
    50     TRACE_EXIT_POINT;
       
    51     return iStatusPaneUtils->ShowNaviPaneL( aActiveDay );
       
    52     }
       
    53  // -----------------------------------------------------------------------------
       
    54  // CCalenStatusPaneUtils::ShowNaviPaneL
       
    55  // Sets the calendar name and icon in the navi pane
       
    56  // (other items were commented in a header).
       
    57  // -----------------------------------------------------------------------------
       
    58  //
       
    59  EXPORT_C CAknNavigationDecorator* CCalenStatusPaneUtils::ShowNaviPaneL( const TDesC& aName, const TRgb aColor )
       
    60      {
       
    61      TRACE_ENTRY_POINT;
       
    62 
       
    63      TRACE_EXIT_POINT;
       
    64      return iStatusPaneUtils->ShowNaviPaneL( aName, aColor );
       
    65      }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // ?classname::?member_function
       
    69 // ?implementation_description
       
    70 // (other items were commented in a header).
       
    71 // -----------------------------------------------------------------------------
       
    72 //
       
    73 EXPORT_C CCalenStatusPaneUtils* CCalenStatusPaneUtils::NewL( CEikStatusPane* aStatusPane )
       
    74     {
       
    75     TRACE_ENTRY_POINT;
       
    76     
       
    77     CCalenStatusPaneUtils* self = new(ELeave) CCalenStatusPaneUtils();
       
    78     CleanupStack::PushL( self );
       
    79     self->ConstructL( aStatusPane );
       
    80     CleanupStack::Pop( self );
       
    81     
       
    82     TRACE_EXIT_POINT;
       
    83     return self;
       
    84     }
       
    85     
       
    86 // -----------------------------------------------------------------------------
       
    87 // ?classname::?member_function
       
    88 // ?implementation_description
       
    89 // (other items were commented in a header).
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 CCalenStatusPaneUtils::CCalenStatusPaneUtils()
       
    93     {
       
    94     TRACE_ENTRY_POINT;
       
    95     TRACE_EXIT_POINT;
       
    96     }
       
    97 
       
    98 // -----------------------------------------------------------------------------
       
    99 // ?classname::?member_function
       
   100 // ?implementation_description
       
   101 // (other items were commented in a header).
       
   102 // -----------------------------------------------------------------------------
       
   103 //
       
   104 void CCalenStatusPaneUtils::ConstructL( CEikStatusPane* aStatusPane )
       
   105     {
       
   106     TRACE_ENTRY_POINT;
       
   107     
       
   108     iStatusPaneUtils = CCalenStatusPaneUtilsImpl::NewL( aStatusPane );
       
   109     TRACE_EXIT_POINT;
       
   110     }
       
   111 
       
   112 // -----------------------------------------------------------------------------
       
   113 // ?classname::?member_function
       
   114 // ?implementation_description
       
   115 // (other items were commented in a header).
       
   116 // -----------------------------------------------------------------------------
       
   117 //
       
   118 EXPORT_C CCalenStatusPaneUtils::~CCalenStatusPaneUtils() 
       
   119     {
       
   120     TRACE_ENTRY_POINT;
       
   121     if( iStatusPaneUtils )
       
   122     {
       
   123     	delete iStatusPaneUtils;
       
   124     }
       
   125     
       
   126     TRACE_EXIT_POINT;
       
   127     }
       
   128 
       
   129 // -----------------------------------------------------------------------------
       
   130 // ?classname::?member_function
       
   131 // ?implementation_description
       
   132 // (other items were commented in a header).
       
   133 // -----------------------------------------------------------------------------
       
   134 //
       
   135 EXPORT_C void CCalenStatusPaneUtils::SetTitleTextL( TDes& aText )
       
   136     {
       
   137     TRACE_ENTRY_POINT;
       
   138     iStatusPaneUtils->SetTitleTextL( aText );
       
   139 
       
   140     TRACE_EXIT_POINT;
       
   141     }
       
   142 
       
   143 // -----------------------------------------------------------------------------
       
   144 // ?classname::?member_function
       
   145 // ?implementation_description
       
   146 // (other items were commented in a header).
       
   147 // -----------------------------------------------------------------------------
       
   148 //
       
   149 EXPORT_C void CCalenStatusPaneUtils::SetTitleText( HBufC* aText )
       
   150     {
       
   151     TRACE_ENTRY_POINT;
       
   152 		iStatusPaneUtils->SetTitleText( aText );
       
   153     
       
   154     TRACE_EXIT_POINT;
       
   155     }
       
   156 
       
   157 // -----------------------------------------------------------------------------
       
   158 // ?classname::?member_function
       
   159 // ?implementation_description
       
   160 // (other items were commented in a header).
       
   161 // -----------------------------------------------------------------------------
       
   162 //
       
   163 EXPORT_C void CCalenStatusPaneUtils::UnderLineTitleText( TBool aUnderLine )
       
   164     {
       
   165     TRACE_ENTRY_POINT;
       
   166 		iStatusPaneUtils->UnderLineTitleText( aUnderLine );
       
   167     
       
   168     TRACE_EXIT_POINT;
       
   169     }
       
   170     
       
   171 // -----------------------------------------------------------------------------
       
   172 // ?classname::?member_function
       
   173 // ?implementation_description
       
   174 // (other items were commented in a header).
       
   175 // -----------------------------------------------------------------------------
       
   176 //
       
   177 EXPORT_C void CCalenStatusPaneUtils::MonthNameByActiveTime( TDes& name, const TTime& aTime )
       
   178     {
       
   179     TRACE_ENTRY_POINT;
       
   180     
       
   181     iStatusPaneUtils->MonthNameByActiveTime( name, aTime );
       
   182     
       
   183     TRACE_EXIT_POINT;
       
   184     }
       
   185 
       
   186 // -----------------------------------------------------------------------------
       
   187 // ?classname::?member_function
       
   188 // ?implementation_description
       
   189 // (other items were commented in a header).
       
   190 // -----------------------------------------------------------------------------
       
   191 //
       
   192 EXPORT_C void CCalenStatusPaneUtils::DayNameByActiveTime( TDes& name, const TTime& aTime )
       
   193     {
       
   194     TRACE_ENTRY_POINT;
       
   195     iStatusPaneUtils->DayNameByActiveTime( name, aTime );
       
   196     
       
   197     TRACE_EXIT_POINT
       
   198     }
       
   199     
       
   200 // -----------------------------------------------------------------------------
       
   201 // ?classname::?member_function
       
   202 // ?implementation_description
       
   203 // (other items were commented in a header).
       
   204 // -----------------------------------------------------------------------------
       
   205 //
       
   206 EXPORT_C HBufC* CCalenStatusPaneUtils::WeekNameByActiveTimeL( const TTime& aTime,
       
   207                                                                               TDay aDayFormat,
       
   208                                                                               TCalenWeekTitle aType )
       
   209     {
       
   210     TRACE_ENTRY_POINT;
       
   211 
       
   212     HBufC* firstRow = NULL;
       
   213     firstRow = iStatusPaneUtils->WeekNameByActiveTimeL( aTime, aDayFormat, aType );
       
   214     TRACE_EXIT_POINT;
       
   215     return firstRow;
       
   216     }
       
   217 
       
   218 // -----------------------------------------------------------------------------
       
   219 // ?classname::?member_function
       
   220 // ?implementation_description
       
   221 // (other items were commented in a header).
       
   222 // -----------------------------------------------------------------------------
       
   223 //
       
   224 EXPORT_C void CCalenStatusPaneUtils::RefreshStatusPane()
       
   225     {
       
   226     TRACE_ENTRY_POINT;
       
   227     
       
   228     iStatusPaneUtils->RefreshStatusPane();
       
   229     
       
   230     TRACE_EXIT_POINT;
       
   231     }
       
   232 // End of file