45
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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 "cxestillimagedesktop.h"
|
|
19 |
#include "cxutils.h"
|
|
20 |
|
|
21 |
int CxeStillImageDesktop::mNextId = CxeStillImage::INVALID_ID + 1;
|
|
22 |
|
|
23 |
CxeStillImageDesktop::CxeStillImageDesktop()
|
|
24 |
: mSnapshot(),
|
|
25 |
mDataItem(NULL),
|
|
26 |
mSaved(false),
|
|
27 |
mId(++mNextId)
|
|
28 |
{
|
|
29 |
}
|
|
30 |
|
|
31 |
CxeStillImageDesktop::~CxeStillImageDesktop()
|
|
32 |
{
|
|
33 |
mDataItem = NULL;
|
|
34 |
}
|
|
35 |
|
|
36 |
CxeImageDataItem *CxeStillImageDesktop::dataItem()
|
|
37 |
{
|
|
38 |
return mDataItem;
|
|
39 |
}
|
|
40 |
|
|
41 |
QString CxeStillImageDesktop::filename() const
|
|
42 |
{
|
|
43 |
return mFilename;
|
|
44 |
}
|
|
45 |
|
|
46 |
QPixmap CxeStillImageDesktop::snapshot() const
|
|
47 |
{
|
|
48 |
return mSnapshot;
|
|
49 |
}
|
|
50 |
|
|
51 |
bool CxeStillImageDesktop::saved() const
|
|
52 |
{
|
|
53 |
return mSaved;
|
|
54 |
}
|
|
55 |
|
|
56 |
int CxeStillImageDesktop::id() const
|
|
57 |
{
|
|
58 |
return mId;
|
|
59 |
}
|
|
60 |
|
|
61 |
void CxeStillImageDesktop::setSnapshot(QPixmap pixmap)
|
|
62 |
{
|
|
63 |
mSnapshot = pixmap;
|
|
64 |
}
|
|
65 |
|
|
66 |
void CxeStillImageDesktop::setFilename(const QString &filename)
|
|
67 |
{
|
|
68 |
mFilename = filename;
|
|
69 |
}
|
|
70 |
void CxeStillImageDesktop::setSaved(bool saved)
|
|
71 |
{
|
|
72 |
mSaved = saved;
|
|
73 |
}
|
|
74 |
|
|
75 |
void CxeStillImageDesktop::setDataItem(CxeImageDataItem *dataItem)
|
|
76 |
{
|
|
77 |
mDataItem = dataItem;
|
|
78 |
}
|