diff -r 26673e532f65 -r 159fc2f68139 ImagePrint/ImagePrintUI/imageprintapp/inc/cpropertiesboxmodel.h --- a/ImagePrint/ImagePrintUI/imageprintapp/inc/cpropertiesboxmodel.h Tue May 25 12:42:41 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -/* -* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef CPROPERTIESBOXMODEL_H -#define CPROPERTIESBOXMODEL_H - -#include -#include -#include - -#include "mprintsettings.h" - -class CImagePrintSettingsContainer; -class CImagePrintEngine; - -const TInt KMaxListName = 128; - -/** - * - * List box model that handles the contents of the list box and launches - * the pop-up dialogs that are used . - * - */ -class CPropertiesBoxModel : - public CBase, - public MEikListBoxObserver, - public MDesCArray - { - public: // Constructors and destructors - - /** - * Two-phase constructor - * - * @param aSettings Print settings - * @return Initialized instance of CPropertiesBoxModel - */ - static CPropertiesBoxModel* NewL( CImagePrintEngine& aEngine, - MPrintSettings* aSettings, - CImagePrintSettingsContainer* aContainer ); - - static CPropertiesBoxModel* NewLC( CImagePrintEngine& aEngine, - MPrintSettings* aSettings, - CImagePrintSettingsContainer* aContainer ); - - /** - * Destructor - */ - virtual ~CPropertiesBoxModel(); - - private: // Constructors and destructors - - /** - * Constructor - * - * @param aSettings Print settings - */ - CPropertiesBoxModel( CImagePrintEngine& aEngine, - MPrintSettings* aSettings, - CImagePrintSettingsContainer* aContainer ); - - /** - * 2nd phase constructor - */ - void ConstructL(); - - public: // Methods derived from MEikListBoxObserver - - void HandleListBoxEventL( CEikListBox* aListBox, - TListBoxEvent aEventType ); - - /** - * Returns number of copies. - */ - TInt NumberOfCopies(); - - - private: // Methods derived from MDesCArray - - TInt MdcaCount() const; - TPtrC MdcaPoint( TInt aIndex ) const; - - private: // New methods - - /** - * Returns the index to the capability array from list box array - * - * @return Capability array index - */ - TUint CapabilityArrayIndex( TInt aListBoxIndex ) const; - - /** - * Stores current setting to the engine - */ - void SaveCurrentSelectionL( CBaseCapability &aCapab, CEikListBox* aListBox ); - - /** - * Launches list query for default printer - * - * @return wanted protocol - */ - TInt LaunchDefaultPrinterListL(); - - /** - * Stores number of copies value to the engine - * NOTE: Number of copies value is job based value since IP 6.2 - */ - void LaunchNumberOfCopiesDialogL(); - - /** - * Init print settings - */ - void InitSettingsL(); - - /** - * Sets DefaultPrinterItem for ListBox - */ - void SetDefaultPrinterItem() const; - - /** - * Sets SetNumberOfCopiesItem for ListBox - */ - void SetNumberOfCopiesItem() const; - - /** - * Sets other capability(template, papersize etc.) for ListBox - */ - void SetOtherCapability( const TInt &aIndex ) const; - - /** - * Sets number of copies value for settings - */ - void SetNumberOfCopiesValueL(); - - private: // Data - - CImagePrintEngine& iEngine; - MPrintSettings* iSettingsIF; // use - CPrintSettings* iPrintSettings; - TInt iCount; - TInt iNumberOfCopiesValue; - CImagePrintSettingsContainer* iContainer; - mutable TBuf iBuf; - HBufC* iDefaultPrinter; - HBufC* iNumberOfCopiesText; - HBufC* iMMC; - HBufC* iPictBridge; - }; - -#endif // CPROPERTIESBOXMODEL_H - -// End of File