meetingui/meetingrequestviewers/inc/CMRSummaryDlgBase.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2005 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:   Implementation base summary dialog view, common functionality
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMRMAILSUMMARYDLG_H
       
    22 #define CMRMAILSUMMARYDLG_H
       
    23 
       
    24 #include "CMRDialogBase.h"
       
    25 #include <e32base.h>
       
    26 #include <EIKLBO.H>             // for MEikListBoxObserver
       
    27 
       
    28 //FORWARD DECLARATIONS
       
    29 class CEikFormattedCellListBox;
       
    30 class TCoeHelpContext;
       
    31 class TListBoxEvent;
       
    32 class CAknDoubleLargeStyleListBox;
       
    33 class CMRSummaryDlgModel;
       
    34 class MMRInfoPopup;
       
    35 class CEikonEnv;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 class CMRSummaryListBoxModel :
       
    40     public CBase,
       
    41 	public MDesCArray
       
    42 	{
       
    43 	public:
       
    44 	
       
    45 		/**
       
    46         * Two-phased constructor.
       
    47         * @return CMRSummaryListBoxModel object.
       
    48         */
       
    49         static CMRSummaryListBoxModel* NewL( CEikonEnv* aEnv );
       
    50         
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CMRSummaryListBoxModel();
       
    55         
       
    56     public:
       
    57     
       
    58         void SetModel( MMRModelInterface& aMRModel );
       
    59     
       
    60     private:
       
    61     
       
    62         /**
       
    63         * By default Symbian 2nd phase constructor is private.
       
    64         */
       
    65         void ConstructL();
       
    66 
       
    67         /**
       
    68         * C++ default constructor.
       
    69         * @param aEngine, Reference to MAttendeeEng
       
    70         * @return CAttendeeLBModel object
       
    71         */
       
    72         CMRSummaryListBoxModel( CEikonEnv* aEnv );
       
    73         
       
    74 	 private: // From MDesCArray
       
    75 	 
       
    76         TInt MdcaCount() const;
       
    77         
       
    78         TPtrC16 MdcaPoint( TInt aIndex ) const;
       
    79     
       
    80     private: //new functions
       
    81     
       
    82         void AppendDescriptionIcon( TPtr& aPtr )  const;
       
    83         
       
    84 	    void AppendDescriptionPrimaryL( TPtr& aPtr )  const;
       
    85 	    
       
    86     	void AppendDescriptionSecondaryL( TPtr& aPtr )  const;
       
    87     	
       
    88 	    void AppendAttendeeIcon( TPtr& aPtr )  const;
       
    89 	    
       
    90     	void AppendAttendeePrimary( TPtr& aPtr )  const;
       
    91     	
       
    92     	void AppendAttendeeSecondaryL( TPtr& aPtr ) const;
       
    93     
       
    94     private:    // data    
       
    95 
       
    96         // not own:
       
    97         MMRModelInterface* iMRModel;
       
    98         
       
    99         // not own
       
   100         CEikonEnv* iEnv;
       
   101         
       
   102         // own: Conversion buffer
       
   103         HBufC* iBuffer; 
       
   104         
       
   105         // static texts from resources
       
   106         HBufC* iNoSubjectText;
       
   107         HBufC* iAttendeesText;
       
   108         HBufC* iNoInvitedAttendeesText;
       
   109         mutable HBufC* iInvitedAttendees;
       
   110 	};
       
   111 		
       
   112 // CLASS DECLARATION
       
   113 
       
   114 /**
       
   115 *  Base Summary dialog
       
   116 *
       
   117 *  @since Series S60 3.0
       
   118 */
       
   119 class CMRSummaryDlgBase :
       
   120     public CMRDialogBase,
       
   121 	public MEikListBoxObserver
       
   122     {
       
   123     public:  // Constructors and destructor
       
   124 
       
   125         /**
       
   126         * Two-phased constructor.
       
   127         */
       
   128         static CMRSummaryDlgBase* NewL(
       
   129             MAgnEntryUiCallback& aHandlerCallback,
       
   130             MAgnEntryUi::TAgnEntryUiEditorMode aEditorMode );
       
   131 
       
   132         /**
       
   133         * Destructor.
       
   134         */
       
   135         virtual ~CMRSummaryDlgBase();
       
   136         
       
   137     public:	// API
       
   138     
       
   139     	virtual TInt ExecuteLD();
       
   140     	
       
   141     protected: // From MEikListBoxObsever
       
   142 
       
   143         void HandleListBoxEventL( CEikListBox* aListBox,
       
   144                                   TListBoxEvent aEventType );
       
   145     	
       
   146     protected: // From CMRDialogBase
       
   147     
       
   148         void HandleSetModelL();    
       
   149         
       
   150         void RefreshData();
       
   151                 
       
   152         TInt HandleDlgExitingL( TInt aCommandId );        
       
   153     
       
   154     protected: // From CAknDialog
       
   155 
       
   156         void PreLayoutDynInitL();
       
   157 
       
   158         void DynInitMenuPaneL( TInt aMenuId, CEikMenuPane* aMenuPane );
       
   159         
       
   160     protected: // From CCoeControl
       
   161    
       
   162     	void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   163 
       
   164         void SizeChanged();
       
   165         
       
   166         TInt CountComponentControls() const;
       
   167         
       
   168         CCoeControl* ComponentControl( TInt aIndex ) const;
       
   169         
       
   170         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
   171                                      TEventCode aType );        
       
   172         
       
   173     private: // New functions
       
   174     
       
   175     	void ConstructListBoxL();
       
   176 
       
   177         static TInt DelayedDialogExitCallBack( TAny* aSummaryDlg );
       
   178         
       
   179         TInt HandleDlgExitingResponseL();
       
   180 
       
   181     private: // construction
       
   182 
       
   183         /**
       
   184         * C++ default constructor.
       
   185         */
       
   186         CMRSummaryDlgBase( MAgnEntryUiCallback& aHandlerCallback,
       
   187                            MAgnEntryUi::TAgnEntryUiEditorMode aEditorMode );
       
   188 
       
   189         /**
       
   190         * By default Symbian 2nd phase constructor is private.
       
   191         */
       
   192         void ConstructL();
       
   193         
       
   194     protected: //data
       
   195     
       
   196         // help feature flag
       
   197         TBool iHelpSupported;
       
   198         
       
   199         // editor mode
       
   200         MAgnEntryUi::TAgnEntryUiEditorMode iEditorMode;
       
   201         
       
   202         // own, listbox for selection
       
   203         CAknDoubleLargeStyleListBox* iListBox;
       
   204         
       
   205         // own, listbox model
       
   206         CMRSummaryListBoxModel* iLBModel;
       
   207 
       
   208         // own, idle callback for dialog exit
       
   209         CIdle* iIdleDialogExit;        
       
   210         
       
   211         // own, info popup
       
   212         MMRInfoPopup* iInfoPopup;
       
   213     };
       
   214 
       
   215 #endif      // ?CLASSNAME_H
       
   216 
       
   217 // End of File