ImagePrint/ImagePrintUI/imageprintapp/inc/cimageprintsettingsview.h
branchRCL_3
changeset 20 159fc2f68139
parent 17 26673e532f65
child 21 d59c248c9d36
equal deleted inserted replaced
17:26673e532f65 20:159fc2f68139
     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 CIMAGEPRINTSETTINGSVIEW_H
       
    20 #define CIMAGEPRINTSETTINGSVIEW_H
       
    21 
       
    22 #include <aknview.h>
       
    23 #include <eikapp.h>
       
    24 #include <eikdoc.h>
       
    25 #include <coeccntx.h>
       
    26 #include <aknappui.h>
       
    27 
       
    28 class MPrintSettings;
       
    29 class MPrintJob;
       
    30 class CImagePrintSettingsContainer;
       
    31 class CIMGPPrintDlgManager;
       
    32 class CImagePrintAppUi;
       
    33 class MUIMode;
       
    34 
       
    35 const TUid KImageSettingsViewId = { 2 };
       
    36 
       
    37 /**
       
    38  *
       
    39  *  The settings view 
       
    40  *
       
    41  */
       
    42 class CImagePrintSettingsView 
       
    43     : public CAknView
       
    44     {
       
    45 	public:		// Constructors and destructors
       
    46 
       
    47         /**
       
    48          *  Two-phase constructor
       
    49          *
       
    50          *  @param aSettings    Print settings
       
    51          *  @param aPrintJob Print job interface to the engine
       
    52          *  @return Initialized instance of this class
       
    53          */
       
    54         static CImagePrintSettingsView* NewL( 
       
    55             MPrintSettings* aSettings,
       
    56             MPrintJob* aPrintJob,
       
    57             CImagePrintAppUi* aAppUi,
       
    58             MUIMode* aUIMode );                
       
    59         static CImagePrintSettingsView* NewLC( 
       
    60             MPrintSettings* aSettings,
       
    61             MPrintJob* aPrintJob,
       
    62             CImagePrintAppUi* aAppUi,
       
    63             MUIMode* aUIMode );
       
    64 
       
    65         /**
       
    66          *  Destructor
       
    67          */
       
    68         virtual ~CImagePrintSettingsView();
       
    69 
       
    70     protected:  // Constructors and destructors
       
    71 
       
    72         /**
       
    73          *  Second-phase constructor
       
    74          *
       
    75          *  @param aSettings    Print settings
       
    76          */
       
    77         void ConstructL( MPrintSettings* aSettings );
       
    78 
       
    79         /**
       
    80          *  Constructor
       
    81          *  @param aPrintJob Print job interface to the engine
       
    82          */
       
    83         CImagePrintSettingsView( MPrintJob* aPrintJob, 
       
    84                                  CImagePrintAppUi* aAppUi,
       
    85                                  MUIMode* aUIMode );
       
    86 
       
    87         void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
    88 
       
    89     public:		// Methods derived from CAknView
       
    90 
       
    91         /**
       
    92          *  Returns this view's ID
       
    93          *  @return View's Id 
       
    94          */
       
    95 		TUid Id() const;
       
    96 
       
    97         /**
       
    98          *  Handles commands coming to the viwe
       
    99          *  @param aCommand The command ID
       
   100          */
       
   101 		void HandleCommandL(TInt aCommand);        
       
   102 
       
   103 	private:	// Methods derived from CAknView
       
   104 
       
   105         /**
       
   106          *  Activates the view, creates container and other UI controls
       
   107          *
       
   108          *  @param aPrevViewId  Previous view's ID
       
   109          *  @param aCustomMessageId Custom message ID for the view (not used)
       
   110          *  @param aCustomMessage   Custom messsage (not used)
       
   111          */
       
   112 		void DoActivateL( 
       
   113             const TVwsViewId &aPrevViewId, TUid aCustomMessageId, 
       
   114             const TDesC8 &aCustomMessage );
       
   115 
       
   116         /**
       
   117          *  Called upon view deactivation
       
   118          */
       
   119 		void DoDeactivate();
       
   120 
       
   121         /**
       
   122         * Handle view foreground event
       
   123         */
       
   124         void HandleForegroundEventL( TBool aForeground);
       
   125 
       
   126     private:    // New methods
       
   127 
       
   128         /**
       
   129          *  Destroys control container and removes it from the stack
       
   130          */
       
   131         void DestroyContainer();
       
   132 
       
   133         /**
       
   134          *  Starts the printing sequence
       
   135          */
       
   136         void StartPrintingL();
       
   137         void HandlePossibleLinkDisconnectionL();	
       
   138 
       
   139 	private:	// Data
       
   140 
       
   141         // Settings view control container
       
   142 		CImagePrintSettingsContainer* iContainer;
       
   143 
       
   144         // Pointer to the print settings interface
       
   145         MPrintSettings* iSettings;
       
   146 
       
   147         // Pointer to print job interface
       
   148         MPrintJob* iPrintJob;
       
   149 
       
   150         // Print dlg manager
       
   151         CIMGPPrintDlgManager* iPrintDlgManager;
       
   152 
       
   153         //AppUI
       
   154         CImagePrintAppUi* iAppUi;
       
   155         
       
   156         // Interface to UI mode
       
   157         MUIMode* iUIMode;
       
   158     };
       
   159 
       
   160 #endif // CIMAGEPRINTSETTINGSVIEW_H
       
   161 
       
   162 //  End of File