?? bmpmanipappview.h
字號:
/* Copyright (c) 2003, Nokia Mobile Phones. All rights reserved */
#ifndef __BMPMANIPAPPVIEW_H__
#define __BMPMANIPAPPVIEW_H__
#include <coecntrl.h>
#include <MdaImageConverter.h>
/*!
@class CBmpmanipAppView
@discussion An instance of this class is the Application View object for the Bmpmanip
example application
*/
class CBmpmanipAppView : public CCoeControl, public MMdaImageUtilObserver
{
public:
/*!
@enum TImageRotateAngle
@discussion The available rotation angles
@value E90Degrees Rotate by 90 degrees
@value E180Degrees Rotate by 180 degrees
@value E270Degrees Rotate by 270 degrees
*/
enum TImageRotateAngle
{
E90Degrees,
E180Degrees,
E270Degrees
};
public:
/*!
@function NewL
@discussion Create a CBmpmanipAppView object, which will draw itself to aRect
@param aRect the rectangle this view will be drawn to
@result a pointer to the created instance of CBmpmanipAppView
*/
static CBmpmanipAppView* NewL(const TRect& aRect);
/*!
@function NewLC
@discussion Create a CBmpmanipAppView object, which will draw itself to aRect
@param aRect the rectangle this view will be drawn to
@result a pointer to the created instance of CBmpmanipAppView
*/
static CBmpmanipAppView* NewLC(const TRect& aRect);
/*!
@function ~CBmpmanipAppView
@discussion Destroy the object
*/
~CBmpmanipAppView();
/*!
@function RotateImageClockwiseL
@discussion Rotate the bitmap clockwise
@param aAngle an enum representing an angle to rotate
*/
void RotateImageClockwiseL(TImageRotateAngle aAngle);
/*!
@function SaveL
@discussion Save the bitmap to a new file
*/
void SaveL();
public: // from CCoeControl
/*!
@function Draw
@discussion Draw this CBmpmanipAppView to the screen
@param aRect A pointer to the rectangle of this view that needs updating
*/
void Draw(const TRect& aRect) const;
public: //from MMdaImageUtilObserver
/*!
@function MiuoOpenComplete
@discussion Call when the gif file has been opened
@param aError an error code or KErrNone if process was successful
*/
void MiuoOpenComplete(TInt aError);
/*!
@function MiuoConvertComplete
@discussion Call when any conversion process performed on the bitmap is complete
@param aError an error code or KErrNone if process was successful
*/
void MiuoConvertComplete(TInt aError);
/*!
@function MiuoCreateComplete
@discussion Call when the file in which the bitmap is to be saved has been created
@param aError an error code or KErrNone if process was successful
*/
void MiuoCreateComplete(TInt aError);
private:
/*!
@function ConstructL
@discussion Perform the second phase construction of a CBmpmanipAppView object
@param aRect the rectangle this view will be drawn to
*/
void ConstructL(const TRect& aRect);
/*!
@function CBmpmanipAppView
@discussion Perform the first phase of two phase construction
*/
CBmpmanipAppView();
/*!
@function ConvertingFromGifFinished
@discussion Call when the the file has been converted to a GIF
@param aError an error code or KErrNone if process was successful
*/
void ConvertingFromGifFinished(TInt aError);
/*!
@function SavingFinished
@discussion Call when the the file has been saved
@param aError an error code or KErrNone if process was successful
*/
void SavingFinished(TInt aError);
/*!
@function ScalingFinished
@discussion Call when scaling has completed
@param aError an error code or KErrNone if process was successful
*/
void ScalingFinished(TInt aError);
/*!
@function RotatingFinished
@discussion Call when rotating has completed
@param aError an error code or KErrNone if process was successful
*/
void RotatingFinished(TInt aError);
private:
/*!
@enum TConvertState
@discussion Keeps track of which stage the open/conversion/creating process is at
@value EConvertStateNull The initial (idle) state
@value EConvertStateConvertingFromGif A Gif is being converted
@value EConvertStateScaling An image is being scaled
@value EConvertStateRotating An image is being rotated
@value EConvertStateSaving An image is being saved
@value EConvertStateReady Ready to perform an operation
*/
enum TConvertState
{
EConvertStateNull,
EConvertStateConvertingFromGif,
EConvertStateScaling,
EConvertStateRotating,
EConvertStateSaving,
EConvertStateReady
} iConvertState;
private:
/*!
@var iConverter Converts the gif file to a bitmap
*/
CMdaImageFileToBitmapUtility* iConverter;
/*!
@var iScaler Scales the bitmap
*/
CMdaBitmapScaler* iScaler;
/*!
@var iRotator Rotates the bitmap
*/
CMdaBitmapRotator* iRotator;
/*!
@var iFileSaver Saves a bitmap file
*/
CMdaImageBitmapToFileUtility* iFileSaver;
/*!
@var iBitmap The bitmap being displayed
*/
CFbsBitmap* iBitmap;
/*!
@var iClipFormat The format to be loaded (i.e. gif)
*/
TMdaBmpClipFormat iClipFormat;
/*!
@var iCodec The codec used to perform the conversion
*/
TMda24BppBmpCodec iCodec;
};
#endif // __BMPMANIPAPPVIEW_H__
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -