1.1 --- a/epoc32/include/app/clmkcategoryselectordlg.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/app/clmkcategoryselectordlg.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,140 @@
1.4 -clmkcategoryselectordlg.h
1.5 +/*
1.6 +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: LandmarksUi Content File - This class provides functionality for selecting either one or
1.19 +* multiple categories.
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +#ifndef CLMKCATEGORYSELECTORDLG_H
1.30 +#define CLMKCATEGORYSELECTORDLG_H
1.31 +
1.32 +// INCLUDES
1.33 +#include <e32base.h> // CBase
1.34 +#include <e32std.h> //RArray and RPointerArray
1.35 +#include <EPos_Landmarks.h> // Lm typedefs, constants etc.
1.36 +#include <EPos_CPosLandmarkDatabase.h>
1.37 +// FORWARD DECLARATIONS
1.38 +//class CPosLandmarkDatabase;
1.39 +class CLmkDlgSelectorImplBase;
1.40 +class MObjectProvider;
1.41 +
1.42 +// For multiple database support
1.43 +class TLmkItemIdDbCombiInfo;
1.44 +
1.45 +// CLASS DECLARATION
1.46 +
1.47 +/**
1.48 +* This is a dialog class, which is used to launch category selector dialog and
1.49 +* to get the selected category ids.It displays the categories present in landmarks
1.50 +* database,as a list.The dialog can be a single selector or multiple selector dialog,
1.51 +* depending upon argument passed by the client (in ExecuteLD function) at the time
1.52 +* when it is launched.Based on whether it is a single selector or multiple selector
1.53 +* dialog, user can select single category or multiple categories.
1.54 +*/
1.55 +class CLmkCategorySelectorDlg : public CBase
1.56 + {
1.57 + public: // Constructors and destructor
1.58 + /**
1.59 + * This is a static function, which create and return an instance of this class.
1.60 + * Categories present in the landmark database, are shown in selector.
1.61 + *
1.62 + * @param [in] aShowEmptyCategories specifies whether categories without
1.63 + * landmarks are shown or not
1.64 + * @leave Leaves with KErrNotSupported if framework functionality is not available.
1.65 + * @panic Panics with system-wide panic codes.
1.66 + * @return new instance of this class
1.67 + */
1.68 + IMPORT_C static CLmkCategorySelectorDlg* NewL(TBool aShowEmptyCategories = EFalse );
1.69 +
1.70 + /**
1.71 + * Destructor.
1.72 + */
1.73 + IMPORT_C ~CLmkCategorySelectorDlg();
1.74 +
1.75 + public: // New functions
1.76 + /**
1.77 + * This function sets the context - that is, the enclosing parent control - for this control.
1.78 + *
1.79 + * @param [in] aParent The parent object which is the context for the control.
1.80 + * @panic Panics with KLmkPanicNullMember, if the selector is not
1.81 + * constructed properly.
1.82 + */
1.83 + IMPORT_C void SetMopParent( MObjectProvider* aParent );
1.84 +
1.85 + /**
1.86 + * This function launches the category selector dialog.Client use this function
1.87 + * to launch single category selector dialog.
1.88 + * This object is destroyed when this function returns or leaves.
1.89 + * @param [in/out] aSelected Passed as reference and when the function returns,
1.90 + * contains the selected category id.
1.91 + * @leave Leaves with system-wide leave codes.
1.92 + * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
1.93 + * @return Returns non-zero if accepted, else zero.
1.94 + */
1.95 + IMPORT_C TInt ExecuteLD( TLmkItemIdDbCombiInfo& aSelected );
1.96 +
1.97 + /**
1.98 + * This function launches the category selector dialog.Client use this function
1.99 + * to launch multiple category selector dialog.
1.100 + * This object is destroyed when this function returns or leaves.
1.101 + * If the array(aSelectedItems) is passed with already filled cateogry ids, then
1.102 + * such categories will be shown as selected when the dialog is launched,but if
1.103 + * any of these ids do not exist in landmarks database,will be ignored.
1.104 + *
1.105 + * @param [in/out] aSelectedItems Passed as reference,either filled with category
1.106 + * ids for pre-selection or an empty array.On return of the function
1.107 + * contains the selected category ids.
1.108 + * @leave Leaves with system-wide leave codes.
1.109 + * @panic Panics with KLmkPanicNullMember, if the selector is not constructed properly.
1.110 + * @return Returns non-zero if accepted, else zero.
1.111 + */
1.112 + IMPORT_C TInt ExecuteLD( RArray<TLmkItemIdDbCombiInfo>& aSelectedItems );
1.113 +
1.114 + private:
1.115 + /**
1.116 + * C++ default constructor.
1.117 + * @return newly instantiated object
1.118 + */
1.119 + CLmkCategorySelectorDlg();
1.120 +
1.121 + /**
1.122 + * By default Symbian 2nd phase constructor is private.
1.123 + * @param aShowEmptyCategories
1.124 + */
1.125 + void ConstructL( TBool aShowEmptyCategories );
1.126 +
1.127 + private: // Data
1.128 + // ETrue if executed in multiple item selector mode
1.129 + TBool iIsMultiSelector;
1.130 +
1.131 + ///Own: Search implementor object
1.132 + CLmkDlgSelectorImplBase* iSelector;
1.133 +
1.134 + //Own: Set to ETrue in destructor
1.135 + TBool* iDestroyedPtr;
1.136 +
1.137 + // Multiple database support
1.138 + RPointerArray <CPosLandmarkDatabase> iDbs;
1.139 +
1.140 + };
1.141 +
1.142 +#endif // CLMKCATEGORYSELECTORDLG_H
1.143 +
1.144 +// End of File