ImagePrint/ImagePrintUI/imageprintapp/inc/cimageprintsettingscontainer.h
branchRCL_3
changeset 21 d59c248c9d36
parent 0 d11fb78c4374
equal deleted inserted replaced
20:159fc2f68139 21:d59c248c9d36
       
     1 /*
       
     2 * Copyright (c) 2004-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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CIMAGEPRINTSETTINGSCONTAINER_H
       
    20 #define CIMAGEPRINTSETTINGSCONTAINER_H
       
    21 
       
    22 #include <coecntrl.h>
       
    23 #include <aknlists.h>
       
    24 #include <aknnotewrappers.h>
       
    25 #include <AknWaitNoteWrapper.h>
       
    26 #include <AknProgressDialog.h>
       
    27 
       
    28 #include "midleprinteventobserver.h"
       
    29 
       
    30 class MObjectProvider;
       
    31 class MPrintSettings;
       
    32 class CPropertiesBoxModel;
       
    33 class CImagePrintSettingsItemList;
       
    34 class CImagePrintAppUi;
       
    35 class MUIMode;
       
    36 
       
    37 /**
       
    38  *
       
    39  *  Image print settings container
       
    40  *
       
    41  */
       
    42 class CImagePrintSettingsContainer
       
    43     : public CCoeControl
       
    44     {
       
    45 
       
    46     public:     // Constructors and destructor
       
    47 
       
    48         /**
       
    49          *  Two-phase constructor
       
    50          *  @param aSettings  Print settings interface
       
    51          *  @param aProvider  Object provider for setting the MOP
       
    52          *  @paramt aClientRect  The screen area
       
    53          *  @return Initialized instance of the class
       
    54          */
       
    55         static CImagePrintSettingsContainer* NewL(
       
    56                                 MPrintSettings* aSettings,
       
    57                                 MObjectProvider* aProvider,
       
    58                                 TRect aClientRect,
       
    59                                 CImagePrintAppUi* aAppUi,
       
    60                                 MUIMode* aUIMode );
       
    61 
       
    62         /**
       
    63          *  Destructor
       
    64          */
       
    65         virtual ~CImagePrintSettingsContainer();
       
    66 
       
    67     protected:  // Constructors and destructor
       
    68 
       
    69         /**
       
    70          *  Constructor
       
    71          *  MPrintSettings* aSettings   Print settings interface
       
    72          */
       
    73         CImagePrintSettingsContainer( MPrintSettings* aSettings,
       
    74                                       CImagePrintAppUi* aAppUi,
       
    75                                       MUIMode* aUIMode );
       
    76 
       
    77         /**
       
    78          *  2nd phase constructor
       
    79          *  MObjectProvider* aProvider  Object provider for setting the MOP
       
    80          *  TRect aClientRect           The screen area
       
    81          */
       
    82         void ConstructL( MObjectProvider* aProvider, const TRect& aClientRect );
       
    83 
       
    84     protected:    // Methods derived from CCoeControl
       
    85 
       
    86         /**
       
    87          *  Returns the amount of owned UI controls
       
    88          *
       
    89          *  @return Number of components
       
    90          */
       
    91         TInt CountComponentControls() const;
       
    92 
       
    93         /**
       
    94          *  Gets the specified component of a compound control.
       
    95          *
       
    96          *  @param aIndex The index of the control to get.
       
    97          *  @return The component control with an index of aIndex
       
    98          */
       
    99         CCoeControl* ComponentControl( TInt aIndex ) const;
       
   100 
       
   101         /**
       
   102          *  Draws the control to the device screen
       
   103          *
       
   104          *  @param aRect Modified area (not used)
       
   105          */
       
   106         void Draw( const TRect& aRect ) const;
       
   107 
       
   108 		void SizeChanged();
       
   109         void HandleResourceChange( TInt aType );
       
   110 
       
   111     public:     // New methods
       
   112 
       
   113         /**
       
   114          *  Starts editing the active item
       
   115          */
       
   116         void EditItemL();
       
   117 
       
   118 		/**
       
   119 		 * Starts the device discovery
       
   120 		 *
       
   121 		 * @param aProtocol protocol for which the discovery is done
       
   122 		 * @param aHidden whether discovery is visible (dialog) or hidden
       
   123 		 */
       
   124 		void DoDiscoveryL( TInt aProtocol, TBool aHidden = EFalse );
       
   125 
       
   126 		/**
       
   127 		 * Changes the text in status pane
       
   128 		 *
       
   129 		 * @param aName new text for status pane
       
   130 		 */        
       
   131 	
       
   132 		void ChangeStatusPaneTextL( const TInt aCopiesOfImage );
       
   133 		
       
   134 		/**
       
   135 		 * Updates the size of settings list
       
   136 		 *
       
   137 		 * @param aRect new size for list
       
   138 		 */
       
   139         void UpdateListSize( TRect aRect );
       
   140 
       
   141         /**
       
   142          * Tells ListBox to update itself as its' size has
       
   143          * possible changed
       
   144          */
       
   145         void UpdateListBox( );
       
   146 
       
   147     protected:
       
   148 
       
   149         // Settings
       
   150         MPrintSettings* iPrintSettings;
       
   151 
       
   152         // List box model
       
   153         CPropertiesBoxModel* iModel;
       
   154 
       
   155         // Item list
       
   156         CAknSettingStyleListBox* iListBox;
       
   157 
       
   158         // AppUi
       
   159         CImagePrintAppUi* iAppUi;
       
   160 
       
   161         // USB connect note
       
   162         CAknProgressDialog* iUSBConnectionWaitNote;
       
   163 
       
   164         MUIMode* iUIMode;
       
   165 	};
       
   166 
       
   167 #endif // CIMAGEPRINTSETTINGSCONTAINER_H
       
   168 
       
   169 //  End of File