camerauis/cameraxui/cxengine/src/cxeimagedataqueuesymbian.cpp
branchRCL_3
changeset 53 61bc0f252b2b
equal deleted inserted replaced
50:f54ad444594d 53:61bc0f252b2b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #include <QImage>
       
    18 #include <QList>
       
    19 
       
    20 #include "cxeimagedataqueuesymbian.h"
       
    21 #include "cxutils.h"
       
    22 
       
    23 
       
    24 CxeImageDataQueueSymbian::CxeImageDataQueueSymbian()
       
    25 {
       
    26     CX_DEBUG_IN_FUNCTION();
       
    27 }
       
    28 
       
    29 CxeImageDataQueueSymbian::~CxeImageDataQueueSymbian()
       
    30 {
       
    31     CX_DEBUG_ENTER_FUNCTION();
       
    32 
       
    33     // This will delete all remaining items!
       
    34     // qDeleteAll( mList ); // not owned. Ownership is with filesavethread
       
    35     mList.clear();
       
    36 
       
    37     CX_DEBUG_EXIT_FUNCTION();
       
    38 }
       
    39 
       
    40 int CxeImageDataQueueSymbian::size() const
       
    41 {
       
    42     return mList.size();
       
    43 }
       
    44 
       
    45 void CxeImageDataQueueSymbian::clear()
       
    46 {
       
    47     CX_DEBUG_ENTER_FUNCTION();
       
    48 
       
    49     // This will delete all remaining items!
       
    50     // qDeleteAll( mList );
       
    51     mList.clear();
       
    52 
       
    53     CX_DEBUG_EXIT_FUNCTION();
       
    54 }
       
    55 
       
    56 /*
       
    57 void CxeImageDataQueueSymbian::deleteImage( int index )
       
    58     {
       
    59     CX_DEBUG_ENTER_FUNCTION();
       
    60 
       
    61     mList[index]->deleteImage();
       
    62 
       
    63     CX_DEBUG_EXIT_FUNCTION();
       
    64     }
       
    65 
       
    66 void CxeImageDataQueueSymbian::renameImage( int index, const QString& path )
       
    67     {
       
    68     CX_DEBUG_ENTER_FUNCTION();
       
    69 
       
    70     TPtrC16 newPath (reinterpret_cast<const TUint16*>(path.utf16()));
       
    71     mList[index]->renameImage( newPath );
       
    72 
       
    73     CX_DEBUG_EXIT_FUNCTION();
       
    74     }
       
    75 */
       
    76 
       
    77 CxeImageDataItem &CxeImageDataQueueSymbian::operator[]( int index )
       
    78 {
       
    79     CX_DEBUG_ASSERT( index >= 0 && index < mList.count() );
       
    80     return *mList[index];
       
    81 }
       
    82 
       
    83 CxeImageDataItemSymbian *CxeImageDataQueueSymbian::startSave(QByteArray data, QString path, int id, bool addLocation)
       
    84 {
       
    85     CX_DEBUG_ENTER_FUNCTION();
       
    86 
       
    87     CxeImageDataItemSymbian* dataItem = new CxeImageDataItemSymbian(data, path, id, addLocation);
       
    88     mList.append(dataItem);
       
    89 
       
    90     CX_DEBUG_EXIT_FUNCTION();
       
    91     return dataItem;
       
    92 }
       
    93