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 |
|
18 #include <QByteArray> |
|
19 #include <QString> |
|
20 |
|
21 #include "cxefakeimagedataitem.h" |
|
22 #include "cxeimagedataitem.h" |
|
23 #include "cxutils.h" |
|
24 |
|
25 CxeFakeImageDataItem::CxeFakeImageDataItem(int index, QByteArray data, QString filename, int id, bool addLocation) |
|
26 : mId(id), |
|
27 mIndex(index), |
|
28 mData(data), |
|
29 mFileName(filename), |
|
30 mAddLocationInfo(addLocation), |
|
31 mState(CxeImageDataItem::SavePending) |
|
32 { |
|
33 CX_DEBUG_IN_FUNCTION(); |
|
34 } |
|
35 |
|
36 CxeFakeImageDataItem::~CxeFakeImageDataItem() |
|
37 { |
|
38 CX_DEBUG_IN_FUNCTION(); |
|
39 } |
|
40 |
|
41 CxeError::Id CxeFakeImageDataItem::save() |
|
42 { |
|
43 CX_DEBUG_ENTER_FUNCTION(); |
|
44 mState = CxeImageDataItem::Saved; |
|
45 emit imageSaved(CxeError::None, mFileName, mId); |
|
46 CX_DEBUG_EXIT_FUNCTION(); |
|
47 return CxeError::None; |
|
48 } |
|
49 |
|
50 |
|
51 CxeImageDataItem::State CxeFakeImageDataItem::state() const |
|
52 { |
|
53 CX_DEBUG_ENTER_FUNCTION(); |
|
54 CX_DEBUG_EXIT_FUNCTION(); |
|
55 return mState; |
|
56 } |
|
57 |
|
58 int CxeFakeImageDataItem::id() const |
|
59 { |
|
60 return mId; |
|
61 } |
|
62 |
|
63 QString CxeFakeImageDataItem::path() const |
|
64 { |
|
65 return mFileName; |
|
66 } |
|
67 |
|
68 |
|
69 bool CxeFakeImageDataItem::addLocation() const |
|
70 { |
|
71 return mAddLocationInfo; |
|
72 } |
|
73 |
|
74 // end of file |
|