imageeditor/ImageEditorManager/src/EditorImage.cpp
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 #include "EditorImage.h"
       
    21 
       
    22 //=============================================================================
       
    23 CEditorImage * CEditorImage::NewL ()
       
    24 {
       
    25 	CEditorImage * self = CEditorImage::NewLC ();
       
    26 	CleanupStack::Pop(); // self;
       
    27 	return self;
       
    28 }
       
    29 
       
    30 //=============================================================================
       
    31 CEditorImage * CEditorImage::NewLC ()
       
    32 {
       
    33 	CEditorImage * self = new (ELeave) CEditorImage;
       
    34 	CleanupStack::PushL (self);
       
    35 	self->ConstructL ();
       
    36 	return self;
       
    37 }
       
    38 
       
    39 //=============================================================================
       
    40 CEditorImage::~CEditorImage ()
       
    41 {
       
    42     iPreview = 0;
       
    43     iFull = 0;
       
    44 }
       
    45 
       
    46 //=============================================================================
       
    47 CFbsBitmap *& CEditorImage::GetPreviewData()
       
    48 {
       
    49 	return iPreview;
       
    50 }
       
    51 
       
    52 //=============================================================================
       
    53 CFbsBitmap *& CEditorImage::GetFullData()
       
    54 {
       
    55 	return iFull;
       
    56 }
       
    57 
       
    58 //=============================================================================
       
    59 TFileName & CEditorImage::GetImageName()
       
    60 {
       
    61 	return iFileName;
       
    62 }
       
    63 
       
    64 //=============================================================================
       
    65 void CEditorImage::LockHeapLC() const
       
    66 {
       
    67     if ( iPreview )
       
    68     {
       
    69         iPreview->LockHeapLC();
       
    70     }
       
    71 }
       
    72 
       
    73 //=============================================================================
       
    74 void CEditorImage::ReleaseHeap() const
       
    75 {
       
    76     if (iPreview)
       
    77         {
       
    78         iPreview->UnlockHeap();
       
    79         }
       
    80 }
       
    81 
       
    82 //=============================================================================
       
    83 CEditorImage::CEditorImage () 
       
    84 {
       
    85 
       
    86 }
       
    87 
       
    88 //=============================================================================
       
    89 void CEditorImage::ConstructL ()
       
    90 {
       
    91 	iFileName.Zero();	
       
    92 }
       
    93