author | Mikael Laine <mikael.laine@ixonos.com> |
Fri, 29 Jan 2010 13:53:17 +0200 | |
changeset 1 | edfc90759b9f |
permissions | -rw-r--r-- |
1
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
1 |
/* |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2010 Ixonos Plc. |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
5 |
* under the terms of the "Eclipse Public License v1.0" |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
8 |
* |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - Initial contribution |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
11 |
* |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
12 |
* Contributors: |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
13 |
* Ixonos Plc |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
14 |
* |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
15 |
* Description: |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
16 |
* |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
17 |
*/ |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
18 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
19 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
20 |
// INCLUDES |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
21 |
#include "iepbint.h" |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
22 |
#include "iepbres.h" |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
23 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
24 |
#include <aknutils.h> |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
25 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
26 |
//============================================================================= |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
27 |
CImageEditorPluginBaseInt * CImageEditorPluginBaseInt::NewL ( |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
28 |
const TDesC & aResourcePath, |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
29 |
const TDesC & aResourceFile |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
30 |
) |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
31 |
{ |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
32 |
CImageEditorPluginBaseInt * self = new (ELeave) CImageEditorPluginBaseInt; |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
33 |
CleanupStack::PushL (self); |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
34 |
self->ConstructL (aResourcePath, aResourceFile); |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
35 |
CleanupStack::Pop(); // self |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
36 |
return self; |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
37 |
} |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
38 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
39 |
//============================================================================= |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
40 |
CImageEditorPluginBaseInt::~CImageEditorPluginBaseInt () |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
41 |
{ |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
42 |
delete iResource; |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
43 |
} |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
44 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
45 |
//============================================================================= |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
46 |
CPluginResource * CImageEditorPluginBaseInt::GetPluginResource() const |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
47 |
{ |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
48 |
return iResource; |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
49 |
} |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
50 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
51 |
//============================================================================= |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
52 |
CImageEditorPluginBaseInt::CImageEditorPluginBaseInt () |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
53 |
{ |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
54 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
55 |
} |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
56 |
|
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
57 |
//============================================================================= |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
58 |
void CImageEditorPluginBaseInt::ConstructL ( |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
59 |
const TDesC & aResourcePath, |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
60 |
const TDesC & aResourceFile |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
61 |
) |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
62 |
{ |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
63 |
TFileName resourcePath ( aResourcePath ); |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
64 |
User::LeaveIfError( CompleteWithAppPath( resourcePath ) ); |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
65 |
iResource = CPluginResource::NewL (resourcePath, aResourceFile); |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
66 |
} |
edfc90759b9f
Committing the Image Editor package under the Eclipse Public License
Mikael Laine <mikael.laine@ixonos.com>
parents:
diff
changeset
|
67 |