imageeditor/plugins/ResizePlugin/inc/ImageEditorResizePlugin.h
changeset 1 edfc90759b9f
equal deleted inserted replaced
0:57d4cdd99204 1:edfc90759b9f
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef IMAGEEDITORRESIZEPLUGIN_H
       
    21 #define IMAGEEDITORRESIZEPLUGIN_H
       
    22 
       
    23 //	INCLUDES
       
    24 #include "iepb.h"
       
    25 
       
    26 
       
    27 //  FORWARD DECLARATIONS
       
    28 class CEditorImage;
       
    29 class CSystemParameters;
       
    30 
       
    31 
       
    32 /*	CLASS:	CImageEditorResizePlugin
       
    33 *
       
    34 *	CImageEditorResizePlugin represents resize adjustment plug-in for
       
    35 *	Image Editor application.
       
    36 *
       
    37 */
       
    38 class CImageEditorResizePlugin : public CImageEditorPluginBase
       
    39 {
       
    40 
       
    41 public:
       
    42 
       
    43 /** @name Methods:*/
       
    44 //@{
       
    45 
       
    46 	/** Default constructor
       
    47 	*
       
    48 	*	@param -
       
    49 	*	@return -
       
    50 	*/
       
    51 	CImageEditorResizePlugin ();
       
    52 
       
    53 	/** Second phase constructor, may leave
       
    54 	*
       
    55 	*	@param -
       
    56 	*	@return -
       
    57 	*/
       
    58 	virtual void ConstructL ();
       
    59 
       
    60 	/** Destructor
       
    61 	*
       
    62 	*	@param -
       
    63 	*	@return -
       
    64 	*/
       
    65 	virtual ~CImageEditorResizePlugin ();
       
    66 
       
    67 	/*	SetProperty
       
    68 	*
       
    69 	*   @see CPluginBase
       
    70 	*/
       
    71 	virtual TInt SetProperty (
       
    72 		TInt		aPropertyId,
       
    73 		TDesC &		aPropertyValue
       
    74 		);
       
    75 
       
    76 	/*	GetProperty
       
    77 	*
       
    78 	*   @see CPluginBase
       
    79 	*/
       
    80 	virtual TInt GetProperty (
       
    81 		TInt		aPropertyId,
       
    82 		TDes &		aPropertyValue
       
    83 		);
       
    84 
       
    85     /**	InitPluginL
       
    86 	*
       
    87 	*	@see CImageEditorPluginBase
       
    88     */
       
    89     virtual TInt InitPluginL (
       
    90 		const TRect &		aRect,
       
    91 		CCoeControl *		aParent,
       
    92 		CCoeControl *&		aPluginControl
       
    93 		);
       
    94 
       
    95     /**	ProcessImageL
       
    96 	*
       
    97 	*	@see CImageEditorPluginBase
       
    98     */
       
    99     virtual void ProcessImageL (CEditorImage * aImage);
       
   100 
       
   101     /**	ReleasePlugin
       
   102 	*
       
   103 	*	@see CImageEditorPluginBase
       
   104     */
       
   105 	virtual void ReleasePlugin ();
       
   106 
       
   107 	/*	ShowPopupNote
       
   108 	*
       
   109 	*	@see CImageEditorPluginBase
       
   110 	*/
       
   111 	virtual void ShowPopupNote ();
       
   112 
       
   113 //@}
       
   114 
       
   115 protected:
       
   116 
       
   117 /** @name Methods:*/
       
   118 //@{
       
   119 
       
   120 //@}
       
   121 
       
   122 /** @name Members:*/
       
   123 //@{
       
   124 
       
   125 //@}
       
   126 
       
   127 private:
       
   128 /** @name Methods:*/
       
   129 //@{
       
   130 
       
   131 	/*	ComputeSizeAndScale 
       
   132 	*
       
   133 	*   Computers current image size and scale.
       
   134 	*
       
   135 	*	@param -
       
   136 	*	@return -
       
   137 	*/
       
   138 	void ComputeSizeAndScale();
       
   139 
       
   140 	/*	ComputeImageSizes 
       
   141 	*
       
   142 	*   Computers available target sizes.
       
   143 	*
       
   144 	*	@param -
       
   145 	*	@return -
       
   146 	*/
       
   147 	void ComputeImageSizes();
       
   148 
       
   149 	/*	PopulateParamArray 
       
   150 	*
       
   151 	*   Add target size to param array if appropriate.
       
   152 	*
       
   153 	*	@param -
       
   154 	*	@return -
       
   155 	*/
       
   156 	void PopulateParamArray(const TSize& aTargetSize);
       
   157 
       
   158 //@}
       
   159 
       
   160 /** @name Members:*/
       
   161 //@{
       
   162 
       
   163     /// Plug-in UI control
       
   164     CCoeControl *           iControl;
       
   165     /// System parameter reference
       
   166     CSystemParameters *     iSysPars;
       
   167 
       
   168 //@}
       
   169 
       
   170 };
       
   171 
       
   172 
       
   173 #endif
       
   174 
       
   175 // End of File