homesync/contentmanager/mediaservant/inc/msmultiselectionsettingpage.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /*
       
     2 * Copyright (c) 2008 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:  Definition for MediaServant multiselection setting page
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_MSMULTISELECTIONSETTINGPAGE_H
       
    20 #define C_MSMULTISELECTIONSETTINGPAGE_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <akncheckboxsettingpage.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CSelectionItemList;
       
    27 
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 * CMSMultiselectionSettingPage class.
       
    33 */
       
    34 NONSHARABLE_CLASS( CMSMultiselectionSettingPage ):
       
    35                             public CAknCheckBoxSettingPage
       
    36     {
       
    37     public: // Constructor and destructor
       
    38 
       
    39         /**
       
    40          * two-phase constructor.
       
    41          *
       
    42          * @since S60 5.1
       
    43          * @param aIdentifier, setting page resource id
       
    44          * @param aItemArray, item list
       
    45          * @param aFirstItemSwitch, set ETrue if 'any' item is shown, EFalse
       
    46          *                          otherwise
       
    47          * @return pointer to CMSMultiselectionSettingPage
       
    48          */
       
    49         static CMSMultiselectionSettingPage* NewL( TInt aIdentifier,
       
    50                                       CSelectionItemList& aItemArray,
       
    51                                       TBool aFirstItemSwitch );
       
    52 
       
    53         /**
       
    54          * two-phase constructor.
       
    55          *
       
    56          * @since S60 5.1
       
    57          * @param aIdentifier, setting page resource id
       
    58          * @param aItemArray, item list
       
    59          * @param aFirstItemSwitch, set ETrue if 'any' item is shown, EFalse
       
    60          *                          otherwise
       
    61          * @return pointer to CMSMultiselectionSettingPage
       
    62          */
       
    63         static CMSMultiselectionSettingPage* NewLC( TInt aIdentifier,
       
    64                                       CSelectionItemList& aItemArray,
       
    65                                       TBool aFirstItemSwitch );
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         virtual ~CMSMultiselectionSettingPage();
       
    70 
       
    71 
       
    72     protected: 
       
    73 
       
    74 // From base class CAknCheckboxSettingPage
       
    75 
       
    76         /**
       
    77          * From CAknCheckboxSettingPage
       
    78          * See base class definition
       
    79          */
       
    80         void SelectCurrentItemL();
       
    81 
       
    82         /**
       
    83          * From CAknCheckboxSettingPage
       
    84          * See base class definition
       
    85          */
       
    86         TBool OkToExitL(TInt aButtonId);
       
    87 
       
    88     private:
       
    89 
       
    90         /**
       
    91          * Deselects other items if first one is selected
       
    92          * @since S60 5.1
       
    93          * @param None
       
    94          * @return None
       
    95          */
       
    96         void HandleSelectionsL();
       
    97 
       
    98     private:
       
    99 
       
   100         /**
       
   101          * Performs the first phase of two phase construction.
       
   102          *
       
   103          * @since S60 5.1
       
   104          * @param aIdentifier, setting page resource id
       
   105          * @param aItemArray, item list
       
   106          * @param aFirstItemSwitch, set ETrue if 'any' item is shown, EFalse
       
   107          *                          otherwise
       
   108          * @return None
       
   109          */
       
   110         CMSMultiselectionSettingPage(
       
   111             TInt aIdentifier,
       
   112             CSelectionItemList& aItemArray,
       
   113             TBool aFirstItemSwitch
       
   114             );
       
   115 
       
   116         /**
       
   117          * Performs the second phase construction.
       
   118          */
       
   119         void ConstructL();
       
   120 
       
   121         /**
       
   122          * Updates selections to item list
       
   123          * @since S60 5.1
       
   124          * @param None
       
   125          * @return None
       
   126          */
       
   127         void UpdateAllSelections();
       
   128         
       
   129         /**
       
   130          * handle for the pointer device input
       
   131          * @since S60 5.1
       
   132          * @param None
       
   133          * @return None
       
   134          */
       
   135         void  HandlePointerEventL (const TPointerEvent &aPointerEvent);
       
   136 
       
   137     private:
       
   138         /**
       
   139          * setting page item array (servers)
       
   140          */
       
   141         CSelectionItemList*                 iItemArray;         // not owned
       
   142         /**
       
   143          * Flag for indicating that special selection is needed
       
   144          */
       
   145         TBool                               iFirstItemSwitch;
       
   146     };
       
   147 
       
   148 #endif // C_MSMULTISELECTIONSETTINGPAGE_H
       
   149 
       
   150 // End of File