DirectPrint/DirectPrintApp/ui/inc/directprintmainview.h
changeset 19 2275db202402
parent 11 613a5ff70823
equal deleted inserted replaced
2:acc370d7f2f6 19:2275db202402
       
     1 /*
       
     2 * Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "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 * Kanrikogaku Kenkyusho, Ltd. - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * {Description of the file}
       
    16 *
       
    17 */
       
    18 
       
    19 // Protection against nested includes
       
    20 #ifndef __PRINTMAINVIEW_H__
       
    21 #define __PRINTMAINVIEW_H__
       
    22 
       
    23 // System includes
       
    24 #include <aknlists.h>
       
    25 #include <akntoolbarobserver.h>
       
    26 
       
    27 // User includes
       
    28 #include "DirectPrintViewBase.h"
       
    29 #include "DirectPrintListBox.h"
       
    30 
       
    31 // Class declaration
       
    32 /**
       
    33  *  Main view class
       
    34  *  more_complete_description
       
    35  */
       
    36 class CDirectPrintMainView : public CDirectPrintViewBase, public MAknToolbarObserver
       
    37 	{
       
    38 private:
       
    39 	// Data types
       
    40 	/** The index of list items */
       
    41 	enum
       
    42 		{
       
    43 		EItemPrinter,
       
    44 		EItemBearer,
       
    45 		EItemSetting
       
    46 		};
       
    47 
       
    48 public:
       
    49 	/** Constructors */
       
    50 	static CDirectPrintMainView* NewL();
       
    51 	static CDirectPrintMainView* NewLC();
       
    52 	/** Destructor */
       
    53 	~CDirectPrintMainView();
       
    54 
       
    55 public: // from CAknView
       
    56 	/**
       
    57 	 * From CAknView.
       
    58 	 * Handles user commands.
       
    59 	 *
       
    60 	 * @param aCommand The id of commands.
       
    61 	 */
       
    62 	void HandleCommandL(TInt aCommand);
       
    63 
       
    64 public:
       
    65 	/**
       
    66 	 * From MDirectPrintListObserver.
       
    67 	 * Handles index.
       
    68 	 *
       
    69 	 * @param aIndex The index of list items.
       
    70 	 */
       
    71 	void HandleListIndexL(TInt aIndex);
       
    72 
       
    73 public:
       
    74 	/**
       
    75 	 * From MAknToolbarObserver.
       
    76 	 * Handles user commands.
       
    77 	 *
       
    78 	 * @param aCommand The id of commands.
       
    79 	 */
       
    80 	void OfferToolbarEventL(TInt aCommand);
       
    81 
       
    82 protected: // from CAknView
       
    83 	void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
       
    84 	void DoDeactivate();
       
    85 
       
    86 private:
       
    87 	CDirectPrintMainView();
       
    88 	void ConstructL();
       
    89 
       
    90 	void LoadListDataL();
       
    91 	void MakePropertyStringL(TDes& aProperty);
       
    92 
       
    93 private:
       
    94 	/** Pointer to listbox. */
       
    95 	CDirectPrintListBox* iListBox;		// Owend Data
       
    96 	/** Pointer to item array. */
       
    97 	CDesCArray* iItemArray;
       
    98 	};
       
    99 
       
   100 #endif // __PRINTMAINVIEW_H__