phonebookui/Phonebook2/inc/CPbk2NamesListControl.h
branchRCL_3
changeset 85 38bb213f60ba
parent 63 f4a778e096c2
equal deleted inserted replaced
74:6b5524b4f673 85:38bb213f60ba
    30 #include <mpbk2commanditemupdater.h>
    30 #include <mpbk2commanditemupdater.h>
    31 #include <eiksbobs.h>
    31 #include <eiksbobs.h>
    32 #include <aknsfld.h>
    32 #include <aknsfld.h>
    33 #include <eiklbo.h>
    33 #include <eiklbo.h>
    34 #include "CPbk2ControlContainer.h"
    34 #include "CPbk2ControlContainer.h"
    35 #include <aknmarkingmodeobserver.h>
       
    36 
    35 
    37 // FORWARD DECLARATIONS
    36 // FORWARD DECLARATIONS
    38 class MPbk2NamesListState;
    37 class MPbk2NamesListState;
    39 class CPbk2ContactViewListBox;
    38 class CPbk2ContactViewListBox;
    40 class CPbk2NamesListStateFactory;
    39 class CPbk2NamesListStateFactory;
    77                               public MEikScrollBarObserver,
    76                               public MEikScrollBarObserver,
    78                               public MAdaptiveSearchTextObserver,
    77                               public MAdaptiveSearchTextObserver,
    79                               public MEikListBoxObserver,
    78                               public MEikListBoxObserver,
    80                               public MPbk2ControlContainerForegroundEventObserver,
    79                               public MPbk2ControlContainerForegroundEventObserver,
    81                               public MPbk2CommandItemUpdater,
    80                               public MPbk2CommandItemUpdater,
    82                               public MVPbkContactViewObserverExtension, 
    81                               public MVPbkContactViewObserverExtension 
    83                               public MAknMarkingModeObserver
       
    84     {
    82     {
    85     public: // Enumerations
    83     public: // Enumerations
    86 
    84 
    87         /// The names list states
    85         /// The names list states
    88         enum TPbk2NamesListState
    86         enum TPbk2NamesListState
   129                 MVPbkContactViewBase& aView,
   127                 MVPbkContactViewBase& aView,
   130                 MPbk2ContactNameFormatter& aNameFormatter,
   128                 MPbk2ContactNameFormatter& aNameFormatter,
   131                 CPbk2StorePropertyArray& aStoreProperties );
   129                 CPbk2StorePropertyArray& aStoreProperties );
   132         
   130         
   133         /**
   131         /**
   134         * Creates a new instance of this class.
   132 		* Creates a new instance of this class.
   135         *
   133 		*
   136         * @param aResourceId       Id of the resource where the control
   134 		* @param aResourceId       Id of the resource where the control
   137         *                          is defined in.
   135 		*                          is defined in.
   138         * @param aContainer        This control's container.
   136 		* @param aContainer        This control's container.
   139         * @param aManager          Virtual Phonebook contact manager.
   137 		* @param aManager          Virtual Phonebook contact manager.
   140         * @param aView             The contact view.
   138 		* @param aView             The contact view.
   141         * @param aNameFormatter    Name formatter.
   139 		* @param aNameFormatter    Name formatter.
   142         * @param aStoreProperties  An array containg properties
   140 		* @param aStoreProperties  An array containg properties
   143         *                          for the stores that are shown.
   141 		*                          for the stores that are shown.
   144         * @param aThumbManager       Thumbnail manager for social phonebook    //TODO
   142 		* @param aThumbManager	   Thumbnail manager for social phonebook	//TODO
   145         * @return A new instance of this class.
   143 		* @return A new instance of this class.
   146         */
   144 		*/
   147        IMPORT_C static CPbk2NamesListControl* NewL(
   145 	   IMPORT_C static CPbk2NamesListControl* NewL(
   148                TInt aResourceId,
   146 			   TInt aResourceId,
   149                const CCoeControl* aContainer,
   147 			   const CCoeControl* aContainer,
   150                CVPbkContactManager& aManager,
   148 			   CVPbkContactManager& aManager,
   151                MVPbkContactViewBase& aView,
   149 			   MVPbkContactViewBase& aView,
   152                MPbk2ContactNameFormatter& aNameFormatter,
   150 			   MPbk2ContactNameFormatter& aNameFormatter,
   153                CPbk2StorePropertyArray& aStoreProperties,
   151 			   CPbk2StorePropertyArray& aStoreProperties,
   154                CPbk2ThumbnailManager* aThumbManager );
   152 			   CPbk2ThumbnailManager* aThumbManager );
   155 
   153 
   156         /**
   154         /**
   157          * Constructor. Defined as public for custom control needs.
   155          * Constructor. Defined as public for custom control needs.
   158          *
   156          *
   159          * @param aContainer        This control's container.
   157          * @param aContainer        This control's container.
   245         IMPORT_C void HandleViewForegroundEventL( TBool aForeground );
   243         IMPORT_C void HandleViewForegroundEventL( TBool aForeground );
   246 
   244 
   247         /**
   245         /**
   248          * For special case: Call this function to skip showing the 
   246          * For special case: Call this function to skip showing the 
   249          * blocking progress note when mass update is going on in nameslistview.
   247          * blocking progress note when mass update is going on in nameslistview.
   250          * When done, MassUpdateSkipProgressNote(EFalse) must always be
   248 		 * When done, MassUpdateSkipProgressNote(EFalse) must always be
   251          * called to reset back to original state (even if a Leave would happen in between) 
   249 		 * called to reset back to original state (even if a Leave would happen in between) 
   252          * @param aSkip - ETrue if progress note should not be displayed. EFalse reset to normal.
   250          * @param aSkip - ETrue if progress note should not be displayed. EFalse reset to normal.
   253          */
   251          */
   254         IMPORT_C void MassUpdateSkipProgressNote( TBool aSkip );
   252         IMPORT_C void MassUpdateSkipProgressNote( TBool aSkip );
   255         
   253         
   256         /**
   254         /**
   390     public: // from MEikListBoxObserver
   388     public: // from MEikListBoxObserver
   391         void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
   389         void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
   392     public: // from MAdaptiveSearchTextObserver
   390     public: // from MAdaptiveSearchTextObserver
   393 
   391 
   394         void AdaptiveSearchTextChanged( CAknSearchField* aSearchField );
   392         void AdaptiveSearchTextChanged( CAknSearchField* aSearchField );
   395 
       
   396     public: // From MAknMarkingModeObserver 
       
   397             
       
   398         /**
       
   399          * This method is called when marking mode is activated or deactivated.
       
   400          * 
       
   401          * @param aActivated @c ETrue if marking mode was activate, @c EFalse
       
   402          *                   if marking mode was deactivated.
       
   403          */
       
   404         void MarkingModeStatusChanged( TBool aActivated );
       
   405 
       
   406         /**
       
   407          * This method is called just before marking mode is closed. Client can 
       
   408          * either accept or decline closing.
       
   409          * 
       
   410          * @return @c ETrue if marking mode should be closed, otherwise @c EFalse.
       
   411          */
       
   412         TBool ExitMarkingMode() const;
       
   413         
       
   414     private: // Implementation
   393     private: // Implementation
   415         
   394         
   416         /**
   395         /**
   417          * Constructor.
   396          * Constructor.
   418          *
   397          *
   462     public: //For Storing/Restoring/Clearing the Marked Contacts
   441     public: //For Storing/Restoring/Clearing the Marked Contacts
   463         void StoreMarkedContactsAndResetViewL();
   442         void StoreMarkedContactsAndResetViewL();
   464         void RestoreMarkedContactsL();
   443         void RestoreMarkedContactsL();
   465         void ClearMarkedContactsInfo();
   444         void ClearMarkedContactsInfo();
   466         
   445         
   467     public:
   446         
   468         inline void SetMarkingMode( TBool aActived )
       
   469             {
       
   470             iMarkingModeOn = aActived;
       
   471             }
       
   472         
       
   473         inline TBool GetMarkingMode() const
       
   474             {
       
   475             return iMarkingModeOn;
       
   476             }
       
   477         
   447         
   478     private: // Data
   448     private: // Data
   479         /// Ref: Current state
   449         /// Ref: Current state
   480         MPbk2NamesListState* iCurrentState;
   450         MPbk2NamesListState* iCurrentState;
   481         /// Own: State factory
   451         /// Own: State factory
   528         // Own/Ref (see below): Thumbnail manager
   498         // Own/Ref (see below): Thumbnail manager
   529         CPbk2ThumbnailManager* iThumbManager;
   499         CPbk2ThumbnailManager* iThumbManager;
   530         // Wheter this control owns the thumbnail manager (iThumbManager) or not 
   500         // Wheter this control owns the thumbnail manager (iThumbManager) or not 
   531         TBool iOwnThumbManager;
   501         TBool iOwnThumbManager;
   532         //OWN: double list box "handle"
   502         //OWN: double list box "handle"
   533         CPbk2ContactViewDoubleListBox* iDoubleListBox;
   503         CPbk2ContactViewDoubleListBox* 	iDoubleListBox;
   534         
   504         
   535         //Own: Selected/Marked Contacts
   505         //Own: Selected/Marked Contacts
   536         MVPbkContactLinkArray* iSelectedLinkArray;
   506         MVPbkContactLinkArray* iSelectedLinkArray;      
   537            
   507            
   538         //Own: Background Task Handler     
   508         //Own: Background Task Handler     
   539         CPbk2NamesListControlBgTask* iBgTask;
   509         CPbk2NamesListControlBgTask* iBgTask;
   540         //Own: Mass update checker/handler
   510         //Own: Mass update checker/handler
   541         CPbk2HandleMassUpdate* iCheckMassUpdate;
   511         CPbk2HandleMassUpdate* iCheckMassUpdate;
   542         //Own: Open Cca is in progress
   512         //Own: Open Cca is in progress
   543         TBool iOpeningCca;
   513         TBool iOpeningCca;        
   544         // Flag to indicate marking mode is active
       
   545         TBool iMarkingModeOn;
       
   546     };
   514     };
   547 
   515 
   548 #endif // CPBK2NAMESLISTCONTROL_H
   516 #endif // CPBK2NAMESLISTCONTROL_H
   549 
   517 
   550 // End of File
   518 // End of File