DirectPrint/DirectPrintApp/ui/inc/directprintviewbase.h
author Steven Cao <steven.1.cao@nokia.com>
Tue, 11 May 2010 14:10:02 +0800
changeset 19 2275db202402
parent 11 613a5ff70823
permissions -rw-r--r--
Pickup K3's code
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     1
/*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     2
* Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     3
* All rights reserved.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     4
* This component and the accompanying materials are made available
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     6
* which accompanies this distribution, and is available
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     8
*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
     9
* Initial Contributors:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    10
* Kanrikogaku Kenkyusho, Ltd. - Initial contribution
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    11
*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    12
* Contributors:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    13
*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    14
* Description:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    15
* {Description of the file}
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    16
*
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    17
*/
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    18
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    19
// Protection against nested includes
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    20
#ifndef __DIRECTPRINTVIEWBASE_H__
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    21
#define __DIRECTPRINTVIEWBASE_H__
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    22
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    23
// System includes
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    24
#include <aknview.h>
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    25
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    26
// User includes
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    27
#include "directprintlistobserver.h"
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    28
#include "directprintsettinglistobserver.h"
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    29
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    30
// Forward declarations
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    31
class CDirectPrintModel;
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    32
class CDirectPrintUiPluginMgr;
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    33
class CDirectPrintEngine;
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    34
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    35
// Class declaration
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    36
/**
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    37
 *  View base class
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    38
 *  more_complete_description
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    39
 */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    40
class CDirectPrintViewBase : public CAknView, public MDirectPrintListObserver, public MDirectPrintSettingListObserver
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    41
	{
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    42
public:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    43
	/** Destructor */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    44
	~CDirectPrintViewBase();
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    45
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    46
public:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    47
	/**
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    48
	 * From CAknView.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    49
	 * Get the id of view.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    50
	 *
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    51
	 * @return The id of view.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    52
	 */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    53
	TUid Id() const;
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    54
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    55
public:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    56
	/**
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    57
	 * Handles index.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    58
	 *
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    59
	 * @param aIndex The index of selected item.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    60
	 */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    61
	virtual void HandleListIndexL(TInt aIndex);
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    62
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    63
public:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    64
	/**
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    65
	 * Handles index.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    66
	 *
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    67
	 * @param aIndex The index of selected item.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    68
	 * @param aChanged The flag of change data.
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    69
	 */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    70
	virtual void HandleEditItemL(TInt aIndex, TBool aChanged);
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    71
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    72
protected:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    73
	CDirectPrintViewBase();
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    74
	void ConstructL();
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    75
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    76
protected: // from CAknView
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    77
	void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    78
	void DoDeactivate();
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    79
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    80
protected: // New founctions
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    81
	void SetActiveTitleL(TInt aTitleResId);
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    82
	CDirectPrintModel& GetModel();
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    83
	CDirectPrintUiPluginMgr& GetPluginMgr();
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    84
	CDirectPrintEngine& GetEngine();
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    85
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    86
protected:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    87
	/** View id. */
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    88
	TUid iViewId;
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    89
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    90
private:
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    91
	};
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    92
2275db202402 Pickup K3's code
Steven Cao <steven.1.cao@nokia.com>
parents: 11
diff changeset
    93
#endif // __DIRECTPRINTVIEWBASE_H__